GLRobotSimulator

This module simulates the robot developed within the EU-funded project Goal-Leaders. It is intended as a testbed for code that will later be ported to the robot. Only minimal functionality is supported, but all inputs and outputs are identical to that for the physical robot. There are also additional inputs and outputs that supports an interactive user interface for the simulator. There are no obstacle detector or constraints on movements. No physical constrains are checked on object placements.

Example XML definition

A simple example

  <module
      class = "GLRobotSimulator"
      name = "GLRobotSimulator"
  />

Parameters

NameDescriptionTypeDefault
classThe class name for the module; must be "GLRobotSimulator".string
nameThe name of this instance of the module.string
locomotion_speedSpeed of the robotfloat10
rotation_speedSpeed of the robotfloat0.1
arm_lengthHow far the arm can reach (mm)float300
charging_stationLocation of the charging stationarray1475 225
view_radiusSize of the visual field (mm)float300
battery_decayDecay of battery charge for each tick when something is donefloat0.0001
auto_stackAutomatically place a block on top of another r(ather than inside)boolfalse

Module Connections

Inputs

NameDescription
OBJECTS_INThe object list input
MOVE_BLOCKNew position and id for object to move (x, y, z, r, id). Input that will immediately move a block with a particular id to the specified location. No constraints are checked. r is currently ignored. This input is used to manipulate the world for example from a user interface.
PICK_OBJECT_SPATIAL_ATTENTIONThis input is not available in the physical robot and can currently only be used by the user interface.
GOAL_LOCATIONLocation to move to (x, y, z, r). Array of size 4. Units: mm and degrees. z should always be 0.
SPEEDMovement speed of the robot (0-1)
LOCOMOTION_TRIGGERStart locomotion
PICK_OBJECT_IDId of object to pick
PICK_OBJECT_TRIGGERStart picking object
PLACE_OBJECT_LOCATIONWhere to place the object (x, y, z, r). Array of size 4. Units: mm and degrees.
PLACE_OBJECT_TRIGGERStart placing object
CHARGE_BATTERIESStart charging
DIRECT_CONTROLLow level control of locomotion (dx, dy, dz, dr). Array of size 4. Units: mm/tick and degrees/tick. dz should always be 0.

Outputs

NameDescription
OBJECTS_OUTThe object list output with filled in camera matrices
BLOCKSPositions of all blocks in the world: (x, y, z, r, id, color)
LANDMARKSPositions of all landmark markers in the world (x, y, z, r, id, color)
CHARGING_STATIONPosition of the charging station
VIEW_FIELDRegion visible to the camera (circular)
TARGETThe current target location for a pick or place operation. For visualization only.
RANGE_MAPRange to objects around the robot. Array of 32 distance measurements around the robot from left to right going all the way around the robot. Elements 15 and 16 point forwards relative to the robot. Distance to closest object is in in mm
RANGE_COLORColor of the closest object in the range map. Array of 32 colors corresponding to each measurement in the range map. Colors: 0=background, 1 = gray, 2 = blue, 3 = red, 4 = green
BLOCKS_IN_VIEWPositions of blocks that are currently seen: (x, y, z, r, id, color), colors: 1=gray, 2=blue; 3=red; 4=green
ROBOT_LOCATIONPositions of robot in the world (x, y, z, r)
SPEED_OUTCurrent movement speed of the robot (0-1); same as SPEED input
BATTERY_LEVELIndicates how charged the battery is
LOCOMOTION_PHASEPhase of locomotion (park arm, turn, move, turn, finished). Array of size 5. Single non-zero element indicates the current phase. When locomotion trigger is activated, the stimulated robot will go through the five phases and move to the new location. No physcial constraints are checked. The roboot may pass through obstacles.
PICK_PHASEPhase of pick operation (move, down, close, up, finished/holding). Array of size 5. Single non-zero element indicates the current phase. When the robot is instructed to pick an object by sending it the ID of the object to pick (PICK_OBJECT_ID below) and PICK_OBJECT_TRIGGER is activated, it will go through these five phases and pick up the object. This only works if the robot can see and reach an object with the specific ID.
PLACE_PHASEPhase of place (move, down, open, up, finished). Array of size 5. Single non-zero element indicates the current phase. When the robot is instructed to place an object by setting location for the object (PLACE_OBJECT_LOCATION below) and activating PLACE_OBJECT_TRIGGER, it will go through these five phases and place the object. This only works if the robot is holding an object and can reach the target location without moving. No physcial constraints are checked. The robot will happily place an object in mid air or inside another object
CHARGE_PHASEPhase of charging (charging, finished). Array of size 2. Single non-zero element indicates the current phase. Phases the robot will go through when CHARGE_BATTERIES is set to 1. This will only work at the charging location
LOCOMOTION_ERRORCan not go to specified location. Set as a result of goal location that cannot be reached. Remains set until new location is given.
PICK_ERRORCan not pick object. Set as a result pick input that cannot be performed. Stays on until a new pick operations is tried.
PLACE_ERRORCan not place object. Stays on until new command is received.
CHARGE_ERRORCan not charge. Set to 1 if the robot attempts to charge when it is not at the charging location.

Author

Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science

Files

GLRobotSimulator
GLRobotSimulator
GLRobotSimulator
GLRobotSimulator.ikc

blog comments powered by Disqus