所有资料均来自于 https://www.icourse163.org/learn/ISCAS-1002580008#/learn/announce 和https://github.com/DroidAITech/ROS-Academy-for-Beginners 和 https://sychaichangkun.gitbooks.io/ros-tutorial-icourse163/content/
TF:坐标系变换(TransForm),坐标系数据维护的工具(位置+姿态)。
URDF:统一机器人描述格式,是ROS指定的描述机器人的规范,定义机器人的具体模型。
ROS中的tf (https://wiki.ros.org/tf/Tutorials/Introduction%20to%20tf)
坐标转换的标准(tf tree)、话题(/tf 这个topic里的msg保存的就是tf tree的数据结构)、工具(pkg)、接口(roscpp rospy的API)
ROS中机器人模型包含大量的部件,这些部件统称之为link,每一个link上面对应着一个frame, 即一个坐标系.link和frame概念是绑定在一起的.robot_sim_demo运行的tf tree
TransformStamped.msg
ROS中两个frame之间的数据格式,用来表示两个坐标系之间的关系
包括:
std_mags/Header header
uint32 seq #序号
time stamp #时间
string frame_id #坐标系
string child_frame_id #子坐标系
geometry_msgs/Transform transform #坐标系和子坐标系之间的变换类型
geometry_msgs/Vector3 translation #三维向量表示平移
float64 x
float64 y
float64 z
geometry_msgs/Quaternion rotation #四元数表示旋转
float64 x
float64 y
flaot64 z
float64 w
tf/tfMessage.msg
tf2_msgs/TFMessage.msg
tf tree的数据结构 描述一个tf tree之间的关系
这里TF的数据类型有两个,主要的原因是版本的迭代,如何查看自己使用的TF是哪一个版本,使用命令rostopic info /tf
即可。
tf/tfMessage.msg或tf2_msgs/TFMessage标准格式规范如下:
geometry_msgs/TransformStamped[] transforms #[]表示可变长数组
std_msgs/Header header
uint32 seq
time stamp
string frame_id
string child_frame_id
geometry_msgs/Transform transform
geometry_msgs/Vector3 translation
float64 x
float64 y
float64 z
geometry_msgs/Quaternion rotation
float64 x
float64 y
flaot64 z
float64 w