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
.msgor.srvfile associated with that interface.
ROS messages and services used across many ROS packages in the project.
| 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 |
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)
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.headingfield is set to0.0 - The
steeringfield is set to0 - This signals a stop condition to the boat indicating pathfinding failure.
ROS messages and services used in our boat simulator.
| Topic | Type | Publisher | Subscriber(s) |
|---|---|---|---|
mock_kinematics |
SimWorldState | Simulator Physics Engine | Simulator Visualizer |
| Action | Client Node | Server Node |
|---|---|---|
| SimRudderActuation | Simulator Physics Engine | Simulator Low Level Controller |
| SimSailTrimTabActuation | Simulator Physics Engine | Simulator Low Level Controller |
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.
