Skip to content

DIT-ROBOTICS/Eurobot-2026-Navigation2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Navigation Packages for DIT Robotics Eurobot 2026

This repository contains a customized navigation system based on the ROS 2 Navigation Stack (Nav2), adapted for DIT Robotics' Eurobot 2026 competition requirements.

Features

Basic Navigation

Enables smooth and efficient autonomous movement.

  • Uses /nav_to_pose and /nav_thru_poses action servers for basic navigation.

Docking Integration

Seamlessly integrates docking and navigation for autonomous charging or station return.

  • Utilizes the /dock_robot action server to control the docking process.

Multi-Functional Interfaces

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 the dock_type parameter.
  • rival_param.yaml: Supports dynamic rival data setup adjustments.

Stop Robot

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

Keepout Zone Index

The keepout zones correspond to specific regions on the Eurobot 2026 field, used to restrict robot access dynamically via /keepout_zone.

Keepout Zones Index 1 Keepout Zones Index 2

  • 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_zone topic.
  • 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: Square

see more about the params /navigation2_run/params/nav2_params_default.yaml

Custom Controller: follow_path_controller

Main features:

  • Look-ahead path following
    Uses a configurable look_ahead_distance to 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 exceeds costmap_tolerance:

    • Scales linear velocity by speed_decade (slowdown).
    • Sets angular velocity to zero temporarily.
    • Sets update_plan_ = true to request replanning.
    • If the robot is almost stopped, throws PlannerException("Obstacle detected") so the BT can enter recovery.
  • Goal yaw alignment
    Tracks the final goal yaw (final_goal_angle_).
    Uses angular_kp to scale the yaw error and clamps it with max_angular_vel_.
    Uses yaw_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 than rival_slowdown_radius_, scales linear speed by rival_decay_.
    Publishes the current distance on the rival_distance topic.

  • DelaySpin behavior
    When controller_function is set to "DelaySpin", in-place spinning is disabled near the start of the path.
    Spinning is only allowed after the robot moves beyond spin_delay_threshold_, then the mode automatically switches back to "None".

  • Dynamic speed limiting
    Supports setSpeedLimit() to apply dynamic speed limits, either as a percentage of a base speed or as an absolute value.

Supported Keywords for /dock_robot API parameter /dock_type

(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

Format for rival_param.yaml

rival_parameters:
  rival_inscribed_radius: *data(double)*

How to Use

For environment setup instructions and Docker configurations, please refer to the docker/ directory.


Repository Structure

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


Contribution

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Submit a pull request.

License

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.


Contact

For any issues or inquiries, please open an issue on GitHub or contact the DIT Robotics team.

About

The Navigation Framework and System of Eurobot2026

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5