36.1. MTGV2 Trajectory
36.1.1. Overview
The MTGV2 trajectory generation example project demonstrates the function of using MTGV2 to generate the number of turns, position, velocity, and acceleration of the target trajectory. In this routine, the initial position and velocity are configured as 0, and the acceleration is configured as 10r/s2; When the speed increases to 50r/s, MTGV2 will automatically configure the acceleration to 0 and keep the speed unchanged; After a period of time, MTGV2 will automatically configure the acceleration to -10r/s2; When the speed reaches -50r/s, configure the acceleration to 10r/s2. The above operation can be automatically triggered by configuring the MTGV2 register, and there is no need for software to participate during the operation.
36.1.2. Board Setting
No special settings
36.1.3. Running the example
mtg basic example /LOCK_REV_POS=0.000199,LOCK_VEL=5,LOCK_ACC=1/ /LOCK_REV_POS=0.108655,LOCK_VEL=119,LOCK_ACC=1/ /LOCK_REV_POS=0.417401,LOCK_VEL=233,LOCK_ACC=1/ /LOCK_REV_POS=0.926403,LOCK_VEL=348,LOCK_ACC=1/ /LOCK_REV_POS=1.635660,LOCK_VEL=463,LOCK_ACC=1/ /LOCK_REV_POS=2.545297,LOCK_VEL=577,LOCK_ACC=1/ /LOCK_REV_POS=3.655098,LOCK_VEL=692,LOCK_ACC=1/ /LOCK_REV_POS=4.965163,LOCK_VEL=806,LOCK_ACC=1/ /LOCK_REV_POS=6.475487,LOCK_VEL=921,LOCK_ACC=1/ /LOCK_REV_POS=8.186073,LOCK_VEL=1035,LOCK_ACC=1/