Objectives

In this assignment, you will add two new nodes similar to your code from Lab 1.3 to demonstrate the use of parameters to make your code more flexible. Do not modify your previous assignments unless told to! Here are the detailed specifications:

  • Your new/revised conversion node should be able to convert the output of your Lab 1.3 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 conversion 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 Lab 1.2 publisher
    • Your Lab 1.3 distance calculator
    • Your new conversion node
    • rostopic echo to listen to the output of the conversion node (see instructions in Lab 1.3) AND ONLY THIS NODE
  • 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 that can used for it.
  5. Any difficulties you had with this assignment

Rubric

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