FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DIT-ROBOTICS/Eurobot-2027-Navigation2 · GitHub

Repository files navigation

Navigation Packages for DIT Robotics Eurobot 2027

This repository contains a customized navigation system based on the ROS 2 Navigation Stack (Nav2), adapted for DIT Robotics' Eurobot 2027 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 2027 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_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

Controller: TEB

We use the TEB controller with multiple profiles (Fast/Slow/LinearBoost/AngularBoost) tuned for different speeds and obstacle conditions.

Main features:

  • Time‑elastic band optimization
    Optimizes a short‑horizon trajectory (poses + timing) to satisfy kinematic limits while progressing toward the goal.

  • Obstacle‑aware trajectory shaping
    Penalizes proximity to obstacles and can slow down or replan when the costmap indicates blocked space ahead.

  • Goal handling
    Uses goal distance thresholds to decide when to stop in position vs. rotate toward the final heading.

  • Profile‑based tuning
    Different parameter sets for fast/slow/boost behaviors (e.g., max_v/max_w, obstacle distances, cooldowns).

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

Nav2 planner has been modified with custom logic and parameters

  • SmacPlanner2D

    • Straight-line refinement
      SMAC 2D expands 8-connected neighbors, which can produce zig-zag paths even in free space. We add a line-of-sight check after A* (LineIterator + collision check): if a straight segment is collision-free, intermediate nodes are skipped and the segment is resampled into evenly spaced points with consistent orientation. This yields straighter, smoother paths.

    • New parameters (planner_server -> GridBased)

      • straight_line_max_skip_points: max nodes to skip for line-of-sight jump
      • straight_line_resample_points: points per segment (used when spacing <= 0)
      • straight_line_resample_spacing: fixed spacing (meters), overrides points
  • NavfnPlanner2D

    • Straight-line refinement

      • use linear scale to mapping global costmap into navfn costmap (cost 1~254), not use COST_NEUTRAL as base.
      • add function to fix the oscillation and stagnation issues during path extraction, including plateau detection and fallback mechanisms for better robustness in complex environments.
      • add obstacle bias in A* updates to penalize high-cost cells.
      • adjust A* heuristic scaling, encouraging safer path choices.
    • New parameters (planner_server -> GridBased)

      # A* / propagation parameters
      heuristic_scale: 1.0             # Weight of heuristic term in A* (higher = more greedy toward goal)
      priority_increment_scale: 2.0    # Scale factor for A* priority threshold increment (larger = faster but less optimal)
      # Obstacle-aware bias
      obstacle_bias_scale: 0.4         # Strength of extra cost added for high-cost cells to avoid obstacles/inflation (0.15 ~ 0.5)
      obstacle_bias_offset: 10.0       # Cost offset before obstacle bias is applied (ignore small cost variations) (3.0 ~ 10.0)
      # Path extraction / fallback
      plateau_stagnation_steps: 3      # Number of stagnant steps to trigger plateau handling
      min_gradient_norm: 0.9           # Minimum gradient norm to continue path extraction without fallback
      potential_epsilon: 1.0e-3        # Minimum potential decrease to reset stagnation counter

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)*

Environment Setup

Quick Start

This repository includes a convenient nav2.sh script for managing Docker containers and development workflows.

Installation

  1. Clone the repository:
    git clone https://github.com/DIT-ROBOTICS/Eurobot-2027-Navigation2.git
cd Eurobot-2027-Navigation2
  1. Install the nav2 command globally:
./nav2.sh install
  1. Add to your PATH (if not already added):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Available Commands

Once installed, you can use the following commands from anywhere:

Build & Development

  • nav2 rebuild - Rebuild Docker images
  • nav2 build - Build the entire ROS2 workspace
  • nav2 dev - Enter interactive development shell

Running Services

  • nav2 run - Launch Navigation2 stack (detached)
  • nav2 vnc - Start VNC server with GUI support (port 5901)

Container Management

  • nav2 stop [service] - Stop containers (all or specific: build, dev, run, vnc)
  • nav2 ps - Show running containers status
  • nav2 clean - Stop all and remove containers

Monitoring & Debugging

  • nav2 logs [service] - View container logs (follow mode)
  • nav2 exec <service> <cmd> - Execute command in running container
    • Example: nav2 exec dev "ros2 topic list"

Help

  • nav2 tools - Show detailed command reference

Docker Services

  • build - Compiles the ROS2 workspace using colcon build
  • dev - Development environment for testing and debugging
  • run - Runs the main navigation stack (real_launch.py)
  • vnc - Provides GUI access via VNC (useful for rviz2)

Examples

# Build the workspace
nav2 build

# Enter development container
nav2 dev

# Inside the container, you can:
# - source install/local_setup.bash
# - ros2 launch navigation2_run real_launch.py
# - ros2 topic list
# - rviz2

# Run navigation (detached)
nav2 run

# Check logs
nav2 logs run

# Stop a specific service
nav2 stop run

How to Use

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


Repository Structure

Eurobot-2027
└── Eurobot-2027-ws/
   └── src/
      ├── Eurobot-2027-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-2027-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

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL