Component editor tutorial 1: Simumatik logo

Content

Datamodel

The Simumatik datamodel is an abstraction based on URDF and SDF that declare the elements, properties, and structure that give life to a component. It provides the users with simple blocks to create any component and it defines the rules that make a component valid, making sure it is compatible with the platform.

Simumatik components are defined in XML files by using the generic blocks of the datamodel. They follow a tree structure, where different elements will have as children the related properties. Manually editing this file requires a really good knowledge of the datamodel. Therefore, the Component Editor is a huge help.

Component editor

The component editor allows users with a paid subscription to easily create new components. It allows defining the component metadata (such as name, description, etc), assets (3d-models, scripts, etc), and structure (visuals, collisions, joints, etc).

Its main goal is to ease the component creation by helping the user to define everything needed in a visual way, without any code involved. For that purpose, the component structure is defined as a tree, where you can modify any property and add/remove new elements directly from there.

New component

Let’s start by creating a new component in the Library page. If you don’t know how to do it, please take a look at Creating a new component.

Once the Component Editor is shown, switch to the EDITOR tab. As you can see, a component has by default just a base_link element, which you can think of as a body. Anybody will need to have defined at least the way it looks (visual). At the same time, the visual will need a position in the space (origin) and a geometry.

In the following tutorials, we will be adding more elements to our body (base_link), such as multiple visuals, inertia, a surface, etc. Moreover, we will also add multiple bodies to a component, connecting them together with joints.

Modify visual

We are going to use a 3D model of the Simumatik logo, which you can download by clicking here. In Simumatik, 3D imported models are called mesh, and currently, the only supported standard is the glb file format. They could be as simple as a box, or as complex as a car.

If you want to use your own CAD model, see if there is an option to export it as .glb directly. Otherwise, the model can first be exported to a format that is supported by Blender (free software for 3D modeling), and then exported from Blender as a .glb file. Keep in mind that if the model is complex, it is a good idea to first simplify it by using some of the built-in tools in Blender.

Let’s start by moving back to the COMPONENT INFORMATION tab for uploading the Simumatik logo to assets. Take a look at Uploading assets to learn how to do it.

Next, switch again to the EDITOR tab. Expand everything in the tree until the geometry is visible, as in the above picture, then right-click it to get the available options. Let’s select now the mesh.

The mesh element has as children a model element, which will link an asset to the visual, and a scale, in order to change the visual size. Let’s select the model element and then click on the Value field below to modify it.

A pop-up window will appear with a drop-down list, select it. A model name will be shown in the list. Pick the asset that we uploaded earlier and then click OK.

 

Your Simumatik logo is now finished! Let’s take a screenshot of your newest component and save it.