{"id":25506744,"url":"https://github.com/lorenzo-severini/ros2-treasure-navigation","last_synced_at":"2025-11-17T12:30:15.803Z","repository":{"id":266106655,"uuid":"896979765","full_name":"lorenzo-severini/ros2-treasure-navigation","owner":"lorenzo-severini","description":"This repository contains ROS2 packages for controlling a TurtleBot3 in a Gazebo simulation. It includes both navigation control services and a treasure hunt functionality.","archived":false,"fork":false,"pushed_at":"2025-02-17T11:15:03.000Z","size":203,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-17T12:24:05.015Z","etag":null,"topics":["gazebo","nav2","ros2","rviz"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorenzo-severini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-12-01T19:11:52.000Z","updated_at":"2025-02-17T11:15:06.000Z","dependencies_parsed_at":"2024-12-02T16:36:44.409Z","dependency_job_id":"2d61463f-6136-488c-89a1-4c1f519cbdd4","html_url":"https://github.com/lorenzo-severini/ros2-treasure-navigation","commit_stats":null,"previous_names":["lorenzo-severini/ros2-treasure-navigation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzo-severini%2Fros2-treasure-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzo-severini%2Fros2-treasure-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzo-severini%2Fros2-treasure-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzo-severini%2Fros2-treasure-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorenzo-severini","download_url":"https://codeload.github.com/lorenzo-severini/ros2-treasure-navigation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239611998,"owners_count":19668275,"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":["gazebo","nav2","ros2","rviz"],"created_at":"2025-02-19T06:59:28.276Z","updated_at":"2025-11-17T12:30:15.749Z","avatar_url":"https://github.com/lorenzo-severini.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROS2 Project: Navigation and Treasure Hunt\n\nThis repository contains ROS2 packages for controlling a TurtleBot3 in a Gazebo simulation. It includes both navigation control services and a treasure hunt functionality.\n\n---\n\n## Mapping the House\n\n**Objective**: Create a detailed map of a simulated house environment using Turtlebot3 in the **Gazebo** simulator.\n\n### Process:\n1. Launch the simulation with Turtlebot3 and the house model.\n2. Use **ROS2**, **Nav2**, and **SLAM Toolbox** for automatic mapping.\n3. Explore the entire environment to generate a complete map.\n4. Save the generated map file.\n5. Correct any errors in the map using an editing program like **GIMP**.\n\n### Result:\n\n![Mapped house](https://github.com/lorenzo-severini/ros2-treasure-navigation/blob/main/images/house_map.png)\n\nAbove there is the complete and corrected house map saved and edited for future use in robot navigation.\n\n\n\n## Command Service and Test Client\n\n**Objective**: Create a service in ROS2 to handle specific navigation commands (e.g., \"Patrol\" and \"Go to the exit\") and a client to test the service.\n\n### Process:\n1. **Service Server**:\n   - Create a ROS2 service to handle navigation commands for the **Turtlebot3**, such as navigating between waypoints or to a predefined exit.\n   - Implement a feedback logic to report if the command was completed successfully or encountered any issues.\n2. **Service Client**:\n   - Develop a client that sends commands to the server and receives responses, such as \"Patrol\" or \"GoToExit\".\n   - Handle the responses to provide feedback to the user on whether the command was successful.\n\n## Treasure Hunt Script\n\n**Objective**: Implement a treasure hunt script that guides the robot towards the treasure based on distance data from the **/distanciaTesoro** topic.\n\n### Process:\n1. Use the **busquedaTesoro.deb** package to obtain distance data (X, Y, and Euclidean distance) between the robot and the treasure.\n2. Create an algorithm that guides the robot towards the treasure, stopping if the treasure is found (distance \u003c= 0.5 meters) or if the time exceeds 90 seconds.\n3. Display progress on the search and notify whether the search was completed successfully or failed.\n\n### Result:\nA treasure hunt system that guides the robot to locate the hidden object in the shortest time possible.\n\n---\n\n## Installing the `.deb` Package\n\nTo install the custom `.deb` package for the treasure hunt functionality, follow these steps:\n\n1. Download the package from the `deb_packages` directory in the repository:\n\n   ```bash\n   wget https://github.com/yourusername/your-repository/raw/main/deb_packages/tesoro_pkg_0.0.0-0jammy_amd64.deb\n   ```\n\n2. Install the package using `dpkg`:\n\n   ```bash\n   sudo dpkg --install tesoro_pkg_0.0.0-0jammy_amd64.deb\n   ```\n\n3. If there are any missing dependencies, run:\n\n   ```bash\n   sudo apt-get install -f\n   ```\n\nThis will install the `tesoro_pkg` package and allow you to use the treasure hunt functionality in your ROS2 environment.\n\n\n\n## Building the ROS2 Workspace\nIf you need to build the ROS2 packages locally, you can do so using `colcon`. First, clone the repository and set up your workspace:\n\n```bash\n# Create a ROS2 workspace and clone the repository\nmkdir -p ~/ros2_ws/src\ncd ~/ros2_ws/src\ngit clone https://github.com/lorenzo-severini/ros2-treasure-navigation.git\ncd ~/ros2_ws\n\n# Build the workspace\ncolcon build\nsource install/setup.bash\n```\n\n\n\n## Running the ROS2 Nodes\n\n\n### 1. Launching the navigation through waypoints\n\nTo execute the house navigation through waypoints from the workspace directory:\n\n#### Terminal 1: Launch the TurtleBot3 Gazebo simulation\n\n```bash\nros2 launch turtlebot3_gazebo turtlebot3_house.launch.py\n```\n\n#### Terminal 2: Launch the navigation stack\n\n```bash\nros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=True map:=src/ros2_navigation_control/ros2_navigation_control/house_map.yaml\n```\n\n#### Terminal 3: Launch the navigation control\n\n```bash\nros2 launch ros2_navigation_control navigation.launch.py\n```\n\n\n### 2. Launching the treasure hunt\n\nTo execute the treasure hunt functionality, follow the steps below to launch the corresponding nodes:\n\n#### Terminal 1: Launch the TurtleBot3 Gazebo simulation\n\n```bash\nros2 launch turtlebot3_gazebo turtlebot3_house.launch.py\n```\n\n#### Terminal 2: Launch the navigation stack\n\n```bash\nros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=True map:=/home/lorenzo/ros2_ws/src/ros2_navigation_control/ros2_navigation_control/house_map.yaml\n```\n\n#### Terminal 3: Run the treasure hunt node from the tesoro_pkg package\n\n```bash\nros2 run tesoro_pkg tesoro_nodo\n```\n\n#### Terminal 4: Launch the treasure hunt to locate the treasure\n\n```bash\nros2 run ros2_navigation_control treasure_hunt\n```\n\n---\n\n## Conclusions\n\nThis project demonstrates the use of ROS2 for controlling the TurtleBot3 in a Gazebo simulation, providing both a navigation control system and a treasure hunt simulation. The integration of ROS2's navigation stack (Nav2) allows for the robot's autonomous navigation, and the treasure hunt functionality provides a fun and interactive exploration task for the robot.\n\n\n## Authors\n\n* [Lorenzo Severini](https://github.com/lorenzo-severini): Co-creator and developer of the ROS2 navigation and treasure hunt functionality.\n* [David Zipperstein](https://github.com/david-z2812): Co-creator and developer of the ROS2 navigation and treasure hunt functionality.\n\n\n## Credits\n\n* [Eugenio Ivorra Martínez](https://github.com/euivmar): Developer of the 'busquedaTesoro' package, which provides the treasure hunt functionality.\n\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzo-severini%2Fros2-treasure-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florenzo-severini%2Fros2-treasure-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzo-severini%2Fros2-treasure-navigation/lists"}