Localization Protocols

/localization/data/?

SourceSubsystem (Visualizer, Sandbox)
DestinationSimulator
Data TypeString
Message Format {reality}
Description Subsystems can request robot coordinate details through this topic, with a reality filter. Simulator will reply coordinate list through the topic /localization/data

reality: M: mixed (default), V: virtual, R: real

/localization/data

SourceSimulator
DestinationSubsystems (Visualizer, Sandbox)
Data TypeJSON List
Sample Message
[ { "id": "[robotID]", "x": "[X]", "y": "[Y]", "heading": "[heading]", "reality": [reality] }, ... ]
Description This is the response to the topic, /localization/data/?, a list of robot coordinates in requested reality.

id: ID number of the robot
X,Y: Robot coordinate readings in centimeters
heading: heading of the robot in degrees, 0=x+ direction
reality: R: real, V:virtual, required

/localization

SourceRobot ( Physical | Virtual )
DestinationSimulator
Data TypeJSON
Message Format [robotId]
Description Both physical and virtual robots can publish into this topic to request their own localization details from the Simulator. This is mostly used by the hardware robots to correct their internal coordinate variables. They will receive the results through the topic /localization/{robotId}.

robotID: ID number of the robot

/localization/{robotId}

SourceSimulator
DestinationRobot ( Physical | Virtual )
Data TypeJSON
Message Format {X} {Y} {heading}
Description Simulator will reply the robots coordinates to the robot that request their own coordinates. This will be sent as a response to the topic /localization

robotID: ID number of the robot
X,Y: Robot coordinate readings in centimeters
heading: heading of the robot in degrees, 0=x+ direction

/localization/update/?

SourceSimulator
DestinationLocalization System, Virtual Robots
Data TypeString
Message Format ?
Description The simulator can request coordinate details from the Localization System (for physical robots) or Virtual Robots by publishing into this topic. Recomended to use this by Simulation, once it is started. This will receive the response through /localization/update topic.

/localization/update

SourceVirtual Robots, Localization System
DestinationSimulator
Data TypeString
Message Format
[ { "id": "[robotID]", "x": "[X]", "y": "[Y]", "heading": "[heading]", "reality": [reality] }, ... ]
Description Subsystems can inform the actual coordinates of the robots to the Simulator using this topic. Used by Localization System, to send a list of coordinates with "reality": "R", and Virtual robots to send a single coordinate with "reality": "V"

robotID: ID number of the robot
X,Y: Robot coordinate readings in centimeters
heading: heading of the robot in degrees, 0=x+ direction
reality: R: real, V:virtual, required