Docs Update

This commit is contained in:
2026-01-02 05:54:52 +00:00
parent 4b44c3de91
commit 9625b495db
4 changed files with 63 additions and 1 deletions

View File

@@ -67,6 +67,61 @@ Run without GUI:
gz sim -s gazebo/worlds/drone_landing.sdf
```
---
## ROS 2 Launch File (Advanced)
**Location:** `gazebo/launch/drone_landing.launch.py`
This launch file automates Gazebo startup for ROS 2 integration:
1. Starts Gazebo with the world
2. Spawns the drone automatically
3. Starts `ros_gz_bridge` to connect topics
### Option 1: Direct Launch (Recommended)
Run the launch file directly with `ros2 launch`:
```bash
source activate.sh
ros2 launch gazebo/launch/drone_landing.launch.py
```
Then in another terminal, run just the controllers:
```bash
source activate.sh
python controllers.py --pattern circular
```
### Option 2: Include in Your ROS 2 Package
If you have a ROS 2 package, copy the launch file and use:
```bash
ros2 launch my_drone_package drone_landing.launch.py
```
### Launch Arguments
| Argument | Default | Description |
|----------|---------|-------------|
| `use_sim_time` | `true` | Use Gazebo clock |
| `headless` | `false` | Run without GUI |
```bash
ros2 launch gazebo/launch/drone_landing.launch.py headless:=true
```
### Topics Bridged by Launch File
| ROS 2 Topic | Description |
|-------------|-------------|
| `/drone/cmd_vel` | Velocity commands |
| `/model/drone/odometry` | Drone state |
| `/drone/imu` | IMU sensor |
| `/clock` | Simulation time |
---
## Troubleshooting
### Model not found