URDF alternative of SDF revolute2 joint type
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.