首页 > 技术文章 > 初识ROS

yujingxiang 2021-02-28 19:18 原文

一、启动核心服务点和仿真节点

roscore       #核心服务点
rosrun turtlesim turtlesim_node   #仿真节点

二、创建新的海龟turtle3

rosservice call /spawn "x: 5.0
y: 0.0
theta: 0.5
name: 'turtle3'"

三、控制海龟turtle3原地做圆周运动

rostopic pub -r 10 /turtle3/cmd_vel geometry_msgs/Twist "linear:
  x: 0.5
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: 1.0"

四、查看海龟仿真系统的计算图

rqt_graph

五、查看 /turtle2/pose的可视化信息

rqt_plot

六、查看 /turtle2/pose的实时信息

rostopic echo /turtle2/pose

推荐阅读