Sensor Protocols

Distance Sensor

/sensor/distance/{robotID}/?

Source Simulator
Destination Robot ( Physical | Virtual )
Data Type String
Message Format ?
Description This will request distance sensor readings from a robot. Typically used by the Simulator or Sandbox.

robotID: Robot ID

/sensor/distance/{robotID}

Source Simulator
Destination Robot
Data Type String
Message Format {distance}
Description Simulator will inform Mixed Reality Environment readings to the robot, as a reply to the topic /sensor/distance

robotID: Robot ID
distance: Distance in centimeters as a float

/sensor/distance

SourceRobot
DestinationSimulator
Data Type JSON
Message Format
{ "id": [robotID], "dist": [distance], "reality": "M" }
Description Robots can request mixed-reality sensor reading from simulator through this topic. There as an optional parameter, 'reality' is used to request the reading only on a specified reality. Reply from the simulator will be received through the topic /sensor/distance/{robotID}.

Optionally, physical robots can inform their distance sensor readings to the server using dist parameters.

robotID: Robot ID
dist(optional): Distance in centimeters as a float
reality(optional): M: mixed, V: virtual, R: real | default: V

Color Sensor

/sensor/color/{robotID}/?

Source Simulator
Destination Robot ( Physical | Virtual )
Data Type String
Message Format ?
Description This will request color sensor readings from a robot. Typically used by the Simulator or Sandbox.

/sensor/color/{robotID}

Source Simulator
Destination Robot
Data Type String
Message Format {R} {G} {B} {ambient}
Description Simulator will inform Mixed Reality Environment readings to the robot. Sensor readings must wait for this reply before deciding the final value.

R,G,B: corresponding color reading | range: [0,255]
ambient: Ambient light of the environment | range: [0,255]

/sensor/color

Source Physical Robot
Destination Simulator
Data Type JSON
Message Format
{ "id":[robotID], "R":[R], "G":[G], "B":[B], "ambient":[ambient], "reality": "M" }
Description Robots can request mixed-reality sensor reading through this topic. There as an optional parameter, 'reality' is used to request the reading only on a specified reality. Reply from the simulator will be received through the topic /sensor/distance/{robotID}.

Optionally, physical robots can inform their sensor readings to the server using R,G,B, ambient parameters.

id: Robot ID
reality(optional): M: mixed, V: virtual, R: real | default: V
R,G,B (optional): corresponding color reading | range: [0,255]
ambient (optional): Ambient light of the environment | range: [0,255]

Proximity Sensor

/sensor/proximity/{robotID}

Source Simulator
Destination Robot (Physical, Virtual)
Data Type String
Message Format [ vary with the request ]
Description Simulator will update virtual proximity sensor readings to the robot, as the reply to the ‘/sensor/proximity’ topic. This is a full virtual sensor

The response will be depend of the requested number of angles (it can be decided by the robot)

Example: for angels = [-90, 0, 90]
5 10 5 #404040 #000000 #FF0000
{dist on -90°} {dist on 0°} {dist on 90°} {color of -90°} {color of 0°} {color of 90°}

/sensor/proximity

Source Robot (Physical, Virtual)
Destination Simulator
Data Type JSON
Message Format
{ "id":0, "angles": [[angles]], "reality":[reality] }
Description The sensor is entirely virtual and both virtual and physical robots can request the proximity readings from the simulator using this.

angles: relative angles that measures should be taken, as an integer list. Ex: [-90, 0, 90]
reality(optional): V: virtual(default, and the only possible option far)

Comapss Sensor

/sensor/compass/{robotID}/?

Source Simulator
Destination Robot ( Physical | Virtual )
Data Type String
Message Format ?
Description This will request compass sensor readings from a robot. Typically used by the Simulator or Sandbox.

robotID: Robot ID