{"id":24936800,"url":"https://github.com/aliy98/nav2-keepout-zone","last_synced_at":"2025-07-20T08:05:30.361Z","repository":{"id":160126613,"uuid":"506288207","full_name":"aliy98/nav2-keepout-zone","owner":"aliy98","description":"Navigation in ROS2 with Nav2 introduced a lot of new features and possibilities. The goal of this assignment is to explore and test the new feature of navigating in a known environment while avoiding user-defined “keep out areas”.","archived":false,"fork":false,"pushed_at":"2023-03-13T14:23:17.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T16:43:41.355Z","etag":null,"topics":["navigation2","ros2","slam-toolbox","tiago-robot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aliy98.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}},"created_at":"2022-06-22T14:44:43.000Z","updated_at":"2024-05-20T05:23:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"869e1d92-796b-4a40-9970-f2f18a28ebe2","html_url":"https://github.com/aliy98/nav2-keepout-zone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aliy98/nav2-keepout-zone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliy98%2Fnav2-keepout-zone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliy98%2Fnav2-keepout-zone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliy98%2Fnav2-keepout-zone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliy98%2Fnav2-keepout-zone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliy98","download_url":"https://codeload.github.com/aliy98/nav2-keepout-zone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliy98%2Fnav2-keepout-zone/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266087790,"owners_count":23874519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["navigation2","ros2","slam-toolbox","tiago-robot"],"created_at":"2025-02-02T16:57:16.909Z","updated_at":"2025-07-20T08:05:30.351Z","avatar_url":"https://github.com/aliy98.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nav2-keepout-zone\nNavigation in ROS2 with [Nav2](https://navigation.ros.org/) introduced a lot of new features and possibilities. The goal of this assignment is to explore and test the new feature \nof navigating in a known environment while avoiding user-defined [keep out areas](https://navigation.ros.org/tutorials/docs/navigation2_with_keepout_filter.html).\n\n## Installation\nThis package requires the following dependencies:\n```\nsudo apt install ros-\u003cros2-distro\u003e-slam-toolbox\n```\n```\nsudo apt install ros-\u003cdistro\u003e-navigation2 ros-\u003cdistro\u003e-nav2-bringup '~ros-\u003cdistro\u003e-turtlebot3-.*'\n```\nOnce all the dependencies are met, the packge could be cloned and compiled as it is represented:\n```\nmkdir -p colcon_ws/src\n```\n```\ncd colcon_ws/src\n```\n```\ngit clone https://github.com/aliy98/nav2-keepout-zone\n```\n```\ncd colcon_ws\n```\n```\ncolcon build --symlink-install\n```\n```\nsource install/setup.bash\n```\n\n## Simulation Environment\n[Webots2023a](https://cyberbotics.com/doc/blog/Webots-2023-a-release) is a simulation software, in which this project was done. It is compliant with ROS2, \nand provides the [TIAGo](https://github.com/cyberbotics/webots_ros2/tree/master/webots_ros2_tiago) robot urdf model, \nwhich is chosen to be used in this project.\n\nThe following figure, provides an overview from the simulation environment of this project:\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/65722399/224727414-f7ecc39a-b3ee-4137-8293-a9902fe2817c.png\" width=\"500\" title=\"room\"\u003e\n\u003c/p\u003e\n\n## Mapping\nThe first step of this experiment, consists of creating a map of the indoor environemnt. [slam_toolbox](https://github.com/SteveMacenski/slam_toolbox) provides an online\nsynchronous mapping ROS node, using the following command:\n```\nros2 launch slam_toolbox online_async_launch.py\n```\nwhich was used in this project along with [Nav2](https://github.com/ros-planning/navigation2) applications. The following command would bringup navigation:\n```\nros2 launch nav2_bringup navigation_launch.py\n```\n\nThis would help us to define goal points during slam. In order to launch these two nodes along with the simulation environment, the `slam_launch.py` file\nis provided in this package, which takes an `world` file as an argument:\n```\nros2 launch sofar_assignment slam_launch.py world:=default.wbt\n```\nHere is an overview of the mapping process:\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/65722399/224721685-47e7dda6-6dbe-4502-abe1-cb4a5b12ca88.gif\" width=\"800\" title=\"slam\"\u003e\n\u003c/p\u003e\n\nThe UML component diagram of this part is shown in following figure:\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/65722399/224717872-95fbb499-cbaf-447b-9cfe-4c1b159d912e.png\" width=\"500\" title=\"sofar_slam\"\u003e\n\u003c/p\u003e\n\n## Creating keepout filter masks:\nOnce the map is built, the keepout areas could be drwan on the `map.pgm` file and saved as the mask filter. The corresponding mask yaml file mode has to be chosen as scale,\nso that the occupancy grids of each area, would be defined with a certain level of occupancy.\nThe follwoing figures show a sample of keepout filter mask along with the original map file:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/65722399/224722273-0187223b-b5bf-4937-84eb-e0e4037564f2.jpg\" width=\"300\" title=\"map\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/65722399/224722411-aba56d08-a549-4d9e-8236-fda1e1a588e3.jpg\" width=\"300\" title=\"mask\"\u003e\n\u003c/p\u003e\n\n\n\n## Navigation and path planning \nIn the last step of this project, the navigation and path planning part is done, considering the keepout zones. The provided `nav_launch.py` in this package\nwould bring the simulation environment along with navigation2 applications such as `map_server`, `costmap_filter_info_server` and `life_cycle_manager`. The following\ncommand represents the arguments that this launch file requires:\n```\nros2 launch sofar_assignment nav_launch.py world:=default.wbt map:=src/nav2-keepout-zone/resource/map.yaml params_file:=src/nav2-keepout-zone/resource/nav2_params.yaml keepout_params_file:=src/nav2-keepout-zone/resource/keepout_params.yaml mask:=src/nav2-keepout-zone/resource/keepout_mask.yaml\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/65722399/224722217-fa4e5a80-33f5-47ea-abfc-539d894df944.gif\" width=\"800\" title=\"nav\"\u003e\n\u003c/p\u003e\n\nThe UML component diagram of this part is shown in following figure:\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/65722399/224723034-963d4be0-ebec-419a-af82-fe3d3647da7a.png\" width=\"500\" title=\"sofar_nav\"\u003e\n\u003c/p\u003e\n\n## Authors and Contacts\n- Ali Yousefi\n- email: aliyousefi98@outlook.com \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliy98%2Fnav2-keepout-zone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliy98%2Fnav2-keepout-zone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliy98%2Fnav2-keepout-zone/lists"}