Giter VIP home page Giter VIP logo

multi-floor-navigation-with-ros2's Introduction

Multi-floor navigation using ROS2

This is a simulation of robot navigation in a multi-floor environment implemented in ROS2. It was done as a part of the Software Architecture and Robotics course and written in Python.

Presentation to this project

You can find presentation to this project on the following link: presentation

Also, if you have some problems with missing files, you can find the whole workspace on this link

Installation

To run this program you should first install the following:

  • Install the ROS 2 binary packages as described in the official docs.
  • Install the Nav2 packages using your operating system’s package manager:
    sudo apt install ros-<ros2-distro>-navigation2
    sudo apt install ros-<ros2-distro>-nav2-bringup
    Note: <ros2-distro> is the name of your ROS2 version.
  • Place all files from this GitHub repository in your working workspace's newly created my_robot folder (such as dev_ws/src/my_robot).
  • Navigate to your workspace in terminal and write colcon build.

Nav2

The Nav2 project is the spiritual successor of the ROS Navigation Stack. This project seeks to find a safe way to have a mobile robot move from point A to point B. It can also be applied in other applications that involve robot navigation, like following dynamic points. This will complete dynamic path planning, compute velocities for motors, avoid obstacles, and structure recovery behaviors. Nav2 uses behavior trees to call modular servers to complete an action. An action can be to compute a path, control effort, recovery, or any other navigation related action. These are each separate nodes that communicate with the behavior tree (BT) over a ROS action server.

Exercise

In order to run the program, you should enter the commands below in the following order:

$ ros2 launch my_robot my-robot.launch.py 
$ ros2 run my_robot test.py 

The first script should run Gazebo and RVIZ in the new windows. The second script will move the robot between floors. Note: Don't forget to build your workspace before writing these commands above.

Working principle of proposed solution

The proposed solution is simple and efficient and works almost perfectly. The solution consists of several cases when the robot needs to complete a particular command. The proposed solution works as follows, initially the robot is placed on the first floor, and then moves to the worker to pick something from him. After that robot moves to a special elevator zone (similar to a real elevator). As soon as the robot reaches the special zone and stays there for a period of time, the robot has an opportunity to move to another floor (floor 0) and dynamically changes the currently loaded map for navigation. It is important to note that on each floor there is a special movement zone, reaching which the robot has the opportunity to reach another floor. Thus, the main goal of the task, to change the map upon entering another floor, was achieved. After reaching floor 0, the robot moves to pick up something from the map and then goes back to the elevator and moves to the last floor to hand over the delivery package to the doctor.

changeMap(map_filepath) - Requests a change from the current map to map_filepath's yaml.

Video Demonstration

Below you can watch a demonstration of this assignment:

)

Possible improvements

Despite the fact that this script works pretty well, there are still some moments that could be improved in future.

  • Suppose the robot is manually moved to another floor by the user. In the future, the feature can be implemented to determine on which floor the robot is currently located after an external intervention. One of the possible options is to find distinctive features in the scene, by which the robot can determine which floor has such features.
  • A more dynamic scene could be created with a moving elevator where the robot would have to enter and choose a command on which floor to drive. Definitely, it will affect performance and slow down the simulation since it's a computationally expensive solution.
  • More floors can be considered. Additionally, it can be assumed that the robot doesn't know the individual map of each floor, which makes a project more interesting and realistic.
  • Also, robot navigation with the keyboard (arrow keys) can be implemented.

multi-floor-navigation-with-ros2's People

Contributors

jabrail-chumakov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

multi-floor-navigation-with-ros2's Issues

Some issues

I tried this project, but after I run the first command line, no map is loaded. At the same time, there is no test.py file in the warehouse. Can you add something? Thank you

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.