This repository contains a customized navigation system based on the ROS 2 Navigation Stack (Nav2), adapted for DIT Robotics' Eurobot 2026 competition requirements.
Enables smooth and efficient autonomous movement.
- Uses
/nav_to_poseand/nav_thru_posesaction servers for basic navigation.
Seamlessly integrates docking and navigation for autonomous charging or station return.
- Utilizes the
/dock_robotaction server to control the docking process.
Offers a variety of commands for enhanced control and flexibility:
/stopRobot: Lock/unlock the robot./keepout_zone: Dynamically set keepout zones to avoid certain areas./dock_robot: Supports flexible keyword-based commands via thedock_typeparameter.rival_param.yaml: Supports dynamic rival data setup adjustments.
Control the robot's emergency stop or resume behavior via the /stopRobot topic.
true: Immediately stops and locks the robot.false: Unlocks and resumes normal operation.- Message Type:
std_msgs/msg/Bool
The keepout zones correspond to specific regions on the Eurobot 2026 field, used to restrict robot access dynamically via /keepout_zone.
- Pantry zones are labeled A through J on the field map.
- Hazelnut zones are labeled K through R on the field map.
- These zones can be toggled at runtime using the
/keepout_zonetopic. - Suitable for strategic behaviors like avoiding opponent areas or obstacle fields.
- Message Type:
std_msgs/msg/String - parameter settings:
global_costmap:
global_costmap:
ros__parameters:
keepout_layer:
inflation_length: 0.15 # distance over which cost is inflated
cost_scaling_factor: 5.0 # higher value -> steeper cost increase
keepout_expand_mode: 1 # 0: Circle, 1: Squaresee more about the params /navigation2_run/params/nav2_params_default.yaml
Main features:
-
Look-ahead path following
Uses a configurablelook_ahead_distanceto pick a look-ahead target on the global path and generate smooth velocity commands. -
Costmap-aware slowdown and replanning
Checks cost values along the segment from current pose to a point ahead on the path.
If any cell exceedscostmap_tolerance:- Scales linear velocity by
speed_decade(slowdown). - Sets angular velocity to zero temporarily.
- Sets
update_plan_ = trueto request replanning. - If the robot is almost stopped, throws
PlannerException("Obstacle detected")so the BT can enter recovery.
- Scales linear velocity by
-
Goal yaw alignment
Tracks the final goal yaw (final_goal_angle_).
Usesangular_kpto scale the yaw error and clamps it withmax_angular_vel_.
Usesyaw_goal_tolerance_to decide when the orientation is aligned. -
Rival-aware slowdown (optional)
Computes the distance between the robot and the rival.
When the distance is smaller thanrival_slowdown_radius_, scales linear speed byrival_decay_.
Publishes the current distance on therival_distancetopic. -
DelaySpin behavior
Whencontroller_functionis set to"DelaySpin", in-place spinning is disabled near the start of the path.
Spinning is only allowed after the robot moves beyondspin_delay_threshold_, then the mode automatically switches back to"None". -
Dynamic speed limiting
SupportssetSpeedLimit()to apply dynamic speed limits, either as a percentage of a base speed or as an absolute value.
(Keyword order does not matter and is designed for compatibility.)
-
Template Base:
dock: Triggers the docking process.
-
Functional Tags:
- Controller Type:
fast,slow,linearBoost,angularBoost - Goal Checker Type:
precise,loose - Offset Direction:
x,y,z - Docking Style:
ordinary,gentle,rush - Special Control:
delaySpin
- Controller Type:
rival_parameters:
rival_inscribed_radius: *data(double)*For environment setup instructions and Docker configurations, please refer to the docker/ directory.
Eurobot-2026
└── Eurobot-2026-ws/
└── src/
├── Eurobot-2026-Navigation2/ # Core navigation system code
├── custom_bts/ # Custom behavior trees
├── custom_controller/ # Custom controller plugins
├── custom_layer/ # Custom costmap layers
├── navigation2_run/ # Navigation system packages
├── Navigation2/ # Modified version of Nav2
└── opennav_docking/ # Docking server implementation
└── Eurobot-2026-Navigation2-envs/ # Docker environments
├── Navigation2-humble-local/ # Local PC environment
└── Navigation2-humble-deploy/ # Remote machine environment
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Portions of this software are based on the ROS 2 Navigation Stack (Nav2), which is licensed under the Apache License 2.0. See the Navigation2 submodule for more details.
For any issues or inquiries, please open an issue on GitHub or contact the DIT Robotics team.

