UP | HOME

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

  1. Walk through the demonstration above, manually setting up rviz to display the transformations
  2. Modify in_out so that the base frame is dynamic, that is, it is broadcast from the regular broadcaster and not the static broadcaster.
  3. Make the base frame rotate about it's own z axis at a fixed rate, and visualize in rviz
  4. 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
  5. Modify tracker so that when the distance between up and left is above a threshold, it prints a message

Author: Matthew Elwin.