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

Revision history [back]

click to hide/show revision 1
initial version

MoveIt's RViz display is mostly independent. The orange goal state corresponds to the goal state of the display only. There is no such thing as a "global goal state".

So actually you are looking for a way to tell the motion planning display to update the robot state it maintains as its goal state. Others asked for more general remote-control functionality of the whole motion planning display in the past. There is no satisfying implementation of this at the moment. Someone implemented a small part of it a while ago, but apparently lost interest. Since then, nobody provided patches to improve on the current state...

So this is what you can do out of the box:

If you check the "Allow External Comm." box in the planning tab, then you can send an std_msgs/Empty message to the /rviz/moveit/update_goal_state topic and the goal state will be set to the current state of the robot.

This is setup here: https://github.com/ros-planning/moveit/blob/kinetic-devel/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp#L212

and implemented https://github.com/ros-planning/moveit/blob/kinetic-devel/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame_planning.cpp#L430 .

It is pretty straight-forward and at most an afternoon of work to add another callback that receives a moveit_msgs/RobotState.msg and updates the start state or goal state with it.

A patch for this (and a pull-request for the moveit repository) would be awesome!