User manual

old releases - latest release - trunk

Bumpers

The type identifier for bumper sensors is bumper.

Bumpers visualize collisions by changing the color of all child objects.

Input data

Bumpers take a single boolean as input, where true denotes a collision.

Parameters

The parameter's type is shown in parantheses after the parameter name.

active_color (color)
The color to use to indicate collision.
Default: (1,0,0)

Examples

Below is an example of how to define a bumper in your robot definition file:

 <sensor type="bumper">
   <name>bumper1</name>

   <transform>
     <translate system="world">0.12 0 0</translate>
   </transform>

   <children>
     <cube>
       <scale>0.02 0.1 0.05</scale>
     </cube>
   </children>

   <params>
     <color name="active_color" r="0.8" g="0" b="0"/>
   </params>
 </sensor>

In the client, feed the sensor data by doing:

 bool bumper_collision = ...;
 peekabot::SensorData s;
 scan.write(bumper_collision);
 proxy.set_sensor_data(handle_to_your_sensor, s);