How to get velocity, acceleration of joints in TrajOpt trajectory? [closed]
Hi, i'm working with TrajOpt and working with the basic_cartesian_path robot example file.
Planning with the example package is working (tesseract + trajopt_ros) but i'm asking if it is possible to see the trajectory (so joint values, speed and acceleration) After launching the launch file and rviz i execude the basic_cartesian_path.cpp file. And get the following: (i have changed the code to work with my 8DOF robot)
| oldexact | dapprox | dexact | ratio
COSTS | -------------------------------------------------
joint_vel | 3.471e+00 | 1.179e-02 | 1.179e-02 | 1.000e+00
joint_acc | 2.558e+00 | 1.699e-02 | 1.699e-02 | 1.000e+00
joint_jerk | 1.072e+01 | 7.395e+00 | 6.327e-02 | 8.555e-03
collision_0 | 0.000e+00 | -1.631e-12 | 0.000e+00 | ------
collision_1 | 0.000e+00 | -1.631e-12 | 0.000e+00 | ------
collision_2 | 0.000e+00 | -1.631e-12 | 0.000e+00 | ------
This is just a small part of the entire displayed values in the terminal. I have added the following lines in de cpp file to get the trajectory after optimaization:
> TrajArray output = getTraj(opt.x(), prob->GetVars());
> ROS_INFO_STREAM("\n" << output );
It gives me the joint value (degrees) of each joints. (8DOF robot)
3.63784 -4.49758e-05 0.0451132 0.203 1.0405 0.00737547 -4.46337e-05 -0.503622
3.65105 -4.46174e-05 0.0603891 0.706067 0.527483 0.00755458 -4.42784e-05 -0.517012
3.66406 -4.42575e-05 0.0604344 0.471696 0.76724 0.00773493 -4.39215e-05 -0.5302
3.67687 -4.38968e-05 0.283819 0.44633 0.574757 0.00791593 -4.35638e-05 -0.54318
3.68947 -4.35354e-05 0.183435 0.712521 0.414586 0.00809789 -4.32054e-05 -0.55597
3.70188 -4.31735e-05 0 0.777079 0.539197 0.00828025 -4.28467e-05 -0.5
But where do I get the velocity, acceleration of each joint? There is also no indication of the time between these points. Or am I missing something here?
I'm using kinetic.