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
Name | Description | Type | Default |
---|---|---|---|
class | The class name for the module; must be "GLRobotSimulator". | string | |
name | The name of this instance of the module. | string | |
locomotion_speed | Speed of the robot | float | 10 |
rotation_speed | Speed of the robot | float | 0.1 |
arm_length | How far the arm can reach (mm) | float | 300 |
charging_station | Location of the charging station | array | 1475 225 |
view_radius | Size of the visual field (mm) | float | 300 |
battery_decay | Decay of battery charge for each tick when something is done | float | 0.0001 |
auto_stack | Automatically place a block on top of another r(ather than inside) | bool | false |
Module Connections
Inputs
Name | Description |
---|---|
OBJECTS_IN | The object list input |
MOVE_BLOCK | New 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_ATTENTION | This input is not available in the physical robot and can currently only be used by the user interface. |
GOAL_LOCATION | Location to move to (x, y, z, r). Array of size 4. Units: mm and degrees. z should always be 0. |
SPEED | Movement speed of the robot (0-1) |
LOCOMOTION_TRIGGER | Start locomotion |
PICK_OBJECT_ID | Id of object to pick |
PICK_OBJECT_TRIGGER | Start picking object |
PLACE_OBJECT_LOCATION | Where to place the object (x, y, z, r). Array of size 4. Units: mm and degrees. |
PLACE_OBJECT_TRIGGER | Start placing object |
CHARGE_BATTERIES | Start charging |
DIRECT_CONTROL | Low level control of locomotion (dx, dy, dz, dr). Array of size 4. Units: mm/tick and degrees/tick. dz should always be 0. |
Outputs
Name | Description |
---|---|
OBJECTS_OUT | The object list output with filled in camera matrices |
BLOCKS | Positions of all blocks in the world: (x, y, z, r, id, color) |
LANDMARKS | Positions of all landmark markers in the world (x, y, z, r, id, color) |
CHARGING_STATION | Position of the charging station |
VIEW_FIELD | Region visible to the camera (circular) |
TARGET | The current target location for a pick or place operation. For visualization only. |
RANGE_MAP | Range 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_COLOR | Color 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_VIEW | Positions of blocks that are currently seen: (x, y, z, r, id, color), colors: 1=gray, 2=blue; 3=red; 4=green |
ROBOT_LOCATION | Positions of robot in the world (x, y, z, r) |
SPEED_OUT | Current movement speed of the robot (0-1); same as SPEED input |
BATTERY_LEVEL | Indicates how charged the battery is |
LOCOMOTION_PHASE | Phase 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_PHASE | Phase 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_PHASE | Phase 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_PHASE | Phase 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_ERROR | Can not go to specified location. Set as a result of goal location that cannot be reached. Remains set until new location is given. |
PICK_ERROR | Can not pick object. Set as a result pick input that cannot be performed. Stays on until a new pick operations is tried. |
PLACE_ERROR | Can not place object. Stays on until new command is received. |
CHARGE_ERROR | Can 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