Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Trajectory MultiDOF to file

Hi all!

I'm getting stuck trying to save the trajectory generate by MoveIt to a file.

The trajectory is generated correctly and the robot moves right in RViz.

moveit_msgs::RobotTrajectory trajectory;
const double jump_threshold = 0.0;
const double eef_step = 0.01;
double fraction = move_group.computeCartesianPath(waypoints, eef_step, jump_threshold, trajectory);

image description

Also, I can open a file and write that in it. But I can't obtain the data of the trajectory.

If I read the data with:


I get a value, that I don't know what it means, and also is only one point, no three for the X, Y, and Z of the joint.

If I try with:

Eigen::Affine3d t;
tf::transformMsgToEigen(trajectory.multi_dof_joint_trajectory.points[i].transforms[j], t);

I can compile my code, but I get an error when executing the program. The error code is -11.

[move_group_interface_tutorial-1] process has died [pid 19367, exit code -11, cmd /home/crasar/WS/fotokite_ws/devel/lib/moveit_tutorials/fotokite_move_path __name:=move_group_interface_tutorial __log:=/home/crasar/.ros/log/f8fe907a-cb06-11e8-bd7b-d89ef3923760/move_group_interface_tutorial-1.log].
log file: /home/crasar/.ros/log/f8fe907a-cb06-11e8-bd7b-d89ef3923760/move_group_interface_tutorial-1*.log

Here is the workspace of my project.

And to launch it you need two terminals:

  1. roslaunch fotokite_moveit demo.launch
  2. roslaunch moveit_tutorials fotokite_move_path.launch

Thank you, Jorge