ROS2 implementation of an adaptive pendulum-based controller for an autonomous surface vehicle (ASV) towing system. The controller uses line-of-sight (LOS) guidance for path following and an adaptive control scheme for managing the towed payload dynamics.
- Line-of-sight (LOS) guidance for path following
- Pendulum-based adaptive control for towing dynamics
- ROS2 integration with Gazebo simulation
- Configurable controller parameters
- Support for GPS waypoint following (lat/lon to local ENU conversion)
This controller is designed to work with the Marine Robotics Simulation Framework, which provides the simulation environment and ASV/ROV models.
Other dependencies:
- ROS2
nav_msgsstd_msgsnumpy
-
Clone the repository into your ROS2 workspace:
cd ~/your_workspace/src git clone https://github.com/ImStian/asv_controller.git
-
Source your ROS2 environment:
source /opt/ros/humble/setup.bash -
Build the package:
cd .. colcon build --symlink-install --merge-install --packages-select asv_controller -
Source the workspace:
source install/setup.bash
Launch the controller node:
ros2 launch asv_controller asv_controller.launch.pyThe following parameters can be configured in the launch file or via the ROS2 parameter system:
U: Desired surge speed for LOS guidance (m/s)Delta: Lookahead distance for LOS guidance (m)k: Path convergence gain for LOS guidanceL: Pendulum controller parameter (length of 'rod')epsilon: Pendulum controller adaptation ratek_v: Velocity feedback gain for pendulum controllerk_a: Adaptation gain for pendulum controllerm_virtual: Virtual mass for heading controllerpath_file: Path to YAML file with waypointsref_lat: Reference latitude for ENU conversionref_lon: Reference longitude for ENU conversionref_alt: Reference altitude for ENU conversion
The waypoint file should be in YAML format:
waypoints:
- [lat1, lon1]
- [lat2, lon2]
# .../model/blueboat/odometry(nav_msgs/Odometry): ASV odometry/model/rov/odometry(nav_msgs/Odometry): ROV/towed payload odometry
/model/blueboat/joint/motor_port_joint/cmd_thrust(std_msgs/Float64): Port thruster command/model/blueboat/joint/motor_stbd_joint/cmd_thrust(std_msgs/Float64): Starboard thruster command
Apache-2.0