Skip to content

Slugbotics/somars-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

somars-main

ROS 2 colcon workspace for the SOMARS autonomous drone (C-UASC 2026). This repo ties together all subsystems via git submodules.

Cloning with submodules:

git clone --recurse-submodules https://github.com/Slugbotics/somars-main.git
cd somars-main

Or, if already cloned without submodules:

git submodule update --init --recursive

to pull latest commits of each submodule's remote use:

git pull --recurse-submodules
# or try this if above doesn't work
git submodule update --remote

Quick Start (on the Jetson)

# One command to start everything:
./start.sh

# Or step by step:
./start.sh --no-vision   # Controls only (for testing)
./start.sh --sim         # Simulation (mock nodes, no hardware)

The start script handles: micro-XRCE-DDS Agent → somars-embedded nodes → somars-vision.

Manual start (if needed)

# Terminal 1 — micro-XRCE-DDS Agent (bridge PX4 ↔ ROS 2)
MicroXRCEAgent serial --dev /dev/ttyTHS1 -b 921600

# Terminal 2 — build & launch controls
colcon build --packages-select somars_controls
source install/setup.bash
ros2 launch somars_controls controls.launch.py

# Terminal 3 — vision
python3 src/somars-vision/main.py

Verify Topics

ros2 topic echo /fmu/out/vehicle_local_position   # PX4 position
ros2 topic echo /vision/detections                 # pixel detections from vision
ros2 topic echo /targets/ned                       # NED target from localizer
ros2 topic echo /fmu/in/trajectory_setpoint        # setpoints going to PX4

Hardware Wiring

Pixhawk 6x -UART-> Jetson Orin Nano micro-XRCE-DDS Agent bridges this serial link into ROS 2


Submodules

Submodule Repo Purpose
src/somars-embedded Slugbotics/somars-embedded Offboard manager, guidance node, target localizer
src/somars-vision Slugbotics/somars-vision YOLO detection, MJPEG streaming, orthophoto mapping
src/px4_msgs PX4/px4_msgs PX4 ROS 2 message definitions

Dependencies

  • ROS 2 Humble or Jazzy
  • Eigen3
  • micro-XRCE-DDS Agent (run separately on Jetson)
  • JetPack 6.2.2 (on Jetson Orin Nano)
  • Python 3 + rclpy, ultralytics, opencv-python (for vision)

Competition Day Checklist

  1. Calibrate camera (if not done): python3 src/somars-embedded/tools/calibrate_camera.py --camera 0 --cols 9 --rows 6 --square-size 0.025
  2. Edit waypoints in src/somars-embedded/config/waypoints.yaml (GPS coords given at check-in, altitudes in meters MSL)
  3. Set geofence in QGroundControl
  4. Start the stack: ./start.sh
  5. Monitor in QGroundControl (telemetry + map view)

About

main repository, connect everything for SOMARS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages