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 pose output of turtlesim/sim
  • For each message that your node receives on this topic, calculate the distance traveled by the turtle (see lecture slides) and publish a single message to a new topic (name is your choice) that:
    • Uses the turtlesim_helper/UnitsLabelled message type
    • Includes the distance value
    • Has “meters” as the units
  • Create a new launch file that will start:
    • This new node
    • Your HW2 publisher
    • turtlesim/sim
    • rqt_graph:
      <node pkg=”rqt_graph” name=”rqt_graph” type=”rqt_graph” />
    • 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 (i.e. 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 turtlesim_helper/UnitsLabelled message type using rosmsg show.

Submission Instructions

Complete the Qualtrics survey containing:

  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

12 points – Subscribes to turtlesim/sim pose topic
12 points – Publishes to specifications
12 points – Launch file and launcher script meet objectives
2 points – Tag applied in git
2 points – Answers given in survey