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

how can we execute a plan via motion planning interface in moveit?

asked 2018-12-17 00:40:55 -0600

MahShah gravatar image

updated 2018-12-17 01:40:43 -0600

gvdhoorn gravatar image

when we use movegroup interface we can execute a plan using


and in python movegroup intertace we use:

group = moveit_commander.MoveGroupCommander(group_name)
plan = group.go(wait=True)
group.execute(plan, wait=True).

how about when we use motion planning interface?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-12-17 05:26:05 -0600

fvd gravatar image

The Motion Planning API tutorial does not answer this, because it stops at visualizing the trajectory.

As commented in this question, you can still use the move_group's execute function with your own plan, for example like this:

// [(continued from the tutorial)...]  
moveit_msgs::MotionPlanResponse response; 

// Construct a move_group plan from the planned trajectory
moveit::planning_interface::MoveGroupInterface::Plan myplan;
myplan.trajectory_ = response.trajectory; 

Otherwise, my understanding is that you can use the interface of your robot/motors, most commonly a JointTrajectoryController advertising a FollowJointTrajectoryAction that you send your trajectory to.

edit flag offensive delete link more


that is right, thank you

MahShah gravatar image MahShah  ( 2019-02-14 23:38:23 -0600 )edit

thank you help me lots!

ddl_hust gravatar image ddl_hust  ( 2019-04-25 13:31:26 -0600 )edit

Question Tools



Asked: 2018-12-17 00:40:55 -0600

Seen: 2,001 times

Last updated: Dec 17 '18