Posts Tagged ‘Modelling’

Robot modelling formats for simulation

Several XML-based formats have surfaced over the years that can be used to describe a robot.

Apart from URDF (and SRDF) of ROS origin, the Gazebo simulator has been promoting SDF (an evolution of URDF with emphasis on physics simulation), while MJCF apart from being available as URDF extensions, also has its own format with an XML schema for validation and more advanced simulation features (e.g. tendons).


Also related, units of measurement in ROS:

SRDF format that is mentioned at is also related (adds Semantics like kinematic chain definition etc). As explained there it is combined with URDF in describing a robot:

This does not replace URDF, and is not an extension of URDF.

This is a format for representing semantic information about the robot structure.

A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined

SDF (Gazebo) (various SDF models in XML) (Converting from URDF to Gazebo) (tutorial for simple gripper in SDF)

Gazebo seems to be using ODE (Open Dynamics Engine), so these are related too: (see images for Joint types) (ERP & CFM constraint parameters)

MJCF (MuJoCo) (MuJoCo 1.50 was released on April 23, 2017. Student licenses are now free) (MJCF is an advanced format but some of its functionality is also available as URDF extensions) (MuJoCo has constraints like Connect/Weld/Joint/Tendon/Distance) (see paragraph «B. Elements of a MuJoCo model»)

URDF to MJCF conversion is possible (related sample available for MuJoCo):

There is ongoing work at Bullet Physics engine to import MJCF, as mentioned at:

Thus, they have collected various MJCF models (XML):

Suggestion: on Duck Typing and C#/.NET

My comment at:

It would be nice indeed if one could define at the client object’s side a static interface that is a subset of the methods of a server (or serving if you prefer) object (it is only the view of the server that the client has gained knowledge of) that has been passed on to the client

Then there could be a service (a facility I mean) that accepts the server object instance and the interface the client has defined (the duck type) and case the server object to that interface by CHECKING that the duck interface is indeed a subset of the methods the server object implements

the check if our duck interface is indeed covered by what the object to be duck-typed offers can be implemented via reflection already

the implementation could be hacked by spitting out a new object (bytecode generation) that wraps each property/method of the object to be duck-typed and calls into the original object, but it would be much better if there was support in the compiler for that (viewing an object via an interface that is compatible to it in functionality, not in strong typing concept)

…when I say support in the compiler, I mean to avoid the proxying layer (of course security should also be considered carefully when implementing such a thing, in case there are pitfalls)


A very interesting article on the subject showing how to do DuckTyping in .NET is:


Not sure if in the time that has passed (5 years) there have been any DuckTyping-specific additions at C#/.NET

Suggestion: Add support for constants in C# (and etc.) interfaces

It is rather unfortunate that C# doesn’t support constants in interfaces, whereas Java does.

If IL (intermediate language) that C# usually compiles to (when not using AOT that is like in .NET Native or Xamarin iOS) doesn’t support this, then the compiler could create a special sealed class to carry the constants.

Then, wherever they’re used via the interface it could get them via that class. This would happen internally without the programmer noticing. The programmer should be able to access the constants using:


SomeClass.SomeConstant, where SomeClass implements ISomeInterface

just SomeConstant when the code is inside the body of SomeClass that implements the ISomeInterface

just SomeConstant when there is a “using static” statement (that newer C# has introduced) like “using static ISomeInteface” or “using static ISomeClass”


You can vote up this suggestion at:

%d bloggers like this: