This is the 2025-2026 iteration of the Kehillah autonomous sailing robot control system built on ROS2 (Robot Operating System 2). The system is designed for the sailbot competition: https://www.sailbot.org/
- Multi-Event Support: Fleet race, precision navigation, station keeping, endurance, payload, and search events
- Advanced Path Planning: Fortran-optimized algorithms for high-performance navigation calculations
- Sensor Integration: GPS, wind sensors, rudder/winch control, and cellular communication
- Autonomous/RC Mode Switching: Seamless transition between manual and autonomous control
- Global Wind Backup: Reliable wind direction backup system for sensor failures
- Timing Control: Precise actuator control timing for optimal performance
- Web Integration: Real-time status reporting and notifications
sailbot2526/
├── src/
│ ├── sailboat_control/ # Core autonomous control logic
│ ├── sensors/ # Sensor nodes and hardware interfaces
│ └── path_planning/ # Navigation algorithms and waypoint management
├── docs/ # Documentation
├── util/ # Utility scripts
└── start_sailbot.sh # System launcher script
- Sailboat Control: Event management, boat state control, autonomous decision making
- Sensors: GPS, wind sensors, rudder/winch control, cellular communication
- Path Planning: High-performance navigation algorithms with Fortran optimization
System Requirements:
- Ubuntu 24.04 LTS
- ROS2 Jazzy
- Python 3.12+
- GNU Fortran compiler
Install Dependencies:
# System dependencies
sudo apt update && sudo apt install -y \
python3-serial python3-smbus i2c-tools \
gfortran meson ros-jazzy-desktop
# Python dependencies
pip3 install websocket-client numpy- Clone and Build:
git clone https://github.com/your-username/sailbot2526.git
cd sailbot2526- Launch the System:
./start_sailbot.shThis script will:
- Build the Fortran modules for optimized path planning
- Compile all ROS2 packages
- Launch all sensor nodes and control systems
# In a new terminal, test GPS node
ros2 topic echo /gps/fix
# Test wind sensor
ros2 topic echo /wind/direction
# Check system status
ros2 topic echo /boat/status| Event Type | Description | Autonomous Features |
|---|---|---|
Fleet Race (F) |
Traditional sailing race | RC mode only |
Precision Navigation (Pr) |
Navigate precisely through waypoints | Full autonomous waypoint following |
Station Keeping (S) |
Maintain position in designated area | Position holding algorithms |
Endurance (E) |
Long-duration autonomous sailing | Extended waypoint sequences |
Payload (P) |
Carry payload while navigating | Specialized control for added weight |
Search (Se) |
Visual-based buoy detection and approach | Camera-based visual servoing |
Developer Mode (D) |
Testing and development | Local test waypoints |
# Launch with specific event type
ros2 run sailboat_control state_management_node --ros-args -p event_type:=search
# Or specify in launch parameters
./start_sailbot.sh --event-type precision_navigation- Fortran-optimized algorithms for 10-50x performance improvements
- Polar performance curves for optimal sail trim calculations
- Weather routing with wind pattern integration
- Obstacle avoidance algorithms
- Real-time orange buoy detection using camera input
- P-controller based visual servoing for precise approach
- Distance-based hit detection with configurable thresholds
- Automatic upwind recovery after buoy contact
Provides reliable wind direction when primary sensor fails:
- Manual wind angle configuration via ROS parameters
- Dynamic updates through ROS topics
- Automatic fallback with configurable timeout
- Status reporting for wind source monitoring
ros2 run sailboat_control state_management_node --ros-args \
-p event_type:=search \
-p global_wind_angle:=270.0 \
-p use_global_wind:=false \
-p wind_sensor_timeout:=5.0 \
-p rudder_update_interval:=3.0 \
-p sail_update_interval:=10.0| Parameter | Default | Description |
|---|---|---|
event_type |
developer_mode |
Competition event type |
global_wind_angle |
0.0 |
Backup wind direction (degrees) |
wind_sensor_timeout |
5.0 |
Timeout before using global wind (seconds) |
rudder_update_interval |
3.0 |
Rudder control update frequency |
sail_update_interval |
10.0 |
Sail control update frequency |
| Topic | Type | Description |
|---|---|---|
/gps/fix |
NavSatFix |
GPS position data |
/wind/direction |
Float32 |
Wind direction (degrees) |
/control/rudder_angle |
Float32 |
Rudder position command |
/control/sail_angle |
Float32 |
Sail position command |
/camera/buoy_angle_offset |
Float32 |
Visual servo angle error |
/boat/status |
String |
JSON system status |
/web/notification |
String |
Web server notifications |
# Real-time system monitoring
ros2 topic echo /boat/status
# Visual servoing feedback
ros2 topic echo /camera/buoy_angle_offset
# Wind system status
ros2 topic echo /wind/status- Global Wind System - Backup wind direction system
- Search Event - Visual buoy detection and approach
- Timing Control - Precise actuator timing control
- Fortran Integration - High-performance path planning
- Fortran Improvements - Performance optimization details
- Fortran Integration Guide - Integration methodology
- System Architecture - Overall system design
- Sensor Integration - Hardware interface specifications
- Event Management - Event system design
cd src/path_planning
./build_all_fortran.sh# Path planning tests
cd src/path_planning
python3 test_fortran_leg.py
# ROS2 package tests
colcon test --packages-select sailboat_control sensors path_planning# Launch in developer mode with local test waypoints
ros2 run sailboat_control state_management_node --ros-args -p event_type:=developer_modeFortran Module Build Failures:
# Check dependencies
which gfortran
python3 -c "import numpy.f2py"
# Manual rebuild
cd src/path_planning
./build_fortran.shGPS Connection Issues:
# Check serial port permissions
sudo usermod -a -G dialout $USER
# Then logout and login again
# Test GPS hardware
sudo cat /dev/ttyAMA0Wind Sensor Timeout:
# Enable global wind backup
ros2 param set /sailboat_control use_global_wind true
ros2 param set /sailboat_control global_wind_angle 270.0# Enable verbose logging
export ROS_LOG_LEVEL=DEBUG
ros2 run sailboat_control state_management_node --ros-args -p event_type:=search