{"id":23379513,"url":"https://github.com/taherfattahi/ros2-slam-auto-navigation","last_synced_at":"2026-03-08T07:32:16.371Z","repository":{"id":268152990,"uuid":"903473120","full_name":"taherfattahi/ros2-slam-auto-navigation","owner":"taherfattahi","description":"Autonomous Mapping and Navigation Using SLAM Toolbox, Nav2, Gazebo, and Rviz Visualization","archived":false,"fork":false,"pushed_at":"2025-02-04T16:50:41.000Z","size":23476,"stargazers_count":32,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-12T16:45:22.530Z","etag":null,"topics":["autonomous-driving","autonomous-robots","gazebo","navigation","navigation2","robotics","ros2","ros2-humble","rviz2","slam","slam-toolbox","wheel"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taherfattahi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-14T17:35:29.000Z","updated_at":"2025-06-30T05:27:33.000Z","dependencies_parsed_at":"2025-02-04T17:39:58.364Z","dependency_job_id":null,"html_url":"https://github.com/taherfattahi/ros2-slam-auto-navigation","commit_stats":null,"previous_names":["taherfattahi/ros2-slam-auto-navigation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/taherfattahi/ros2-slam-auto-navigation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taherfattahi%2Fros2-slam-auto-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taherfattahi%2Fros2-slam-auto-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taherfattahi%2Fros2-slam-auto-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taherfattahi%2Fros2-slam-auto-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taherfattahi","download_url":"https://codeload.github.com/taherfattahi/ros2-slam-auto-navigation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taherfattahi%2Fros2-slam-auto-navigation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30248893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T05:41:50.788Z","status":"ssl_error","status_checked_at":"2026-03-08T05:41:39.075Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autonomous-driving","autonomous-robots","gazebo","navigation","navigation2","robotics","ros2","ros2-humble","rviz2","slam","slam-toolbox","wheel"],"created_at":"2024-12-21T19:19:11.318Z","updated_at":"2026-03-08T07:32:16.346Z","avatar_url":"https://github.com/taherfattahi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROS2 SLAM Autonomous Navigation with SLAM Toolbox and Nav2\n\nUse the SLAM Toolbox to generate a map of the environment, then utilize the Nav2 stack for autonomous navigation within that mapped space. Rviz provides visualization of the robot, its surroundings, and ongoing navigation tasks.\n\n## Demo Video\n[![IMAGE](images/image_thumbnail.png)](https://youtu.be/-g2nmHqZfgc?si=NTKtegcQCZkt2e99)\n\n\n## Overview\n\nThis project provides:\n- **Gazebo** simulation environment.\n- **ROS2** Control integration to handle the robot’s joints and controllers.\n- **SLAM Toolbox** for online (asynchronous) map building as the robot explores.\n- **Nav2** stack to plan paths and autonomously navigate in the mapped environment.\n- **Rviz2** visualization for monitoring robot state, the map, and navigation plans.\n\n## Transform frame\n![tf2_frames](images/tf2_frames.png)\n\n\n## Dependencies and Setup\n\n-  Install ROS 2 Humble - [Read here](https://docs.ros.org/en/humble/Installation.html)\n-  Create Workspace - [Read here](https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html)\n-  Install XACRO \n```sh\nsudo apt install ros-\u003cdistro-name\u003e-xacro \n```\n- Gazebo ROS Packages\n```sh\nsudo apt install ros-\u003cdistro-name\u003e-gazebo-ros-pkgs\n```\n- ROS2 Control\n```sh\nsudo apt install ros-\u003cdistro-name\u003e-ros2-control ros-\u003cdistro-name\u003e-ros2-controllers ros-\u003cdistro-name\u003e-gazebo-ros2-control\n```\n- SLAM Toolbox\n```sh\nsudo apt install ros-\u003cdistro-name\u003e-slam-toolbox\n```\n- Nav2 and Twist Mux \n```sh\nsudo apt install ros-\u003cdistro-name\u003e-navigation2 sudo apt install ros-\u003cdistro-name\u003e-nav2-bringup sudo apt install ros-\u003cdistro-name\u003e-twist-mux\n```\n\n## Building the Package\nAfter cloning this repository into your workspace’s ```src``` directory:\n```sh\ncd \u003cyour_ros2_ws\u003e\ncolcon build\nsource install/setup.bash\n```\n\n## Usage\n\n1. **Launch the Simulation**\nRun the Gazebo simulation environment and spawn the robot:\n\n```sh\nros2 launch ros2_slam_auto_navigation launch_sim.launch.py world_file:=/home/taher/ros2_ws/src/ros2-slam-auto-navigation/worlds/simple.world\n```\n\n2. **Launch SLAM and Navigation**\nIn a new terminal (with the workspace sourced), launch the SLAM Toolbox and Nav2 bringup with Rviz:\n```sh\nros2 launch ros2_slam_auto_navigation slam_navigation.launch.py slam_params_file:=/home/taher/ros2_ws/src/ros2-slam-auto-navigation/config/mapper_params_online_async.yaml use_sim_time:=true\n```\n\n3. **Use Rviz2 for Visualization:** Rviz2 should start automatically from the second launch file. In Rviz2:\n   - You can visualize the robot’s pose, sensors, and the map being built.\n   - Interactively set navigation goals using the \"2D Nav Goal\" tool once the map and localization are stable.\n\n4. **Autonomous Navigation:** Once you have a map (even partial), you can send navigation goals to the robot via Rviz. Nav2 will compute a path and command the robot to reach the desired destination.\n\n## Launch Simulator-SLAM-Navigation-RViz commands individually\n\n1. Launching the Simulation Environment\n```sh\nros2 launch ros2_slam_auto_navigation launch_sim.launch.py world_file:=/home/taher/ros2_ws/src/ros2-slam-auto-navigation/worlds/simple.world\n```\n2. Starting the SLAM Toolbox (Online, Asynchronous Mode)\n```sh\nros2 launch slam_toolbox online_async_launch.py slam_params_file:=/home/taher/ros2_ws/src/ros2-slam-auto-navigation/config/mapper_params_online_async.yaml use_sim_time:=true\n```\n3. Initializing the Navigation Stack\n```sh\nros2 launch nav2_bringup navigation_launch.py use_sim_time:=True\n```\n4. Opening RViz with Navigation Visualization\n```sh\nros2 run rviz2 rviz2 use_sim_time:=True -d /opt/ros/humble/share/nav2_bringup/rviz/nav2_default_view.rviz\n```\n\n## Troubleshooting\n- **Simulation Issues:**\n  Ensure that Gazebo, ROS2 Control, and joint publisher packages are correctly installed.\n\n- **TF or Robot Description Issues:**\nCheck the URDF/Xacro files and the rsp.launch.py to ensure the robot description is being published correctly.\n\n- **Navigation Errors:**\nConfirm that SLAM Toolbox is running and providing a map. Ensure that Nav2 parameters match your robot’s configuration (e.g., footprint, sensor sources).\n\n## Contributing\nContributions are welcome. If you find a bug or have a feature request, please open an issue or submit a pull request.\n\n## Resources\n\n- Robot Operating System [(ROS 2 Humble)](https://docs.ros.org/en/humble/index.html)\n- ROS 2 [tf2](https://docs.ros.org/en/humble/Tutorials/Intermediate/Tf2/Introduction-To-Tf2.html)\n- [ROS 2 Navigation](https://github.com/ros-navigation/navigation2/) Framework and System\n- [Slam Toolbox](https://github.com/SteveMacenski/slam_toolbox) for lifelong mapping and localization in potentially massive maps with ROS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaherfattahi%2Fros2-slam-auto-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaherfattahi%2Fros2-slam-auto-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaherfattahi%2Fros2-slam-auto-navigation/lists"}