mc_rtc::Configuration general purpose configurationThis guide will help you to create environments that are compatible with mc_rtc and other JRL/LIRMM softwares.
Surfaces are created and exported in Blender using the RSDF Surface Tool addon, which lets you create, visualize and export planar and cylindrical RSDF surfaces directly from a Blender mesh, with no need to hand-edit custom properties.

blender --command extension build inside it to produce the .zip yourself).zip fileOnce enabled, a new RSDF tab appears in the 3D View sidebar (press N to toggle the sidebar if it is hidden).
We will not go into the detail of modeling a 3D environment here. For the remainder of this documentation we will be working on a model with a large flat surface (named “ground”) with a vertical cylinder in the middle (named “pole”), matching the example shown in the animation above.
Make sure your model meshes have a unary scale. You can do so by applying the scale parameter of every objects in your scene:
For this first surface, we will create a surface corresponding to the ground.
A new, green, semi-transparent object appears immediately, matching the shape of the face(s) you selected, and a corresponding entry is added to the surface list in the sidebar. There is no more need to duplicate/separate the face, set a custom origin, or parent anything by hand: the addon computes the surface’s origin and orientation for you directly from the selected geometry.
Congratulations, you created your very first surface!
The following conventions are followed and recommended for most environments in mc_rtc:
Surfaces created by the addon are named “Surface_N” by default. Select the surface in the list and edit its Name field in the sidebar to rename it according to these conventions.
Some caveats apply when designing a planar surface.
When creating a contact between the surface you designed and another surface, mc_rtc will generate contact forces at the points of your surface. This means that the more points you put into a surface, the more variable will be added to the problem. Thus, it is best to keep your surface design simple (i.e. a single quadrilater), especially when you are designing a robot surface.
The points need to be co-planar otherwise the surface will not be usable.
In this section we will create a single cylindrical surface out of the “pole” object. The convention is that the local X-axis is the cylinder’s polar axis; the addon takes care of orienting the surface correctly for you, you no longer need to reason about local frames or apply manual rotations.
The addon fits a cylinder (center, axis, radius and width) to your selection and creates the corresponding green surface immediately, with its radius and width computed directly from your selected geometry.
Congratulations, you created your first cylindrical surface!
Unlike the previous, custom-property based workflow, the surface’s radius and width are regular numeric fields internally, so there is no risk of them being silently clamped to the [0, 1] range.
You no longer need a separate tool to export your environment’s bodies. Once your bodies are ready in Blender, the RSDF Surface Tool addon can export the whole environment as a ready-to-use ROS2 package.
This generates a full ament_cmake package with the following layout:
<package_name>/
package.xml
CMakeLists.txt
urdf/<robot_name>.urdf
meshes/<link_name>.stl
rsdf/<robot_name>.rsdf (if "Include RSDF Surfaces" is enabled)
launch/display.launch.py
launch/display.rviz
Every top-level mesh/empty object in the scene becomes a URDF link named after the object, and parent/child relationships become URDF joints. Mesh geometry is exported as STL in each object’s own local space, so it lines up with the joint origins.
By default, every joint is fixed. To make a joint movable, add custom properties to the child object:
joint property naming its type, plus the properties required for that type:joint value |
Meaning | Required properties | Optional properties |
|---|---|---|---|
revolute |
Bounded rotation around axis |
axis, lower, upper |
effort, velocity, name |
continuous |
Unbounded rotation around axis (e.g. a wheel) |
axis |
effort, velocity, name |
prismatic |
Sliding motion along axis |
axis, lower, upper |
effort, velocity, name |
axis: string "x y z", e.g. "0 0 1" to rotate/slide around Zlower, upper: floats, joint limits in radians (revolute) or metres (prismatic)effort: float, default 1000, max effort (N or N·m) reported in the URDF <limit> tagvelocity: float, default 1.0, max velocity (rad/s or m/s) reported in the URDF <limit> tagname: string, optional, overrides the joint’s name in the URDF (defaults to <link_name>_joint)If joint is omitted, the object gets a fixed joint. If joint is set but a required property for that type is missing, the export falls back to a fixed joint and reports a warning listing the missing property.
You don’t need to create collision hulls by hand: mc_rtc automatically generates convex hulls from the mesh-type collision geometries referenced in the URDF, regardless of how the robot or environment is loaded (env/object, json, or C++ RobotModule). See Automatic Convex Hull Generation in the “Integrate a new robot” tutorial for details on how this works and where the generated hulls are cached.
Once you are satisfied with your surfaces, click Export RSDF in the sidebar and choose a filename and location; if you forget the .rsdf extension it will be appended for you automatically.
mc_rtc looks for surfaces in a robot or environment’s <path>/rsdf/<name>/ directory, loading every *.rsdf file it finds there and merging their surfaces. Place your exported file(s) in that directory.
Every surface exported by the addon is currently attached to the body named base_link (this is a known current limitation of the addon, see its readme). If your environment or robot has several distinct bodies, open the exported .rsdf file and edit the link="..." attribute of each <planar_surface>/<cylindrical_surface> element so that it matches the actual body name (e.g. “ground” or “pole”) the surface belongs to.
See the tutorial about visualizing surfaces. You can also use the addon’s own Load RSDF button to re-import a .rsdf file into Blender at any time, to double-check that a surface’s position, orientation and type were exported correctly.
Make sure the origin of the object/face you selected in the Blender project corresponds to what you expect before clicking Add Plane/Add Cylinder.
Make sure the mesh normals are consistent (Blender’s face selection uses the face winding to determine orientation).
Make sure you are in Edit mode with at least one face selected on the active object before clicking the button.
To add a surface to a robot, follow the same steps as with an environment, but select faces on the robot body’s own mesh instead of an environment mesh, then export and place the resulting .rsdf file in the robot description’s rsdf/<robot_name>/ directory, making sure the link attribute of each surface matches the body it belongs to.