Giter Site home page Giter Site logo

autonomous-robots / turtlebot3_mapper Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 226 KB

Set of ROS2 nodes developed to explore, map and detect obstacles in an enviromment.

License: Apache License 2.0

Python 100.00%
kinematics occupancy-grid-map perception python3 ros2 ros2-humble connected-components frontier-exploration

turtlebot3_mapper's Introduction

Turtlebot Mapper

The package's goal is to use the robot turtlebot3 with a laser scan in a partially known environment to count the number of obstacles in this environment. The proposed solution aims to be as generic as possible. Given a closed environment, the robot must continue exploring until the number of frontier points (intersection between unknown regions and free regions) reaches a threshold.

  • turtlebot3_occupancy_grid: it subscribes to receive messages from the laser sensor and updates the occupancy grid map for each message received. Initially, all points on the occupancy map have probability equal to 50%. As messages are received from the laser sensor, occupied points will have probability above 50% and free points on the map will have probability below 50%. This probabilistic occupancy grid is published at a fixed rate in the custom_map topic.

  • turtlebot3_object_detector: it subscribes to receive messages from turtlebot3_occupancy_grid with the probabilistic occupancy grid. For each message received, the map is segmented into a threshold ensuring that only points with a probability greater than this threshold are 1. Then, OpenCV's connected components approach is used these determine occupied regions. If this region's area is between a minimum and maximum value, then it publish the BoundingBox2DArray and an Image with everything rendered to visualize the results.

  • turtlebot3_explorer: it subscribes to receive messages from the laser sensor and publishes velocity commands. If any obstacle is detected in front of the robot, it then rotates until it finds a free path again. Also has a service that allows to enable or disable this behavior.

  • turtlebot3_mission_controller: the main service of this node is an action server responsible for determining when the exploration starts and ends. To do so, it uses the concept of fronteirs (intersection between unknown regions and free regions). Through the goal sent to the action server, where a user can specify the number of remaining fronteir points, it will enable the turtlebot3_explorer to explore the enviromment until it reaches the specified numbers of frontiers points in the occupancy grid.

  • turtlebot3_mission_client: action client responsible for sending the exploration task to the action server and saving the results to a file.

Below you can see a graph of the entire system, ROS graph

Building package

If you don't already have a workspace where you want to add this package, then create one:

mkdir -p ros2_ws/src
cd ros2_ws

Then, add this repository in src folder. Note that you also need to add a repository with custom action that it is used here.

cd ./src
git clone [email protected]:autonomous-robots/turtlebot3_interfaces.git
git clone  [email protected]:autonomous-robots/turtlebot3_mapper.git
cd ..

Now build all packages:

colcon build

Running

For each terminal you open, remember to run:

source install/setup.bash

To run all nodes (with the exception of the turtlebot3_mission_client), run the following launch script:

ros2 launch turtlebot3_mapper turtlebot3_mapper_launch.py

Then, open a new terminal and make the environment exploration request:

source install/setup.bash
ros2 run turtlebot3_mapper turtlebot3_mission_client -f 200

References

turtlebot3_mapper's People

Contributors

luizcarloscf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.