Skip to content

DeliveryBot

Ahmed Khalil edited this page Apr 25, 2018 · 3 revisions

This activity is the where communication with ROS is established, the Talker and Listener nodes are initialized, and the image processing occurs. To allow communication with ROS as well as basic layout functionality, this activity extends RosActivity.

This activity is written entirely in Java.

Public Parameters

As this activity contains the manipulation of many public parameters, they will be mentioned here to avoid redundancy.

  • TextView botState: Robot status TextView
  • TextView movebase: Robot status TextView
  • Button compButton: Job completion button
  • Button cancelButton: Job cancellation button
  • String IP: ROS_MASTER_URI
  • private Context context: Activity context
  • TalkBot talkerNode: Talker instance used to publish commands.
  • private static final String TAG: Log tag name.
  • String contact: Contact ID
  • String recipient: Recipient ID
  • private String room: Location
  • private String target: Contact name

startMasterChooser()

This method establishes the connection with the ROS network.

onCreate

This function sets up the activity's main layout as well as associating the appropriate variables with their views.

init(NodeMainExecutor nodeMainExecutor)

This method initializes the ROS nodes of Talker and Listener.

  • Parameters:
    • NodeMainExecutor nodeMainExecutor: the node executor that establishes all the desired nodes.
    • Listener lisNode: an instance of the listener node.

sendToSlack(String text)

This method enables DeliveryBot to send messages to slack.

  • Parameters:
    • String text: the text to be sent to Slack.