目录
准备工作
分开启动ROS Master和乌龟GUI界面,因为之后的操作要改动参数服务器的参数,如果roscore关闭再重启,参数服务器会回到初始状态。
roscore
rosrun turtlesim turtlesim_node
列出参数服务器所有参数
rosparam list
rosmelodic@rosmelodic-virtual-machine:~/catkin_ws$ rosparam list
/rosdistro
/roslaunch/uris/host_rosmelodic_virtual_machine__33639
/rosversion
/run_id
/turtlesim/background_b
/turtlesim/background_g
/turtlesim/background_r
如下为背景色的参数的键名。
/turtlesim/background_b
/turtlesim/background_g
/turtlesim/background_r
如下是背景色参数键名对应的键值。
rosmelodic@rosmelodic-virtual-machine:~/catkin_ws$ rosparam get /turtlesim/background_g
86
rosmelodic@rosmelodic-virtual-machine:~/catkin_ws$ rosparam get /turtlesim/background_b
255
rosmelodic@rosmelodic-virtual-machine:~/catkin_ws$ rosparam get /turtlesim/background_r
69
根据之前的参数服务器学习,改颜色属于对参数服务器的参数“改”,利用的是覆盖的方法。
10.ROS编程学习:参数管理机制c++实现_机械专业的计算机小白的博客-CSDN博客https://blog.csdn.net/wzfafabga/article/details/127413670?spm=1001.2014.3001.550111.ROS编程学习:参数管理机制python实现_机械专业的计算机小白的博客-CSDN博客