From 9625b495db56d1891ba361f37221eb50a37a8974 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 2 Jan 2026 05:54:52 +0000 Subject: [PATCH] Docs Update --- .gitignore | 1 + docs/architecture.md | 1 + docs/gazebo.md | 55 ++++++++++++++++++++++++++++++++++++++++++++ docs/installation.md | 7 +++++- 4 files changed, 63 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ee55e71..0813a70 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ venv/ __pycache__/ +notes/ \ No newline at end of file diff --git a/docs/architecture.md b/docs/architecture.md index b855749..939f000 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -57,6 +57,7 @@ Terminal 1 Terminal 2 | `run_gazebo.py` | Gazebo bridge + controllers | | `drone_controller.py` | Landing algorithm | | `rover_controller.py` | Moving landing pad | +| `gazebo/launch/drone_landing.launch.py` | ROS 2 launch file for Gazebo | ## ROS Topics diff --git a/docs/gazebo.md b/docs/gazebo.md index d4b7dee..b325ae9 100644 --- a/docs/gazebo.md +++ b/docs/gazebo.md @@ -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 diff --git a/docs/installation.md b/docs/installation.md index 609e5be..8b8ba17 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -154,7 +154,12 @@ Open PowerShell as Administrator: # Install WSL2 with Ubuntu 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)