ROS2常用命令行工具整理ROS2CLI

参数相关

$ ros2 param list
$  ros2 param describe /turtlesim background_b
$ ros2 param get /turtlesim background_b
$ ros2 param set /turtlesim background_r 44
$ ros2 param dump /turtlesim  #保存
$ ros2 param load  /turtlesim ./turtlesim.yaml   #加载
$ ros2 run turtlesim turtlesim_node --ros-args --params-file ./turtlesim.yaml
$ ros2 run example_parameters_rclcpp parameters_basic --ros-args -p rcl_log_level:=10

话题相关

$ ros2 topic list                # 查看话题列表
$ ros2 topic info /turtle1/cmd_vel   # 查看话题信息
$ ros2 topic hz /turtle1/cmd_vel     # 查看话题发布频率
$ ros2 topic bw /turtle1/cmd_vel     # 查看话题传输带宽
$ ros2 topic echo /turtle1/cmd_vel  
$ros2 topic pub --once /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.8}}"
$ros2 topic pub -r 1 /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.8}}"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值