hungpham2511 / toppra

robotic motion planning library
https://hungpham2511.github.io/toppra/index.html
MIT License
625 stars 170 forks source link

The velocities start and end at non-zero values #29

Closed tjh49 closed 5 years ago

tjh49 commented 5 years ago

Just run the basic example and find out the velocities are not zeros at beginning and ending. Wondering how come this happened since the initial and finals velocities should be zeros for robot controlling. figure_1

hungpham2511 commented 5 years ago

Zero velocity can be achieved by setting bc_type to clamped in compute_trajectory.

See below for example. jnt_traj, aux_traj, data = instance.compute_trajectory(0, 0, return_data=True, bc_type="clamped")

Btw, thank you for asking. I will update the example to mention this point as well.

hungpham2511 commented 5 years ago

@tjh49 Hi, the lastest commit on branch master now automatically choose this setting if both start and end path velocities are zero.

tjh49 commented 5 years ago

problem solved! Thank you so much!