Objectives

In this assignment, you will create a ROS node that both subscribes to a topic for input and publishes to a NEW topic as output. Here are the specifications for this new node:

  • It should be in the same package you used in HW2
  • It should subscribe to the output of mystery_node that has units: /mystery/output2
  • For each message that your node receives on this topic, convert the output from meters to feet and publish a single message to a new topic (name is your choice) that:
    • Uses the mystery_package/UnitsLabelled message type
    • Includes the converted value
    • Has “feet” as the units
  • Create a new launch file that will start:
    • This new node
    • Your HW2 publisher
    • mystery_node
    • rqt_graph (see HW2 for instructions to launch this)
    • Rostopic echo for your chosen output topic:
      <node pkg=”rostopic” name=”rostopic” type=”rostopic” output=”screen” args=”echo output_topic” />
      Where “output_topic” is the topic name HW3 outputs to. You should see this output on the terminal when you run the launch file.
  • Do NOT change any previous code (mystery_package or your HW2 submission) unless told to after HW2 is graded.
  • Push your code to GitHub with a tag for this assignment.
  • Modify launch-hw3.sh to reflect the name of your package and launch file.

Make sure you test this code thoroughly so you know that it works. You can test the conversion by running your node using rosrun and test the entire assignment using roslaunch and the launch file you provided.

You can see details about the mystery_package/UnitsLabelled message type using rosmsg show.

Submission Instructions

Submit a PDF to blackboard with:

  1. Your name, repo URL, and the tag for this assignment
  2. The command that starts your nodes for this assignment, ie:
    roslaunch <package> <launch_file>
  3. The name of the node you created
  4. The name of the topic that your node publishes to
  5. Any difficulties you had with this assignment

Rubric

6 points – Conversion to feet successful
6 points – Subscribes to mystery_node
12 points – Publishes to specifications
8 points – Launch file and launcher script meet objectives
4 points – Tag applied in git
4 points – Answers given in PDF