运行海龟仿真器,并使用命令行工具新产生2只海龟
安装 zsh
后, 找不到 roscore 了…
zsh: command not found: roscore
解决方法 :
找到 catkin_ws
中的 /devel/setup.zsh
gedit ~/.zshrc
增加一句 source
后面加上自己的路径
然后
source ~/.zshrc
试图通过两个命令行产生两只乌龟失败
开始用发布服务请求发布第二只乌龟 :
roscore
rosrun turtlesim turtlesim_node
rosservice call /spawn "x: 5
y: 5
theta:0
name: 't2'"
rosservice call /spawn "x: 10
y: 10
theta:0
name: 't3'"
查看3只海龟的计算图结构
rqt_graph
使用命令行工具控制 —只海龟做圆周运动,并显示位置曲线
rostopic pub -r 10 /t2/cmd_vel geometry_msgs/Twist "linear:
x: 3
y: 0
z: 0
angular:
x: 0
y: 0
z: 2"