| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository implements a modular and robust Monte Carlo Localisation (Particle Filter) system for an Autonomous Mobile Robot (AMR). This code was developed as part of a broader, integrated navigation framework for the Master of Autonomous Systems program at Hochschule Bonn-Rhein-Sieg. While the full team project included hardware deployment and full-stack path planning/exploration, this specific repository and default branch highlight my individual contributions: developing and tuning the Monte Carlo Localization (Particle Filter) stack within a ROS2 simulation environment.
I was responsible for designing and implementing the probabilistic localization system in simulation. My core deliverables included:
While this repository focuses on my simulation-based localization work, the complete AMR project was a joint effort.
Team Members & Roles:
Note: Because my specific ray-casting and velocity-based motion models were heavily optimized for the simulation environment, the final hardware deployment on the physical Robile utilized a modified configuration. To allow reviewers to easily test my original simulation algorithms without hardware dependency conflicts, I have included a dedicated sim_localization.launch.py file in this branch.
Monte-Carlo-Localization-Sim-ROS2/
│
├── clearance_maps/ # Pre-generated safety maps and clearance data
│
├── environment_exploration/ # Autonomous exploration and frontier detection
│ ├── frontier_explorer.py # Main frontier exploration node
│ └── utils/ # Utilities for detection, clustering, and goal selection
│
├── launch/ # ROS2 launch files
│ ├── motionandpathplanner.launch.py
│ └── sim_localization.launch.py
│
├── localisation/ # ⭐ Sai's implementation of particle filter
│ ├── particle_filter.py # Monte Carlo localization implementation with linear & circular
│ │ # motion models, adaptive likelihood, and raycasting sensor models
│ ├── occupancy_field.py # Optimised KNN based distance retrieval to identify obstacle distance
│ └── helper_functions.py # Code to perform ROS2 TF transformations
│
├── motion_and_path_planning/ # Motion control and global/local path planning functionalities
│ ├── a_star_path_planner.py # A* algorithm for global planning
│ ├── potential_field_implementation.py # Potential field for local obstacle avoidance
│ ├── pose_execuetor.py # Executes the poses
│ ├── path_visualizer.py # Renders planned paths in RViz
│ └── voronoi_path_planner.py # Voronoi based planning
│
├── my_map/ # SLAM generated maps (metadata & db3)
│
├── rviz_config/ # RViz visualization configurations
│ └── robile_nav.rviz
│
├── srv/ # ROS2 Custom Service definitions
│ └── GetStatus.srv
│
├── particle_filter_output_simulation.png # Localization simulation output visualization
├── random particle injection rviz output.png # Random particle injection visualization
├── AMR_Autonomous_navigation_exploration_localisation.pdf # Project report documentation
├── package.xml # ROS2 package configuration
├── setup.py # Python package setup
└── README.md # Project documentation
To evaluate the most effective localization strategy for the Robile platform in simulation, I developed and compared two distinct approaches. Both are available in this repository:
Note: The main branch contains the finalized team integration for the physical hardware deployment (path planning, exploration, etc.) for full context.
To get started with the project, follow these steps:
Clone the repository (Default branch: velocity_based_particle_filter):
git clone -b velocity_based_particle_filter https://github.com/saiga006/Monte-Carlo-Localization-Sim-ROS2.git
cd Monte-Carlo-Localization-Sim-ROS2Install ROS2 and dependencies: Ensure you have ROS2 installed. Then, install the dependencies:
rosdep install --from-paths src --ignore-src -r -yBuild the workspace:
colcon build
source install/setup.bashLaunch the localization sub-system within the robot's simulation stack:
ros2 launch amr_project_amr_t04 sim_localization.launch.pyThe particle filter estimates the robot's pose by maintaining a set of weighted particles. I implemented dual motion models to handle different movement patterns:
Linear Motion Model: $$x_t = x_{t-1} + v_x \cdot \cos(\theta_{t-1}) \cdot \Delta t - v_y \cdot \sin(\theta_{t-1}) \cdot \Delta t + \epsilon_x$$ $$y_t = y_{t-1} + v_x \cdot \sin(\theta_{t-1}) \cdot \Delta t + v_y \cdot \cos(\theta_{t-1}) \cdot \Delta t + \epsilon_y$$ $$\theta_t = \theta_{t-1} + \omega \cdot \Delta t + \epsilon_\theta$$
Circular Motion Model: Utilized when angular velocity is significant ($\omega \neq 0$) to provide accurate curved trajectory predictions.
To evaluate particle weights against incoming laser scan data, I utilized a Likelihood Field Model:
$$P(z_t \mid x_t) = \prod_{k=1}^K [z_{hit} \cdot p_{hit}(z_t^k \mid x_t) + z_{rand} \cdot p_{rand}(z_t^k \mid x_t)]$$
To achieve real-time performance in simulation, I optimized the sensor updates using:
The localisation code implementation is specifically adapted based on the work of Amy Phung and the Olin College Computational Robotics module assignment. We are highly appreciative of their open-source educational materials documenting the framework:
Additionally, we acknowledge the support of teaching assistant Anudeep Sai Akula in setting up the Robile platform and guiding us in case of any issues.
| Back | FazBrowse Home | New Git URL |