Introduction
Hello, guys. This is the second article in a series of ROS ignite school review. You can find the previous one in this link!
https://qiita.com/Rowing0914/items/32390d36be745d3e5647
Reminder: I am not covering about the setting of ROS environment since it is given in the Academy. And I am super bad at writing for sure.
What you will learn
In this course, you will learn to use TF in ROS. TF is the collection of APIs to deal with converting the local frame of the robot into the world frame so that a robot can understand where it is in the world frame accurately.
For example, The Hokuyo laser sensor at the tip of the robot arm, or TCP, is registering distance readings. But these readings are registered in the LaserFrame. This means that when we need to interpret the data in the world frame, we will have to make some type of conversion. This conversion is based on how ALL the Joints of the robot were in each instance. This is not trivial, but it is very common to have in a robotics environment.
By the end of this course you will be able to
- Published and Subscribe to TF data topics
- Use the tools necessary to visualise TF data
- Publish fixed TF transforms
- Use RobotStatePublisher to generate TF data for robots too complex to publish it manually
- Understand the use of JointStatePublisher and how it relates to RobotMovement Controllers
1. TF Basics
Visualise TF data
# 1. using view_frame
$ rosrun tf view_frames
$ evince frames.pdf
# 2. using rqt_tf_tree
$ rosrun rqt_tf_tree rqt_tf_tree
# 3. you can specify a number of framees you want to check
$ rostopic echo -n1 /tf
$ rostopic echo -n2 /tf
""" RESULT
transforms:
-
header:
seq: 0
stamp:
secs: 1305
nsecs: 22000000
frame_id: "/world"
child_frame_id: "turtle1"
transform:
translation:
x: -12.983426318
y: -4.69533631892
z: -1.52217902849e-06
rotation:
x: -4.62091684167e-07
y: 1.45034030844e-06
z: 0.303573362761
w: 0.952808067461
---
"""
# 4. RVIZ
$ rosrun rviz rviz