Skip to content

Latest commit

 

History

History
95 lines (65 loc) · 4.56 KB

File metadata and controls

95 lines (65 loc) · 4.56 KB

Custom Interfaces

UBC Sailbot's custom interfaces ROS package. To add custom_interfaces to another ROS package, follow the instructions here.

The terminology that we use in this document are the following:

  • External Interface: An interface used to communicate data between nodes and ROS packages.
  • Internal Interface: An interface used to standardize conventions across external interfaces. Standards are documented in the .msg or .srv file associated with that interface.

Project-wide Interfaces

ROS messages and services used across many ROS packages in the project.

Project-wide External Interfaces

External Interface Diagram

Project-wide Internal Interfaces

Interface Used In
HelperAISShip AISShips
HelperBattery Batteries
HelperDimension HelperAISShip
HelperGenericSensor GenericSensors
HelperHeading DesiredHeading, GPS, HelperAISShip
HelperLatLon GPS, HelperAISShip, Path
HelperROT HelperAISShip
HelperSpeed GPS, HelperAISShip, WindSensor

Safety and Error Handling

DesiredHeading Message - Stop Logic

The DesiredHeading message includes a sail boolean field that controls whether the boat should proceed or stop:

  • sail = True: Boat should proceed with the specified heading (normal operation)
  • sail = False: Boat should stop/not sail (pathfinding failure or safety condition)

When sail is set to False

The local pathfinding node sets sail = False when:

  • OMPL path planning fails to find a valid solution
  • An exception occurs during path retrieval (e.g., invalid state space)
  • No safe path can be computed due to obstacles or constraints

When sail = False:

  • The heading.heading field is set to 0.0
  • The steering field is set to 0
  • This signals a stop condition to the boat indicating pathfinding failure.

Boat Simulator Interfaces

ROS messages and services used in our boat simulator.

Boat Simulator External Interfaces

Topic Type Publisher Subscriber(s)
mock_kinematics SimWorldState Simulator Physics Engine Simulator Visualizer

Boat Simulator Actions

Action Client Node Server Node
SimRudderActuation Simulator Physics Engine Simulator Low Level Controller
SimSailTrimTabActuation Simulator Physics Engine Simulator Low Level Controller

Resources

Common Interfaces

The ROS2 common_interfaces repository defines a set of packages which contain common interface files. Since we are using the Humble version of ROS2, see the humble branch. These interfaces can be used in this repository or as a reference for ideas and best practices.

Package Possible Usage
diagnostic_msgs Could be used for website sensors
geometry_msgs Simulator, Local Pathfinding
sensor_msgs Reference for CAN Transceiver
std_msgs Reference
std_srvs Reference
visualization_msgs Reference

For more detail on the usefulness of each package, see this issue comment. If you are interested in creating your own custom message or service, see the ROS Humble documentation.