课后作业

第二章 认识ROS

1、运行海龟仿真器,并使用命令行工具新产生2只海龟

运行roscore和turtlesim节点后,调用spawn服务创建新海龟turtle2:rosservice call /spawn “x: 5.0 y: 3.0 theta: 0.0 name: ‘turtle2’” (x和y的值代表海龟的位置)

第二章 认识ROS

之后再调用spawn服务创建另一只新海龟turtle3:rosservice call /spawn “x: 6.0 y: 6.0 theta: 0.0 name: ‘turtle3’”

第二章 认识ROS

2、查看3只海龟的计算图结构

利用rqt_graph

3、使用命令行工具控制一只海龟做圆周运动,并显示位置曲线

控制turtle2圆周运动

第二章 认识ROS

显示位置曲线:rqt_plot

第二章 认识ROS

相关文章: