Gazebo学习笔记--第一篇

xiaoxiao2021-02-28  73

本文是一篇学习笔记,重在记录。 进入正题: 1、下载源代码 $ git clone -b base https://github.com/richardw05/mybot_ws.git

:~$ cd mybot_ws

:~/mybot_ws$ ls

README.md run_cmd.sh run_gazebo.sh run_rviz.sh src

2、编译

:~/mybot_ws$ catkin build

3、设置路径 :~/mybot_ws$ echo “source ~/mybot_ws/devel/setup.bash” >> ~/.bashrc

:~/mybot_ws$ source ~/.bashrc

4、运行

~/mybot_ws$ roslaunch mybot_gazebo mybot_world.launch

在view中选中wireframe和joints,可以调整角度可以查看下面的效果。

5、通过topic信息控制小车运行

新建终端: ~/mybot_ws$ rostopic pub /cmd_vel geometry_msgs/Twist ” 按tab键,补全命令,更改后得到如下: linear: x: 0.2 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.1” 回车即可,小车跑起来了!!

转载请注明原文地址: https://www.6miu.com/read-53874.html

最新回复(0)