5.1.1.3. incoming_order_handler¶
This node is used to handle the job of processing the new order placed.
Node to handle any new order placed on MQTT topic. This node process the order and add details like priority, cost, team ID and unique ID to the JSON object and sends it to UR5_1 arm for use via ROS topic. This node subscribes to ROS topic ‘/ros_iot_bridge/mqtt/sub’ where anything published on MQTT topic is published to get the details of the new order placed. After this a callback new_order_callback() do the processing of the order and send it to UR5_1 arm for use.
-
class
incoming_order_handler.
RosIotBridgeActionClient
[source]¶ Action Client to act as a bridge between ROS Nodes and IOT to update google spreadsheets
-
on_transition
(goal_handle)[source]¶ This function will be called when there is change of state in the Action Client State Machine
Parameters: goal_handle – unique id of goal Returns: None
-
-
incoming_order_handler.
main
()[source]¶ Main function to initialize nodes, action client, subscriber and publisher to handle new order placed on MQTT topic
-
incoming_order_handler.
new_order_callback
(msg, args)[source]¶ Whenever a new order is placed on MQTT topic, this function is called to process the order details and send it to UR5_1 arm via ROS topic.
Parameters: - msg (msgMqttSub) – Contains the details of new order.
- args (list) – list of Action Client and New order publisher.