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 (Subject to change)

/sensor/proximity/{robotID}

Source Simulator
Destination Robot (Physical, Virtual)
Data Type String
Message Format %d %d %d %d %d
Description Simulator will update virtual proximity sensor readings to the robot, as the reply to the ‘/sensor/proximity’ topic.

5 readings are representing the distance readings of following 5 angles, relative to the heading direction of the robot.

[-150, -90, 0, 90, 150]

/sensor/proximity

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

reality(optional): V: virtual(default, and the only possible option far)