In this assignment, you will add a new node similar to your code from Homework 3 to demonstrate the use parameters to make your code more flexible. Do not modify your HW2 or HW3 nodes! Here are the detailed specifications:

  • Your new/revised conversion node should be able to convert the output of your HW3 solution to three units: meters, feet and smoots (1.7018 meters or 5.5833 feet, ref: https://www.larsondesigngroup.com/understanding-smoot/)
  • Each time your node receives a measurement to convert, it should check a parameter (name of your choice) to determine which unit it should convert to:
    • Meters (no conversion, output the same message as the input)
    • Feet
    • Smoots
  • You should make a new launch file that starts the following nodes:
    • turtlesim/sim
    • Your Homework 2 publisher
    • Your Homework 3 distance calculator
    • This new node
    • rostopic echo to listen to the output of this node (see instructions in HW3)
  • Also, in the launch file, set the parameter used by your new/revised node to produce an output in Smoots as the default unit.

At the end of this, your code should publish whatever units your conversion code is set to.

Test your code thoroughly by changing the parameter on the command line and watching the output from your conversion node. It should start as Smoots and then change as you change the parameter on the command line.

Submission Instructions

Submit 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 parameter you created and the valid values you can use.
  5. Any difficulties you had with this assignment


12 points – Parameter to switch units
12 points – Successful conversion
12 points – All nodes started in launch file, launcher script correct
2 points – Tag applied in git
2 points – Answers given in survey