西安网站建设雄账号,淘宝网站制作公司哪家好,域名与网站,wordpress 登录后才能查看欢迎访问我的博客首页。 tf 1. tf 命令行工具1.1 发布 tf1.2 查看 tf 2.参考 1. tf 命令行工具 1.1 发布 tf 我们根据 cartographer_ros 的 launch 文件 backpack_2d.launch 写一个 tf.launch#xff0c;并使用命令 roslaunch cartographer_ros tf.launch 启动。该 launch 文件… 欢迎访问我的博客首页。 tf 1. tf 命令行工具1.1 发布 tf1.2 查看 tf 2.参考 1. tf 命令行工具 1.1 发布 tf 我们根据 cartographer_ros 的 launch 文件 backpack_2d.launch 写一个 tf.launch并使用命令 roslaunch cartographer_ros tf.launch 启动。该 launch 文件运行 ros 系统包 robot_state_publisher 中的同名节点 robot_state_publisher根据 backpack_2d.urdf 文件发布机器人各坐标系到 base_link 的变换。
launchparam namerobot_description textfile$(find cartographer_ros)/urdf/backpack_2d.urdf /node namerobot_state_publisher pkgrobot_state_publisher typerobot_state_publisher /
/launch1.2 查看 tf 使用 rosrun tf view_frames 查看广播的坐标系关系。该命令会在命令行目录生成一个 frames.pdf。 图 1.1 广播中的坐标变换关系 上面的命令可能会报错。需要把 /opt/ros/noetic/lib/tf/view_frames 中的 m r.search(vstr) 修改为 m r.search(str(vstr))。
Listening to /tf for 5.0 seconds
Done Listening
bdot - graphviz version 2.43.0 (0)\n
Traceback (most recent call last):File /opt/ros/noetic/lib/tf/view_frames, line 119, in modulegenerate(dot_graph)File /opt/ros/noetic/lib/tf/view_frames, line 89, in generatem r.search(vstr)
TypeError: cannot use a string pattern on a bytes-like object使用命令 rosrun tf tf_monitor 查看广播的坐标关系。
RESULTS: for all FramesFrames:
Frame: horizontal_laser_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
Frame: imu_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
Frame: vertical_laser_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0All Broadcasters:
Node: unknown_publisher(static) 1e08 Hz, Average Delay: 0 Max Delay: 0使用 rosrun tf tf_monitor /imu_link /base_link 查看两个坐标系的关系。
Waiting for transform chain to become available between imu_link and base_link RESULTS: for imu_link to base_link
Chain is: imu_link - base_link
Net delay avg 3.2183e08: max 1.69142e09Frames:
Frame: imu_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0All Broadcasters:
Node: unknown_publisher(static) 1e08 Hz, Average Delay: 0 Max Delay: 0使用 rosrun tf tf_echo /imu_link /base_link 查看两个坐标系的变换。
At time 0.000
- Translation: [0.000, 0.000, 0.000]
- Rotation: in Quaternion [0.000, 0.000, 0.000, 1.000]in RPY (radian) [0.000, -0.000, 0.000]in RPY (degree) [0.000, -0.000, 0.000]2.参考 1.ROS tfCSDN2022。