配置完成后,分别使用如下命令打开三维仿真和二维仿真:
roslaunch robot1_gazebo gazebo_empty.launch 
rosrun turtlesim turtlesim_node 
通用性: 使用/cmd_vel,速度指令,均可以控制机器人运动。
- 机器人/cmd_vel
- 小乌龟/turtle1/cmd_vel

三维仿真如下: 
二维仿真如下: 
但是由于三维仿真中机器人是有惯性等物理特性, 
位置曲线如下: 
上图是由于动力学模型导致的。
小海龟为运动学模型: 
为何很多仿真数据实际上不能用?
对实际模型进行大量简化,导致与原有模型不匹配。
实验所用全部指令汇总: 
shiyanlou:~/ $ history [15:32:36]
1 cd Code
2 git clone https://gitcode.net/ZhangRelay/ros_book.git
3 cd ros_book/
4 unzip effective_robotics_programming_with_ros-master.zip
5 unzip navigation-kinetic-devel.zip
6 catkin_make
7 source devel/setup.zsh
8 roslaunch robot1_gazebo gazebo_empty.launch
9 rosrun turtlesim turtlesim_node
10 rqt
11 rostopic list
12 rostopic echo /odom
13 rostopic list
14 history
|