Easily move \tf
frames around using your keyboard or mouse. Use as a simple calibration-by-eye tool or add menus and interative markers to create customized functionality.
Screenshot of the TF Visual Tools GUI.
This open source project was developed at PickNik Robotics. Need professional ROS development and consulting? Contact us at projects@picknik.ai for a free consultation.
To build this package, git clone
this repo into a catkin workspace and be sure to install necessary dependencies by running the following command in the root of your catkin workspace:
rosdep install -y --from-paths src --ignore-src --rosdistro kinetic
- Start Rviz and add the TF Visual Tools GUI to Rviz:
Panels > Add New Panel
- Then select the TF Visual Tools GUI:
tf_visual_tools/TFVisualTools
- Start the TF publisher:
rosrun tf_visual_tools tf_visual_tools
These steps are already completed when running roslaunch tf_visual_tools demo.launch
- select a TF from the
from:
dropdown list or type a new name. - enter a name for the TF in the
to:
line. - check whether you would like the TF to have an interactive marker associated with it.
- check whether you would like to attach menu options to your interactive markers. If you do want menus, you will be prompted to select a text file that contains the menu titles.
- click
Create TF
.
Note: see the File Formats
section for details about file format.
Note: see the Interactive Markers and Menu Selections
for details about using the menu items.
- select the TF from the dropdown list.
- click
Remove TF
Due to limitations in the Interactive Markers package, all interactive markers will have menus if enabled and all menus will have the same choices.
For each menu item, a publisher will be created with the topic name:
For example:
- Items without sub menus:
/imarker/menu_item_B
- Items with sub menus:
/imarker/menu_item_A_sub_entry_1
When the menu items are selected, a value of true
will be published to the corresponding topic. Create a subscriber in your own code to handle menu selections.
The TFs you create can be manipulated through the GUI or the keyboard.
- select the TF that you would like to manipulate from the dropdown list.
- set the individual degree of freedom values or use the
+
and-
buttons to increment the desired degree of freedom. The incrementation is determined by values set inDelta xyz
andDelta rpy
.
- Select the TF that you would like to manipulate from the dropdown list.
- Use the following commands to manipuate the TF:
Move: X Y Z R P Yaw
-------------------
+ q w e r t y
- a s d f g h
fast u
med i
slow o
Note: The Manipulate
tab must have focus. If the keyboard commands are not working, try clicking the tab again as it probably lost focus.
- Interactive Marker positions are changed by dragging either the grey box or grabbing one of the arrows or rings to change position or rotation of a single degree of freedom.
These buttons will either save or load a group of TFs.
There are two types of files used in the tf_visual_tools
package:
- saved TFs
- interactive marker menus
#ID From To IMarker Menus X Y Z ROLL PITCH YAW
# (comment line)
# space delimeter
# very little error checking done... so check your input.
0 map a 1 1 0.00 0.00 0.00 0.00 0.00 0.00
1 a b 1 1 0.50 1.50 0.50 0.00 0.00 0.00
... and so on ...
ID
- an integer id for the frame.
From
and To
- strings with the corresponding TF names.
IMarker
and Menus
- bool (0 or 1) indicating whether the TF has an interactive marker and menus.
X
, Y
, Z
, ROLL
, PITCH
, YAW
- doubles corresponding to the TFs degrees of freedom.
# example menu file
# (shebang anywhere in line comments line)
# FORMAT: (supports only 1 sub level, sub menus cannot have sub menus)
# (num sub menus), menu title
# submenu title
# very little error checking done... so check your input.
3, menu item A
sub entry 1
sub entry 2
sub entry 3
0, menu item B
0, menu item C
2, menu item D
sub entry 1
sub entry 2