网站建设办什么手续,工业设计作品,西安分类信息网站,个人对网络营销的看法文章目录 1. ros1 中的rosrun tf tf_echo 在ros2中使用办法2. rqt 中 tf 树的查看3. roscd 在ros2中使用办法4. ros2获取时间的方法#xff1a; 1. ros1 中的rosrun tf tf_echo 在ros2中使用办法
# ros2 run tf2_ros tf2_echo [reference_frame] [target_frame]
ros2 run tf2… 文章目录 1. ros1 中的rosrun tf tf_echo 在ros2中使用办法2. rqt 中 tf 树的查看3. roscd 在ros2中使用办法4. ros2获取时间的方法 1. ros1 中的rosrun tf tf_echo 在ros2中使用办法
# ros2 run tf2_ros tf2_echo [reference_frame] [target_frame]
ros2 run tf2_ros tf2_echo turtle2 turtle1会显示如下结果
At time 1631336659.214493548
- Translation: [0.015, 0.000, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.206, 0.978]
At time 1631336660.222032437
- Translation: [0.008, 0.000, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.208, 0.978]参考 https://www.cnblogs.com/vpegasus/p/ros2_tf2.html
2. rqt 中 tf 树的查看
请参考这个链接 https://blog.csdn.net/ABC_ORANGE/article/details/130420466?spm1001.2014.3001.5501
3. roscd 在ros2中使用办法
ros2中使用colcon_cd需要提前设置环境变量 colcon_cd 环境变量
source /usr/share/colcon_cd/function/colcon_cd.sh为支持在bash和shell中对colcon命令进行补全
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash4. ros2获取时间的方法 auto t rclcpp::Clock().now();auto t1 std::chrono::system_clock::now(); auto t2 this-get_clock()-now(); #这个是在类中这样使用可以直接实例化类后调用这个函数auto t3 this-now(); #这个是在类中这样使用参考 https://blog.csdn.net/shoufei403/article/details/125955660