-
查看话题列表:rosnode list
2.发布话题消息:-r 10:表示触发的频率,linear:线速度;angular:角速度
rostopic pub -r 10 /turtle1/cmd_vel geometry_msgs/Twist "linear:
x: 1.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0"
3.发布服务器请求:产生新的海龟
rosservice call /spawn "x: 5.0
y: 5.0
theta: 0.0
name: 'turtle2'"
4.话题记录:将运动轨迹已经运动状态进行记录,cmd_record是文件名
rosbag record -a -O cmd_record
5.重现话题内容:rosbag play cmd_record.bag