This assignment focuses on ROS (Robot Operating System). ROS is a framework used to program robots. It is quite complicated, however it is widely used on both industrial and commercial settings. Parts to hand in will be noted in italics.
Fill in the corresponding sections in the answers.txt
in your handin
repository and submit the ROS package you create.
Read understanding nodes.
Use rosnode list
to display what nodes are running when you start the
Use rosnode info
to find out more about each node. What topics does
/flow_pub
publish?
Do the ROS tutorial to create
a package. Name your package ros_assignment_pkg
.
Do the building packages tutorial.
Follow the ROS publisher/subscriber tutorial using the workspace and package you created above. Hand in the entire package.
Start the screen
session we use to fly the drone. Use rostopic echo
and
rostopic hz
to examine the results of various topics. What is the frame
rate we are publishing images from the camera?
Make all modifications in your ROS package from Problem 1 and hand in the package
Read Creating a ROS msg. You do not need to read the section on services.
In your package from question 1, create a ROS message called MyMessage
with a field for a string
, called name
, and a field for an array of
float64
, called contents
. Edit files such as CMakeLists.txt
to ensure your message is compiled and available for use. Make these modifications in the package from problem 1 and hand it in.
Write a ROS subscriber on your drone to read the values from the infrared
sensor topic and print them to stdout
. Name the file my_echo.py
and
submit it.
Write a second ROS subscriber that listens to the infrared sensor topic and
calculates the mean and variance over a ten second window using
NumPy. Print these values to stdout
. Name the
file mean_and_variance.py
and submit it.
Hand in your answers using this link. Make sure you hand in:
answers.txt
my_echo.py
mean_and_variance.py
ros_assignment_pkg
: the ROS package you created