ROS Tf Activity
Demonstration
# create the workspace and clone the repository and get set up mkdir ws/src cd ws/src git clone https://github.com/m-elwin/me495_tf.git cd .. catkin_make source devel/setup.bash # run the broadcaster roscore & rosrun me495_tf in_out & # list the topics, notice the /tf and /tf_static rostopic list # use rqt_tf_tree to see the tf_tree rosrun rqt_tf_tree rqt_tf_tree # use tf_echo (from tf 1) to see translation between frame. C-c to quit rosrun tf tf_echo right left # run in rviz, set everything up correctly rviz # run in rviz, using my rviz config rviz -d src/me495_tf/rviz/view.rviz # run the tracker node rosrun me495_tf tracker
Exercises
Activity
- Walk through the demonstration above, manually setting up rviz to display the transformations
- Modify
in_out
so that the base frame is dynamic, that is, it is broadcast from the regular broadcaster and not the static broadcaster. - Make the base frame rotate about it's own z axis at a fixed rate, and visualize in rviz
- Add another frame called
up
that is a child of base. Have this frame move in sync with left and right but perpendicular to them - Modify tracker so that when the distance between
up
andleft
is above a threshold, it prints a message