Objectives

In this assignment, you will add two new nodes similar to your code from Homework 3 to demonstrate the use of 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 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
  • Create one additional ROS node that:
    • Waits 5 seconds then sets your param to output Meters.
    • Waits 5 seconds then sets your param to output Feet.
    • Waits 5 seconds then sets your param to output Smoots.
    • Loops back to Meters.
  • You should make a new launch file that starts the following nodes:
    • turtlesim/sim
    • Your Homework 2 publisher
    • Your Homework 3 distance calculator
    • Your new conversion node
    • Your new node to set params
    • 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 with the units labeled properly.

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

Rubric

12 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
2 points – Answers given in survey