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

Using Moveit! to actually control a robot

asked 2013-09-29 06:11:26 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hey Guys,

First of if the authors of Moveit! gets a chance to read this post, I just want to say thanks and congratulate them on a great piece of software which opens up lots of opportunities as researchers to work with a robot easily and effectively.

I am currently running Moveit! 0.4 alpha with ROS Groovy on Ubuntu 12.04. We had a new robot from Meka Robotics that I am trying to get Moveit! to work on. I followed the first two quick start tutorials on the Moveit!: setup assistant and rviz plugin. Both of them worked without any problems and I am able to "plan" and see the animation of either the arms, base, zlift (specific to the meka) move. However, when I came to the gazebo part, I could not get it work, primarily because as of now there is no gazebo model for the meka robot and also gazebo just would not start for some reason. I have decided to bypass the gazebo part for now and go directly to controlling the robot. Even for this I'm guessing I would need to setup the controllers.yaml and a controller_manager.launch for my robot. I was hoping I could get some help on that.

If I understand Moveit! correctly, the way it works is it plans and publishes the "plan" to some topics and I would have to write some code to subscribe to that and get it to the controllers for the robot. Please let me know if my understanding is incorrect. Is there instructions or tutorials or even examples of working code that shows how to do the entire pipeline: plan, publish to robot, execute by the robot etc and how we can customize this to our own robot? If someone can point me to the correct direction I would be very grateful.

Thanks for your time.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-09-29 09:18:55 -0500

fergs gravatar image

updated 2013-09-29 09:19:45 -0500

MoveIt uses a controller manager plugin to turn it's internal plans (of type moveit_msgs::RobotTrajectory) into some form of output that robots actually understand.

The most widely used plugin is the MoveItSimpleControllerManager, which is found in moveit_plugins ( This plugin turns the RobotTrajectory into a call to a control_msgs/FollowJointTrajectoryAction action server. If you already have a FollowJointTrajectoryAction action server, setup pretty much consists of entering your joint names and the namespace of the action server to a controllers.yaml and loading that yaml file.

If you don't have the standard FollowJointTrajectoryAction, you will either have to implement that action in your robot drivers/controllers, or create a new plugin that publishes the non-standard topics/actions you are using.

There are several examples of controllers.yaml with the simple plugin, which are found in moveit_robots package ( I'm going to avoid posting those here, as copied code here is likely to eventually go out of date.

edit flag offensive delete link more


The manufacturer's controller code lists and subscribes to some ROS topics that when published to will move the robot. I think creating a new plugin that takes the result produced by Moveit! and publishes to these topics would work. Is there any documentation on how to do this or something similar?

Sudarshan gravatar image Sudarshan  ( 2013-09-29 09:58:35 -0500 )edit

Best documentation is probably to read/modify an existing plugin. The interface for the plugin is well defined by it's API, the RobotTrajectory message is also pretty well defined.

fergs gravatar image fergs  ( 2013-09-29 10:31:35 -0500 )edit

I've a similar sort of question though not specific to MoveIt! So the program that interfaces to the hardware just has to present a FollowJointTrajectoryAction server to the simple CM in order to use moveit?

PeterMilani gravatar image PeterMilani  ( 2013-09-29 19:45:38 -0500 )edit

Generally speaking there are several levels of "standard" interface available. One of the upper layers is the ROS messages/actions themselves -- and FollowJointTrajectoryAction is a very standard one to use indeed. A layer lower would be whatever interface ros_control uses internal.

fergs gravatar image fergs  ( 2013-09-29 21:30:26 -0500 )edit

Please forgive me for the trivial question. To implement a FollowJointTrajectoryAction server I can follow the tutorial here: Essentially will this "action server" will set inbetween the robots controller topics and moveit's planning mechanism? Thanks!

Sudarshan gravatar image Sudarshan  ( 2013-09-30 01:32:48 -0500 )edit

The repository has moved and the new link is

tobiasfeil1993 gravatar image tobiasfeil1993  ( 2017-11-27 07:24:46 -0500 )edit

answered 2013-10-02 00:14:37 -0500

Adolfo Rodriguez T gravatar image

If your robot is compatible with ros_control, there is a readily available implementation of a controller exposing the FollowJointTrajectory interface. It lives in the joint_trajectory_controller package.

edit flag offensive delete link more


Unfortunetly, I am currently limited to running ROS Groovy on Ubuntu 12.04 and it is my understanding that ros_control is only available for ROS Hydro. If ros_control is available for ROS Groovy, I would definitely explore it.

Sudarshan gravatar image Sudarshan  ( 2013-10-02 01:17:31 -0500 )edit

There was some discussion about doing a Groovy backport, but I believe it has not been done yet. Also, it would have to be pushed forward by the interested parties, as it would not be officially supported.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2013-10-02 02:00:08 -0500 )edit

ros_control can easily be installed from source in groovy, see example in the gazebo tutorial here:

Rasmus gravatar image Rasmus  ( 2013-10-04 01:57:52 -0500 )edit

Question Tools



Asked: 2013-09-29 06:11:26 -0500

Seen: 9,892 times

Last updated: Oct 02 '13