Skip to content

Adding a New Robot

Fabien Rohrer edited this page Mar 11, 2019 · 23 revisions

In order to guarantee a homogeneous overall quality, several steps have to be fulfilled when adding a new robot to the Webots main repository. This page lists theses steps.

In illustrate this documentation, let say that the fictional robot to be added is named iCobra 22 and is developed by the Snake Logistics company.

General Considerations

  • The new robot should be defined as a PROTO node.

Files, Directories and Name Convention

  • File and directory names should be written in Snake case.
  • PROTO names should be written in Camel case. Dashes can be added if they help to understand better the robot name.
  • The new directory should be added in the projects/robots/COMPANY/ROBOT_NAME directory and fulfill the standard file hierarchy.

For example:

$WEBOTS_HOME/projects/robots/snake_logistics/i_cobra_22/controllers/i_cobra_22/
$WEBOTS_HOME/projects/robots/snake_logistics/i_cobra_22/protos/ICobra22.proto
$WEBOTS_HOME/projects/robots/snake_logistics/i_cobra_22/protos/icons/ICobra22.png
$WEBOTS_HOME/projects/robots/snake_logistics/i_cobra_22/worlds/i_cobra_22.wbt

Expected PROTO Header

  • The PROTO header should contain a description of the robot.

For example:

#VRML_SIM R2019a utf8
# license: Copyright Cyberbotics Ltd. Licensed for use only with Webots.
# license url: https://cyberbotics.com/webots_assets_license
# documentation url: https://www.cyberbotics.com/doc/guide/i-cobra-22
# The "iCobra-22" is a robot developed by "Snake Logistics": https://snake-logistics.com/icobra

PROTO ICobra22 [
  field SFVec3f    translation     0 0 0        # Is `Transform.translation`.
  field SFRotation rotation        0 1 0 1.5708 # Is `Transform.rotation`.
  field SFString   name            "iCobra 22"  # Is `Solid.name`.
  field SFString   controller      "i_cobra_22" # Is `Robot.controller`.
  field SFString   controllerArgs  ""           # Is `Robot.controllerArgs`.
  field SFString   customData      ""           # Is `Robot.customData`.
  field SFBool     supervisor      FALSE        # Is `Robot.supervisor`.
  field SFBool     synchronization TRUE         # Is `Robot.synchronization`.
  field MFNode     extensionSlot   []           # Extends the robot with new nodes located in the body center.
]
{
  Robot {
    translation IS translation
    rotation IS rotation
    controller IS controller
    controllerArgs IS controllerArgs
    customData IS customData
    supervisor IS supervisor
    synchronization IS synchronization
    name IS name
    model "Snake Logistics' iCobra 22"
    # ...
    children [
      Group {
        children IS extensionSlot
      }
      # ...
    ]
  }
}

Expectation on Released Worlds

...

Main Build System

...

Documentation

...

Helper Scripts

Icon Studio

...

Web Component Studio

...

Clone this wiki locally