json messages - sjentzsch/intel-iot-robotino GitHub Wiki

Communication JSON-Messages Protocol

... with example values:

# JSON protocol for communication cloud -> robot

# Environment settings, sent initially once, robot waits for this msg to arrive before starting {
"message": "msg_environment",
"time": "1400678393",
"x_max": "4.1",
"y_max": "8.7",
"x_base_robot_start": "1.5",
"y_base_robot_start": "3.4",
"x_base_left_corner": "0.5",
"y_base_left_corner": "2.5",
"phi_base": "180"
}

# Robot position update, sent as soon as robot was successfully localized (optional) {
"message": "msg_robot_pos",
"time": "1400678393",
"x": "4.6",
"y": "6.2"
}

# Customer ordering, sent as soon as customer orders {
"message": "msg_customer_order",
"time": "1400678393",
"order_id": "24",
"customer_id": "11",
}

# Customer position update, sent as soon as customer was successfully localized {
"message": "msg_customer_pos",
"time": "1400678393",
"customer_id": "11",
"name": "John",
"x": "4.0",
"y": "1.3"
}

# Robot command, used for pausing/unpausing the robot, toggles between pause/unpause {
"message": "msg_robot_pause",
"time": "1400678367"
}

# JSON protocol for communication robot -> cloud

# Robot beacon, sent periodically each 500ms {
"message": "msg_robot_beacon",
"time": "1400678393",
"x": "0.9",
"y": "1.3",
"phi": "85",
"state": "Serve John",
"running": "0",
"drinks_available": "2"
}

# Robot serving, sent as soon as robot reached the goal area and the drink was taken by the customer {
"message": "msg_robot_served",
"time": "1400678393",
"order_id": "24",
}