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

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
venv/ venv/
__pycache__/ __pycache__/
notes/

View File

@@ -57,6 +57,7 @@ Terminal 1 Terminal 2
| `run_gazebo.py` | Gazebo bridge + controllers | | `run_gazebo.py` | Gazebo bridge + controllers |
| `drone_controller.py` | Landing algorithm | | `drone_controller.py` | Landing algorithm |
| `rover_controller.py` | Moving landing pad | | `rover_controller.py` | Moving landing pad |
| `gazebo/launch/drone_landing.launch.py` | ROS 2 launch file for Gazebo |
## ROS Topics ## ROS Topics

View File

@@ -67,6 +67,61 @@ Run without GUI:
gz sim -s gazebo/worlds/drone_landing.sdf 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 ## Troubleshooting
### Model not found ### Model not found

View File

@@ -154,7 +154,12 @@ Open PowerShell as Administrator:
# Install WSL2 with Ubuntu # Install WSL2 with Ubuntu
wsl --install -d Ubuntu-22.04 wsl --install -d Ubuntu-22.04
# Restart computer when prompted # set the user name and password
# Then update the system
sudo apt update
sudo apt upgrade
# Restart computer if prompted
``` ```
### Step 2: Enable GUI Support (WSLg) ### Step 2: Enable GUI Support (WSLg)