How btvvardhan/ras598_project works
Project Type and Purpose
• This is a robotics simulation pipeline combining PX4 (flight control), Gazebo Sim (custom terrain), and ROS 2 (middleware).
File Structure
• Top-level:
• README.md, space robotics final report.pdf
• ros2_project/ (ROS 2 package tree)
• Under ros2_project/:
• launch/ (arena.launch.py, drone.launch.py) – orchestration of Gazebo, PX4 and nodes
• resource/ (custom_world.sdf, rviz config) – simulation world and visualization
• ros2_project/ (Python nodes & model weights) – sensor publishers, object detection, coordinate estimation, TF broadcaster, controllers
• package.xml, setup.py/cfg – build and dependency config
README Insights
• Stack: ROS 2 Humble/Jazzy, Gazebo Sim, PX4, Python 3.10+, YOLOv8
• Workflow steps: launch drone, publish camera info, run YOLO, estimate coordinates
• Key topics and transforms: /rgb_camera, /depth_camera, /synced/*, TF tree (camera→world)
Main Components
a. Simulation Environment
• Gazebo Sim
• PX4 Autopilot plugin
• Custom world (custom_world.sdf)
b. ROS 2 Middleware
• Launch system (drone.launch.py)
• Topics and TF
c. Perception Nodes
• camera_info_publisher (sync RGB & depth)
• yolo (YOLOv8 detection)
• coordinates (3D coordinate computation + TF)
d. Control Nodes
• velocity_control / control (keyboard or algorithmic commands)
• odometry_tf_broadcaster (publish drone pose)
e. Visualization
f. External Dependencies
• NVIDIA GPU (for YOLO)
• colcon build system
Relationships and Data Flow
• Gazebo → camera topics (/rgb_camera, /depth_camera)
• camera_info_publisher subscribes and republishes on /synced/*
• yolo node subscribes to /synced/rgb_camera, outputs annotated images
• control nodes send velocity or keyboard commands to PX4 through ROS topics
• odometry_tf_broadcaster publishes drone pose transforms for coordinate conversion
• RViz2 subscribes to final image and TF
Architectural Patterns and Principles
• Modular ROS 2 node architecture (single responsibility per node)
• Pub-sub messaging pattern for decoupling perception, control, and visualization
• TF2 transform tree for spatial frame management
• Launch files as composition root for bringing up simulation
Essential Elements
• Component labels (node names, systems)
• TF transforms (camera_frame → world_frame)