# turtlebot3_simulation
**Repository Path**: jay-2deng/turtlebot3_simulation
## Basic Information
- **Project Name**: turtlebot3_simulation
- **Description**: Turtlebot3
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 3
- **Created**: 2025-06-03
- **Last Updated**: 2025-06-03
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
### 简介
navigation2+turtlebot3_simulations是一个
### 版本说明
本仿真用到的基础软件版本说明如下:
Ubuntu Linux 22.04
ROS 2.0(ROS Humble)
Gazebo Garden(ROS Humble)
### 先决条件
1.安装ROS2.0
2.安装Gazebo Garden
3.ROS2 with SITL in Gazebo
[https://ardupilot.org/dev/docs/ros2.html](http://)
[https://ardupilot.org/dev/docs/ros2-sitl.html](http://)
[https://ardupilot.org/dev/docs/ros2-gazebo.html](http://)
### 安装步骤
New console:
`mkdir -p ~/ros2_ws/src`
`cd ~/ros2_ws/src`
`git clone -b ardupilot_controller https://gitee.com/zbrover/turtlebot3_simulation.git`
`colcon build --packages-select turtlebot3_simulations turtlebot3_fake_node turtlebot3_gazebo --symlink-install`
New console:
`mkdir -p ~/nav2_ws/src`
`cd ~/nav2_ws/src`
`git clone -b ardupilot_controller https://gitee.com/zbrover/navigation2.git`
`cd ~/nav2_ws`
`rosdep install -y \
--from-paths ./src \
--ignore-src`
`rosdep install -y -r -q --from-paths src --ignore-src --rosdistro humble`
`colcon build --symlink-install`
`rosdep install -y -r -q --from-paths src --ignore-src --rosdistro humble`
### 启动步骤
目前实现的命令:
事先要在sitl_dds_udp.launch.py中把mavproxy注释掉。
New console:
~$ `cd nav2_ws`
~/nav2_ws$`. install/setup.bash`
~/nav2_ws$ `cd`
~$ `cd ros2_ws/`
~/ros2_ws$ `. install/setup.bash`
~/ros2_ws$ `cd`
~$ `cd nav2_ws/`
~/nav2_ws$ `export TURTLEBOT3_MODEL=apm`
~/nav2_ws$ `ros2 launch nav2_bringup apm_simulation_launch.py`
New console:
~$ `mavproxy.py --out 127.0.0.1:14550 --out 127.0.0.1:14551 --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --non-interactive`
注意:运行这个才有DDS节点
New console:
~/ros2_ws$ `ros2 service call /ap/arm_motors ardupilot_msgs/srv/ArmMotors "{arm: True}"`
~/ros2_ws$ `ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 15}"`
~/ros2_ws$ `ros2 run twist_stamper twist_stamper --ros-args -r cmd_vel_in:=cmd_vel -r cmd_vel_out:=/ap/cmd_vel -p frame_id:=base_link`
现在可以在rviz中初始化2D Pose Estimate,然后指定2D goal。