Ask Your Question
0

URDF alternative of SDF revolute2 joint type

asked 2014-03-11 11:31:25 -0500

MadEgg gravatar image

updated 2016-10-24 09:00:14 -0500

ngrennan gravatar image

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 <inertial> part with a <mass> 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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-03-11 17:18:10 -0500

fergs gravatar image

"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...

edit flag offensive delete link more

Comments

Thanks. It indeed a nice solution to wrap an entire <link> in a <gazebo></gazebo> 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!

MadEgg gravatar image MadEgg  ( 2014-03-12 15:58:54 -0500 )edit

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.

mrmcsirguy gravatar image mrmcsirguy  ( 2015-04-01 02:13:18 -0500 )edit

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!

MadEgg gravatar image MadEgg  ( 2015-04-01 03:50:59 -0500 )edit

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.

mrmcsirguy gravatar image mrmcsirguy  ( 2015-04-06 02:31:04 -0500 )edit

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?

shengnan gravatar image shengnan  ( 2016-07-05 08:00:49 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2014-03-11 11:31:25 -0500

Seen: 1,906 times

Last updated: Mar 11 '14