Rosanswers logo

For our robot we had a Gazebo model built in SDF. The real robot has two unpowered omniwheels. In the SDF model, these omniwheels were modelled as a ball joint: a sphere with the radius of the omniwheel and two axes of rotation around the X and the Y axis. This worked perfectly and allowed the robot to move freely in simulation as it does on the real robot.

SInce we are now trying to integrate with MoveIt, the need has risen to use URDF instead of SDF. However, the revolute2 joint type is not supported by URDF, for reasons unclear to me. The alternative that is usually suggested is to use two chained revolute joints by the use of a virtual link.

First of all, the virtual link needs physical properties: if it does not have a part with a element, it will just be completely omitted by gzsdf. What physical properties can I attribute to a non-existing virtual joint?

Then, if I just make up some value for mass and set up the joint to have 2 chained axes of rotation, it kind-of works. But not completely, and not equal to how the revolute2 joint did. The problem is that whenever a movement is initiated in a direction that does not align with one of the two chained axes of the omniwheels, it will behave like a caster-wheel: it will move sideways a bit until it is in the appropriate orientation. This means unpredictable movement that does not occur on the real robot. This also did not occur when using the revolute2 joint types in Gazebo.

So now I'm stuck. I really do not feel like maintaining an SDF and an URDF version of the model. However, URDF seems to have discarded revolute2 as a valid joint type (even if it is directly supported by the SDF format to which it converts, which is the only thing that I want as the only thing that matters here is avoiding the friction or imbalance by fixing or leaving out the omniwheels).

One possible, but very complex method would be to make an accurate model of the omniwheels and add a separate joint for each roller. However, this would result in an additional 40 joints (2 2-layered wheels with 10 rollers) and I doubt this will be beneficial for the performance of Gazebo.

Any insights on how to fix this would be greatly appreciated.

Originally posted by MadEgg on ROS Answers with karma: 43 on 2014-03-11

Post score: 0


1 Answer 1


Rosanswers logo

"Unpowered omniwheels" are not really going to be useful to MoveIt (or ROS even), and so you probably only need them for simulation. Within MoveIt, you probably only need rough collision data (and if your arm can't hit the wheels, then even that may not be necessary).

I think what you are actually looking for with MoveIt is to create a virtual link which is "planar" type for the mobile base itself. Presumably you have a controller which, given a plan for where to move the mobile base, can control the powered wheels.

Now, as to how you would do this without maintaining both the URDF and SDF, I'm not entirely sure. In the past, I have used XACRO to add simulation-only things (such as sensor plugin XML blocks) to an existing URDF, thereby creating the "simulation-ready" URDF. I'm not sure how the URDF->SDF converter actually works -- perhaps it will simply pass a SDF block through without trying to convert it? It would be a bit of a hack, but it might work...

Originally posted by fergs with karma: 13902 on 2014-03-11

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by MadEgg on 2014-03-12:
Thanks. It indeed a nice solution to wrap an entire in a element so that it gets passed through as-is. This makes it so that it is completely ignored in MoveIt!, which indeed has no reason to have it. In Gazebo I can now use the revolute2 joint ype again!

Comment by mrmcsirguy on 2015-04-01:
I'm in a similar situation. I am trying to make joints for a neck and arms that would require at least 2 DOF. But when I try to wrap a link in a gazebo element, gazebo cannot see it at all and the simulation fails to load. Maybe since I'm using xacro? Any help would be greatly welcomed.

Comment by MadEgg on 2015-04-01:
I don't know why it does not work for you. However, we are also using xacro for the omniwheels. The omniwheels are contained in a separate file, omniwheels.urdf.xacro, of which I have posted the contents on: http://pastebin.com/1xvNZ58r

Hope this helps!

Comment by mrmcsirguy on 2015-04-06:
Thanks for the help, but it still seems the link doesn't appear at all. Gazebo also recognizes the next link as a new root so the model can't load. I'll keep trying.

Comment by shengnan on 2016-07-05:
Hi, when i use the revolute2 joint type, i got confused that how can i control axis1 or axis2 rotate? I use the URDF file and reference as gazebo tags to define the joint , and then i try to use gazebo-ros-control to control the revolute2 joint, but how can i define which axis i want to control?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.