Skip to content

Robot Configurations

Cort edited this page Feb 5, 2022 · 7 revisions

Robot Configurator

  • In Gears, click "Robot -> Robot Configurator" (...or use this link)
  • It is recommended to start with an existing robot that is close to your desired configuration.
  • Select the part you want to edit from the component window on the left, and change it's parameters in the settings window on the right.
  • Some settings comes with both a slider and an input box. If you can't get the value you want using the slider, type into the input box instead.
  • Some rarely used options are only available by editing the JSON file. See the component's wiki page for a full list of options.
  • New parts can be added to the Body, ArmActuator, SwivelActuator, LinearActuator, WheelActuator, and WheelPassive only. Make sure one of them is selected before clicking "Add".
  • When satisfied with your custom robot, click "Robot -> Save to file". This will save a JSON file to your computer. You can then return to Gears and load this robot.

Start (JSON)

  • Click "Robot -> Select Robot" and choose the robot that is closest to your desired configuration. Click "Ok".
  • Click "Robot -> Save to file".
  • Open the saved file in your text editor or JSON editor.

Ignore

You can safely ignore these fields.

  • name, shortDescription, longDescription, longerDescription, thumbnail

Body and Wheels

These are the parameters for the main body. They do what their names suggests.

  • bodyHeight, bodyWidth, bodyLength

These are the wheels parameters.

  • These two should be obvious: wheelDiameter, wheelWidth
  • There's a small gap between the body and the wheel. This parameter controls the size of this gap: wheelToBodyOffset
  • bodyEdgeToWheelCenterY: Distance between center of wheel and the bottom of the body.
  • bodyEdgeToWheelCenterZ: Distance between the center of wheel and the front of the body.

These are for the rear caster.

  • casterDiameter: Diameter of the caster. If left blank, it'll default to be the same as the wheel diameter.
  • casterOffsetZ: Normally, the caster is flush with the back of the robot body. This option can be used to offset it forward or backwards.

These controls the physics parameters. The units do not have any significant meaning.

  • These controls the simulated mass: bodyMass, wheelMass
  • These controls the friction coefficient: wheelFriction, bodyFriction
  • casterMass and casterFriction has no effects.

Components

The "components" option specifies the sensors and actuators on this robot. Example:

 "components": [
    {
      "type": "ColorSensor",
      "position": [0, -1, 9],
      "rotation": [1.5707963267948966, 0, 0],
      "options": null
    },
    {
      "type": "MagnetActuator",
      "position": [0, -1, 3],
      "rotation": [0, 0, 0],
      "options": null
    }
  ]

This example contains two components; a Color sensor and an Electro-magnet. For most of the components in the pre-configured robot, "options" is set to null. This means to use the default configurations. You can read the wiki page for each sensor / actuator to find out what the default configurations is and change them if required.

The 3 numbers under "position" specifies the position of the component relative to the center of the robot body. Using "position": [0, 0, 0] will place the component inside the main body, and is generally not what you want.

The 3 numbers under "rotation" specifies the rotation of the component in radians. The first number is for the left-right axis, the second for the up-down axis, and the third for the forward-back axis. Some components cannot be rotated.

Components in Component

Some components (eg. ArmActuator and SwivelActuator) have their own "components" sections. Here's a simplified example, using the "Tow Truck" robot but with most of the sensors removed.

  "components": [
    {
      "type": "GyroSensor",
      "position": [-4, 2.5, 5],
      "options": null
    },
    {
      "type": "ArmActuator",
      "position": [0, 3, 4],
      "rotation": [0, 3.141592653589793, 0],
      "options": null,
      "components": [
        {
          "type": "MagnetActuator",
          "position": [0, -1.75, 8],
          "rotation": [0, 0, 0],
          "options": null
        }
      ]
    }
  ]

This example contains 3 components; a gyro, an arm actuator, and an electro-magnet.

The gyro and the arm actuator are within the main body's "components" section. This means that they are attached to the main body and will move and rotate together with the main body.

The electro-magnet is within the "components" section of the arm. This means that the magnet is attached to the arm and will move when the arm moves. The "position" and "rotation" is also relative to the arm rather than the main body.