ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

How to control the 'ghost' in MoveIt's Rviz MotionPlanning plugin from code?

asked 2018-06-21 08:57:11 -0600

Tim Stadtmann gravatar image

updated 2018-06-22 03:39:19 -0600

Hi guys,

I am fairly new to MoveIt's MotionPlanning API. When adding the MotionPlanning plugin to rviz, a 'ghost' of the controlled robot arm is spawned, along with an interactive marker that can be used to drag it around. Is there also a way to control the ghost (the end effector and the joints) in a cpp node? Can the joint states of this ghost be read out somewhere?

Edit: Thanks for the answers, sangfuu and smac. I already checked the tutorial and the move_group API, but I think they don't exactly have what I need. If I understand correctly, the only way to move the ghost is to set a target (setPoseTarget, ...) and then plan the trajectory. That will result in the ghost moving along the trajectory to the goal. On the other hand, I want to directly control it with an input device other than the interactive marker, without any planning (for now). But maybe I missed something, I'll check the api more thoroughly..

Cheers, Tim

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2018-06-22 04:04:54 -0600

gvdhoorn gravatar image

updated 2018-06-22 04:16:50 -0600

The 'ghost' is actually the current state of the robot, you cannot 'control' that in a meaningful way.

What you can do is publish JointState messages which it will then visualise (but please don't do that, it's really just for visualising state of your robot, not a generic visualisation tool).

The other partly transparent robots are the start and end states respectively. They are used for interfacing with the MoveIt motion planners.

However I'm unsure what you're actually trying to do. If you could tell us that (and avoid an xy-problem), then we could perhaps help you better. Are you looking for jogging functionality?


What does exist is a joystick interface to MoveIt to control the interactive marker. See Joystick Control Teleoperation.

edit flag offensive delete link more

Comments

With 'ghost' I meant the transparent end state, sorry for the misunderstanding. I want to be able to control this end state not only with the interactive marker, but with arbitrary input devices (e.g. joystick, spacemouse, keyboard, ...).

Tim Stadtmann gravatar image Tim Stadtmann  ( 2018-06-25 09:06:54 -0600 )edit

While doing that, I want to continuously record either the end effector poses or the joint states of the ghost, to get this 'manually planned' trajectory. Afterwards, this trajectory will be sent to the robot arm which is simulated in Gazebo.

Tim Stadtmann gravatar image Tim Stadtmann  ( 2018-06-25 09:10:08 -0600 )edit

So currently I don't actually use MoveIt motion planning. I just wanted to implement a ghost controlled robot arm and I thought, it might be faster to use MoveIt's functionality to spawn a second, transparent arm that is not simulated, but rather sets the joints directly.

Tim Stadtmann gravatar image Tim Stadtmann  ( 2018-06-25 09:15:48 -0600 )edit

So this is an xy-problem then.

Could you update your original question text with this?

gvdhoorn gravatar image gvdhoorn  ( 2018-06-25 10:16:20 -0600 )edit
0

answered 2018-06-22 03:31:07 -0600

sangfuu gravatar image

Check this tutorial. There is all you need there: http://docs.ros.org/kinetic/api/movei...

edit flag offensive delete link more
0

answered 2018-06-21 12:42:38 -0600

Check the MoveIt! API, what you're looking for is likely move_group

http://moveit.ros.org/code-api/

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-06-21 08:57:11 -0600

Seen: 308 times

Last updated: Jun 22 '18