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

Setting MoveIt Goal State in RViz

asked 2013-10-04 14:24:09 -0600

Peaches491 gravatar image

updated 2014-01-28 17:18:08 -0600

ngrennan gravatar image

I am looking to programatically move the orange goal state in MoveIt, but I cannot update the displayed goal state.

I can, however, create a goal state, and plan a path to it. The goal pose in the rviz window will never change. My current code is as follows:

global group group = MoveGroupCommander("left_arm")

global end_effector_link
end_effector_link = group.get_end_effector_link()

new_pose = group.get_current_pose().pose


new_pose.position.x = new_pose.position.x + 0.1
new_pose.position.y = new_pose.position.y - 0.1
new_pose.position.z = new_pose.position.z - 0.1

print('Setting Pose Target')
group.set_pose_target(new_pose, end_effector_link)

print('Planning position Target')

Is it possible to achieve my desired output with Python? Or would I have better luck using C++?

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-04 21:34:16 -0600

isucan gravatar image

You can use the RobotState plugin to display any of your own robot states:

edit flag offensive delete link more


Is there any such API for Python?

Peaches491 gravatar image Peaches491  ( 2013-10-05 11:38:37 -0600 )edit

Yes. The C++ API is just an example. You can write equivalent code in Python to publish RobotState messages and the robot would move as well. The RobotState class does not yet have Python bindings, but that is coming in the near future.

isucan gravatar image isucan  ( 2013-10-05 21:46:12 -0600 )edit

And what topic would I publish this robot state to? And how would I make MoveIt display that as my goal state?

Peaches491 gravatar image Peaches491  ( 2013-10-06 04:35:28 -0600 )edit

Question Tools



Asked: 2013-10-04 14:24:09 -0600

Seen: 2,119 times

Last updated: Oct 04 '13