ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to find the end effector positions/co-ordinates for the whole plan (trajectory) in 'MoveIt!' ?

asked 2020-07-09 09:28:29 -0500

KP_learner gravatar image

updated 2022-01-22 16:10:39 -0500

Evgeny gravatar image

I am using the C++ interface for motion planning in MoveIt! (ROS Melodic). For a particular trajectory (or plan), I observed that it is possible to extract joint positions, velocities etc. Also, it is possible to extract end-effector position and orientation for the current pose. But I want to monitor the positions and orientations through which the end-effector passes in the whole path/trajectory while reaching the final goal pose. This can require extracting all those orientation and position co-ordinates of the end effector for the whole trajectory (in the plan). Could you please mention the ways in which this can be possibly achieved?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-07-10 06:56:17 -0500

xibeisiber gravatar image

I guess you can you can use the member function of robot_trajectory::RobotTrajectory class to get the info of waypoints.

To convert the move_group plan to robot_trajectory::RobotTrajectory:

 moveit::core::RobotModelConstPtr robot_model=group.getRobotModel();
 robot_trajectory::RobotTrajectory trajectory(robot_model, planning_group);
edit flag offensive delete link more


Thank you for your suggestion.

I will check on how to get the information on position and orientation of waypoints from this trajectory. And then, I will try to implement it.

I will update about it over here.

KP_learner gravatar image KP_learner  ( 2020-07-11 12:37:03 -0500 )edit

Hey.. I tried out the above code snippet and the system did not show me any compile/run time error when I tried to extract robot state at different waypoints from the trajectory.

I checked the function documentation page, but I am not able to find the end effector position (co-ordinates) directly from the robot state. Hence, could you please tell me how that can be done?

(Please note: I am using ROS melodic)

KP_learner gravatar image KP_learner  ( 2020-07-18 09:58:03 -0500 )edit

Question Tools


Asked: 2020-07-09 09:28:29 -0500

Seen: 801 times

Last updated: Jul 10 '20