Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions base/opennav_docking_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.5)
project(opennav_docking_msgs)

find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(std_msgs REQUIRED)
find_package(action_msgs REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
"action/DockRobot.action"
"action/UndockRobot.action"
"srv/ReloadDatabase.srv"
DEPENDENCIES builtin_interfaces geometry_msgs std_msgs action_msgs nav_msgs
)

ament_export_dependencies(rosidl_default_runtime)

ament_package()
30 changes: 30 additions & 0 deletions base/opennav_docking_msgs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# opennav_docking_msgs

The docking actions of [opennav_docking](https://github.com/open-navigation/opennav_docking)
(`DockRobot`, `UndockRobot`, `ReloadDatabase`). Navigation serves them (its vendored
`opennav_docking` in `Eurobot-Template-Navigation`), main calls `DockRobot`, so the definition
lives here in the base like every other cross-domain type: one copy, built once.

Upstream name kept on purpose: the action type name (`opennav_docking_msgs/action/DockRobot`) is
part of what both sides match on, and the vendored Nav2 / opennav_docking code includes these
headers by that name.

## Where it came from

Copied from `Eurobot-Template-Navigation` `src/third_party/opennav_docking/opennav_docking_msgs`
(= `Eurobot-2026-Navigation2` `develop` bb0ab0c, upstream `package.xml` version 0.0.2).

DIT changes on top of upstream (2026; compared with upstream `main` on 2026-11-25, which has
901–906 and 999):

- `DockRobot` result error codes `STOP_ROBOT=900` and `BLOCK_BY_RIVAL=907`.

DIT-X changes:

- `package.xml` lists only what the interfaces use (upstream also depended on rclcpp,
rclcpp_action, rclcpp_lifecycle, nav2_util, nav2_msgs and tf2_ros); it adds `std_msgs` and
`action_msgs`, which `CMakeLists.txt` already used.

2026 main kept its own copy in `src/Interface/opennav_docking_msgs`, which had already drifted:
it lacked `STOP_ROBOT=900`. Constants do not change the wire format, so 2026 still worked, but
that is exactly the drift a single copy in the base prevents.
44 changes: 44 additions & 0 deletions base/opennav_docking_msgs/action/DockRobot.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#goal definition

bool use_dock_id True # Whether to use the dock_id or dock_pose fields
string dock_id # Dock name or ID to dock at, from given dock database

geometry_msgs/PoseStamped dock_pose # Dock pose
string dock_type # If using dock_pose, what type of dock it is. Not necessary if only using one type of dock.

float32 max_staging_time 1000.0 # Maximum time for navigation to get to the dock's staging pose.
bool navigate_to_staging_pose True # Whether or not to navigate to staging pose or assume robot is already at staging pose within tolerance to execute behavior

---
#result definition

# Error codes
# Note: The expected priority order of the errors should match the message order
uint16 NONE=0
uint16 STOP_ROBOT=900
uint16 DOCK_NOT_IN_DB=901
uint16 DOCK_NOT_VALID=902
uint16 FAILED_TO_STAGE=903
uint16 FAILED_TO_DETECT_DOCK=904
uint16 FAILED_TO_CONTROL=905
uint16 FAILED_TO_CHARGE=906
uint16 BLOCK_BY_RIVAL=907
uint16 UNKNOWN=999

bool success True # docking success status
uint16 error_code 0 # Contextual error code, if any
uint16 num_retries 0 # Number of retries attempted

---
#feedback definition

uint16 NONE=0
uint16 NAV_TO_STAGING_POSE=1
uint16 INITIAL_PERCEPTION=2
uint16 CONTROLLING=3
uint16 WAIT_FOR_CHARGE=4
uint16 RETRY=5

uint16 state # Current docking state
builtin_interfaces/Duration docking_time # Docking time elapsed
uint16 num_retries 0 # Number of retries attempted
25 changes: 25 additions & 0 deletions base/opennav_docking_msgs/action/UndockRobot.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#goal definition

# If initialized on a dock so the server doesn't know what type of dock its on,
# you must specify what dock it is to know where to stage for undocking.
# If only one type of dock plugin is present, it is not necessary to set.
# If not set & server instance was used to dock, server will use current dock information from last docking request.
string dock_type

float32 max_undocking_time 30.0 # Maximum time to undock

---
#result definition

# Error codes
# Note: The expected priority order of the errors should match the message order
uint16 NONE=0
uint16 DOCK_NOT_VALID=902
uint16 FAILED_TO_CONTROL=905
uint16 UNKNOWN=999

bool success True # docking success status
uint16 error_code 0 # Contextual error code, if any

---
#feedback definition
28 changes: 28 additions & 0 deletions base/opennav_docking_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>opennav_docking_msgs</name>
<version>0.0.2</version>
<description>Docking / undocking interfaces of opennav_docking, with the DIT error codes. Lives in the shell repo because navigation serves DockRobot and main calls it.</description>
<maintainer email="steve@opennav.org">Steve Macenski</maintainer>
<maintainer email="dit.robotics@gmail.com">DIT Robotics</maintainer>
<license>Apache-2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>

<!-- DIT-X: only what the interfaces use; upstream also listed rclcpp, rclcpp_action,
rclcpp_lifecycle, nav2_util, nav2_msgs and tf2_ros, which would pull Nav2 into the base -->
<depend>action_msgs</depend>
<depend>builtin_interfaces</depend>
<depend>geometry_msgs</depend>
<depend>nav_msgs</depend>
<depend>std_msgs</depend>

<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
5 changes: 5 additions & 0 deletions base/opennav_docking_msgs/srv/ReloadDatabase.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reloads the dock's database with a new filepath

string filepath
---
bool success