Instructions for Homework 2: ----------------------------- Part 1: Setup your ROS environment and create a catkin workspace. To setup your ROS environment and create the workspace, consult the following ROS tutorial: http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment This part of the homework is not graded but is required to complete the rest. Do not forget to build the empty workspace and modify your .bashrc file as specified in the above tutorial. ----------------------------- Part 2: Your first ROS node For the second part of the homework, the task is to create a ROS package and write the code for a ROS node that will simulate noisy sensor readings. Specifically, your ROS node has to publish random numbers at a fixed frame rate to a ROS topic. Detailed instructions: a) Create a ROS package with the name "cs378_". The following tutorial provides detailed instructions: b) Create the .cpp file for your ROS node in the /src folder of the package. The name should be "random_data_publisher.cpp" and the name of the resulting executable program should be "random_data_publisher". The ROS node should do the following: - Create a Publisher that will publish messages of type std_msgs/Float32 to the topic "/random_data/raw". - After initialization, the node should publish a random floating point number at the rate of 30 Hz (i.e., 30 times a second). Completing this part of the homework is required for the next homework, in which we will write a basic de-noising filer (something that we often have to do in practice for noisy sensor data). An essential tutorial for writing your first ROS node and publishing data to a topic can be found here: http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29 In the tutorial, the publishing node publishes data of type std_msgs/string. In your case, you will have to publish data of type std_msgs/Float32 and instead of publishing the same value everytime the loop is executed, you will be publishing a random number in a range of your choice. After compiling your package, you shold be able to test your node using the following procedure 1. in a terminal window, start "roscore" 2. in another terminal window, start your node, i.e., "rosrun cs378_ random_data_publisher" 3. in a third terminal, run the command "rostopic echo /random_data/raw". You should now be able to see the random numbers from the topic printed to the screen. WHAT TO TURN IN: A single zip file containing your package source files. In other words, if your workspace is in "/home//catkin_ws/, then the zip file shold be of the package folder "/home//catkin_ws/src/cs378_". Do NOT zip the entire workspace folder. As always, feel free to ask for clarification if anything is not clear. Good luck! Extra Credit: For extra credit, implement an additional node with the name "random_data_filter" which subscribes to the topic "/random_data/raw" and simply prints the received numbers to the screen.