How can I execute a moveit_msgs::RobotTrajectory that I have on file?
I am trying to execute a RobotTrajectory on a MoveGroup that I have predefined. I have tried stuff like
group.execute(myRobotTrajectory)
and
trajectory_execution_manager::TrajectoryExecutionManager::push(myRobotTrajectory);
trajectory_execution_manager::TrajectoryExecutionManager::execute();
and
move_group::MoveGroupExecuteTrajectoryAction(myRobotTrajectory);
I think the last one is the closest, but it says that the action isn't recognized. Any tips?
Asked by Levi_Manring on 2018-07-12 11:52:30 UTC
Answers
Ok, so this is what I did to solve this issue.
I created a fake plan, then populated the .trajectory_
with my robot trajectory. Then I executed. Here is my code:
moveit::planning_interface::MoveGroup::Plan my_plan2;
my_plan2.trajectory_ = *myRobotTrajectory;
group.execute(my_plan2);
Asked by Levi_Manring on 2018-07-12 15:12:27 UTC
Comments
I tried executing a planned trajectory one more time using
move_group.execute(my_plan);
that was computed successfully, but the robot doesn't move in rviz, although in the terminal it says
Fake execution of trajectory
Completed trajectory execution with status SUCCEEDED ...
any tips? thanks
Asked by hooman on 2019-02-12 21:09:06 UTC
@hooman this is a Q&A site, not a forum. Please ask this as a new question and provide as many of the relevant details about your setup as you can. (ROS version, Robot type and version, any tutorials you're following or specific programs you're trying to run).
Asked by ahendrix on 2019-02-12 23:03:48 UTC
If you ask this as a new question, it will be seen by a much larger number of people and you're more likely to get a good answer.
Asked by ahendrix on 2019-02-12 23:04:25 UTC
thanks, I'll post a new question.
Asked by hooman on 2019-02-13 12:36:07 UTC
@hooman I am facing the same issue, did you figure it out ? Thanks
Asked by edote on 2020-04-24 12:37:10 UTC
Comments