Starting to use MoveIt with a custom Robot

3,323 views
Skip to first unread message

Emili Boronat

unread,
Jul 8, 2013, 1:11:11 PM7/8/13
to moveit...@googlegroups.com
Hi to every one!

Here I have a sort of handmade Robot I would add to work with ROS and Moveit! in orther to be hable to use kinect and other sensor inputs to coordinate this robot with another one yet to come. This one is a 4DoF for pick and place objects in a plane.

I have generate the urd file that seems to be correct. I runned the wizard moveit configurator and all went perfect. But I can not get it work with gazebo (first because the tutorials seems to be outdated a little from the current way to work of Gazebo). My plan was to work with simulations to test MoveIt! and learn how to use after with the real robot. But I don't get it. How i use MoveIt! wiht my robot? How was develpoed for PR2 for example.

I'm not hable to understant the structure of the docuemntation in orther to see where I can start, how test it and all this things. Maibe I miss some tutorial or how-to. But i really need a conceptually linked steps on how to start just having the model of the robot but not controllers. I do have, but I guess I need to make a sort of wrapper for Ros in orther send commands and public join status, so its like not having it.

In the Capabilitites there is a lot of explanation on which classes are used and what represent, but actually not found a explanation or example on how to use them in orther to plan trajectories for a robot.

I'm completly new at ROS and Moveit (throught i made most of the tutorials) so don't be to hard at me. All the help will be welcome. Rather than a big complete explanation probably the best will be a sort of schema on the process. So the steps I get stuck or don't understand i could ask help for. I just need to link and order the indeas that are already in the wiki.

Thanks in advance for your assistance and for the work done with this soft, seems very promising.

Cheers




Ioan Sucan

unread,
Jul 8, 2013, 2:48:29 PM7/8/13
to Emili Boronat, moveit-users
Hello Emili,

I have tried to put some documentation about this on the MoveIt! website instead of just replying:
http://moveit.ros.org/wiki/Executing_Trajectories_with_MoveIt!

However, I did not yet add documentation for the PR2 plugin, or the Simple MoveIt Controller Manager plugin. It shall be done soon :)
Let us know if you have further questions.

Ioan


Ioan Sucan

unread,
Jul 8, 2013, 2:49:27 PM7/8/13
to Emili Boronat, moveit-users
The url is with a bang (!) at the end. Somehow gmail excludes that from the link and it appears broken:
"http://moveit.ros.org/wiki/Executing_Trajectories_with_MoveIt!"

Acorn Pooley

unread,
Jul 8, 2013, 3:48:01 PM7/8/13
to Ioan Sucan, Emili Boronat, moveit-users
I added a redirect so the URL should work now with or without the !
-Acorn

Dave Coleman

unread,
Jul 8, 2013, 6:07:09 PM7/8/13
to Acorn Pooley, Ioan Sucan, Emili Boronat, moveit-users
I just added some more documentation on the simple_moveit_controller_manager plugin and on ros_control, though we hope to maybe merge these to projects down the line. 

:: dave | 251.463.2345 c

Emili Boronat

unread,
Jul 9, 2013, 11:47:21 AM7/9/13
to moveit...@googlegroups.com, Acorn Pooley, Ioan Sucan, Emili Boronat

Hi!

Thanks you all for the kick answer and doc publication. Was very helpfull to understand the whole process. So resuming, to make a robot work with MoveIt! you need to implement 2 things, the URDF file (to use the wizard) and the controller or controllers for the different groups that robot has. Right?

What i don't know if I understood is how this controller_manager and this controller_interface connects with my controller. What i was expecting to need was a msg handler for the trajectories emited by moveit running on my controller package.  I need to recognize that i'm also not a expert c++ software developer at this hight level, so I may ask very silly questions some times. And probably I'm not aware of things that are assumed on the tutorials. I was trying to revers enginering the pr2_controller to understand what is supposed to do the plug-in but is not that intuitive to me as I’m new to ROS to. But i get the intuition that what was happening there is that the actual robot controller is implemented as a actionlib server, awaiting for trajectory messages in pr2_msg formats so PR2 controller that where implemented earlier will understand them. Is that right?

But may I, as I'm implementing right away my wrapper controller, directly do it as a moveit! plug-in so no need to go through more complicated structures right? I mean for example, when a trajectory for the gripper arrive to controller manager, the handler it self will send right away to the hardware the position rising a new thread to control that execution(to not block the trajectory manager). Or better keep a separation between them and create as a different package and run standalone? Or may i'm reinventing the wheel and this is just what actionlib helps to?

Again thanks for the support, and for this great stack. I may apologize for my no so clear questions too, thought.

cheers!

El dimarts 9 de juliol de 2013 0:07:09 UTC+2, Dave Coleman va escriure:

Ioan Sucan

unread,
Jul 9, 2013, 12:14:20 PM7/9/13
to Emili Boronat, moveit-users, Acorn Pooley
On Tue, Jul 9, 2013 at 6:47 PM, Emili Boronat <e10...@gmail.com> wrote:

Hi!

Thanks you all for the kick answer and doc publication. Was very helpfull to understand the whole process. So resuming, to make a robot work with MoveIt! you need to implement 2 things, the URDF file (to use the wizard) and the controller or controllers for the different groups that robot has. Right?

Correct.
 
What i don't know if I understood is how this controller_manager and this controller_interface connects with my controller.
I am not sure what you mean by controller_interface.
 
What i was expecting to need was a msg handler for the trajectories emited by moveit running on my controller package.
If your controller can take messages as input (e.g., like the PR2 does), then this is what the moveit controller manager plugin does.

  I need to recognize that i'm also not a expert c++ software developer at this hight level, so I may ask very silly questions some times. And probably I'm not aware of things that are assumed on the tutorials. I was trying to revers enginering the pr2_controller to understand what is supposed to do the plug-in but is not that intuitive to me as I’m new to ROS to.
But i get the intuition that what was happening there is that the actual robot controller is implemented as a actionlib server, awaiting for trajectory messages in pr2_msg formats so PR2 controller that where implemented earlier will understand them. Is that right?

Yes
 
But may I, as I'm implementing right away my wrapper controller, directly do it as a moveit! plug-in so no need to go through more complicated structures right? I mean for example, when a trajectory for the gripper arrive to controller manager, the handler it self will send right away to the hardware the position rising a new thread to control that execution(to not block the trajectory manager).
You can certainly do that. It may make things easier.
 
Or better keep a separation between them and create as a different package and run standalone? Or may i'm reinventing the wheel and this is just what actionlib helps to?

If you do not need actionlib interfaces to the controller, you probably do not need to implement this separation.

 
Again thanks for the support, and for this great stack. I may apologize for my no so clear questions too, thought.

No worries!

Ioan

Emili Boronat

unread,
Jul 22, 2013, 11:20:05 AM7/22/13
to moveit-users
Ok, I'm here back again with controllers troubles. I was working in other parts of the robot like, the scene, get actually some real planing done, some visualizations and learning hot to use several classes. And get down that I declared completely wrong the controllers. Now is fixed and I’m using as suggested de moveit_simple_controller_manager. What happens here is that this need the joint trajectory action controller from robot mechanics controllers. But I don't know how to wake it up so my moveit setup starts correctly and connects to it.

Did I need to launch a specific node? I was no hable to find it in the package documentation neither on moveit.

Now I get stuck with:

MoveitSimpleControllerManager: Waiting for arm_controller/follow_joint_trajectory to come up
MoveitSimpleControllerManager: Action client not connected: arm_controller/follow_joint_trajectory


Thanks!
--
Emili Boronat


2013/7/9 Ioan Sucan <isu...@willowgarage.com>

Marcus Liebhardt

unread,
Jul 22, 2013, 8:59:42 PM7/22/13
to Emili Boronat, moveit-users
Hi Emili!

On Tue, Jul 23, 2013 at 12:20 AM, Emili Boronat <e10...@gmail.com> wrote:
Ok, I'm here back again with controllers troubles. I was working in other parts of the robot like, the scene, get actually some real planing done, some visualizations and learning hot to use several classes. And get down that I declared completely wrong the controllers. Now is fixed and I’m using as suggested de moveit_simple_controller_manager. What happens here is that this need the joint trajectory action controller from robot mechanics controllers. But I don't know how to wake it up so my moveit setup starts correctly and connects to it.

Did I need to launch a specific node? I was no hable to find it in the package documentation neither on moveit.

Now I get stuck with:

MoveitSimpleControllerManager: Waiting for arm_controller/follow_joint_trajectory to come up
MoveitSimpleControllerManager: Action client not connected: arm_controller/follow_joint_trajectory


You are supposed to launch your robot/arm controller in addition to MoveIt. Your controller needs to be an action server using the control_msgs/FollowJointTrajectory[1] action. Make sure you provide the right name and action namespace in MoveIt's controller configuration, e.g. controllers.yaml. 

Note that if your controller does not use an action namespace, you might need to do some fiddling around to get it working, since an empty namespace will be replaced by the default "follow_joint_trajectory". My configuration looked like this to get it working:

controller_list:
  - name: /my_robot_ns
    action_ns: arm_controller
    type: FollowJointTrajectory
    default: true
    joints:
      - torso_turn
      - torso_lift
      - shoulder
      - elbow
      - wrist

The namespace handling has recently been adjusted [2], but not yet released AFAIK.


Good luck!
Marcus

PS:In case you haven't read it already, take a look at [3] for more details about interfacing MoveIt with controllers.




--
Marcus Liebhardt 
Control Engineer
Yujin Robot
주소대한민국 서울시 금천구 가산동 345-30 남성프라자 #601, 153-023.
Address: Door #601, Namsung-Plaza, 345-30 Gasan-dong, Guemcheon-gu, Seoul, 153-023, Republic of Korea
Website: http://www.yujinrobot.com
Email: marcus.l...@yujinrobot.com
Phone: +82-70-46577073

Emili Boronat

unread,
Aug 26, 2013, 11:29:20 AM8/26/13
to moveit...@googlegroups.com, Emili Boronat
Hi Marcus,

Yeah, i had that intuition but get wrong the namespaces stuff. I had struggling again with the controller, writed the code and the action server but when it comes to connect with moveit i get a new error. I didn't know how to find if someone had it before.

I'm using the MoveitSimpleControllerManager as i have only a chain of joints to control. I finally get how to name correctly the nodes and action server to make moviet connect to it, but when it tries i get this surprissing error.

"Client [/myRobot_controller] wants topic /myRobot_controller/follow_joint_trajectory/goal to have datatype/md5sum [control_msgs/JointTrajectoryActionGoal/aee77e81e3afb8d91af4939d603609d8], but our version has [control_msgs/FollowJointTrajectoryActionGoal/8f3e00277a7b5b7c60e1ac5be35ddfa2]. Dropping connection."

I tried to use the last sources of the controller plugin instead of the .deb package to ensure it use the same version of the control_msgs::JointTrajectoryAction.h version as my recently writted controller. But i get the same error. Forcet to rebuild all the packages of my workspaces and ensured that the path to all packages are the versions i itend to use (the ones donloaded and build from source). Anything worked, I keep on getting the same error. Any one know what can't be producing it, or how to solve it?

As always; thanks for your advise and help!

cheers

El dimarts 23 de juliol de 2013 2:59:42 UTC+2, Marcus Liebhardt va escriure:

Marcus Liebhardt

unread,
Aug 26, 2013, 9:46:56 PM8/26/13
to moveit-users
Sorry, forgot the list.

---------- Forwarded message ----------
From: Marcus Liebhardt <marcus.l...@yujinrobot.com>
Date: Tue, Aug 27, 2013 at 10:46 AM
Subject: Re: Starting to use MoveIt with a custom Robot
To: Emili Boronat <e10...@gmail.com>


Emili,

On Tue, Aug 27, 2013 at 12:29 AM, Emili Boronat <e10...@gmail.com> wrote:
Hi Marcus,

Yeah, i had that intuition but get wrong the namespaces stuff. I had struggling again with the controller, writed the code and the action server but when it comes to connect with moveit i get a new error. I didn't know how to find if someone had it before.

I'm using the MoveitSimpleControllerManager as i have only a chain of joints to control. I finally get how to name correctly the nodes and action server to make moviet connect to it, but when it tries i get this surprissing error.

"Client [/myRobot_controller] wants topic /myRobot_controller/follow_joint_trajectory/goal to have datatype/md5sum [control_msgs/JointTrajectoryActionGoal/aee77e81e3afb8d91af4939d603609d8], but our version has [control_msgs/FollowJointTrajectoryActionGoal/8f3e00277a7b5b7c60e1ac5be35ddfa2]. Dropping connection."


The solution to your riddle is hiding the error above. It looks like your controller uses "control_msgs/JointTrajectoryAction" instead of the required "control_msgs/FollowJointTrajectoryAction".

Changing your code to use the required action type should solve your problem.
Let us know, if it doesn't!

Best,
Marcus

Emili Boronat

unread,
Aug 27, 2013, 5:40:06 AM8/27/13
to Marcus Liebhardt, moveit-users

Oh man! Youre right... Just to many hours working on it. I did not noticed the 'follow' part missed on my code... I was following the followJointAction package as example. What a shame. Time to test the robot i guess.

Thanks a lot for youre help!

El 27/08/2013 3:46, "Marcus Liebhardt" <marcus.l...@yujinrobot.com> va escriure:
Reply all
Reply to author
Forward
0 new messages