Coder Social home page Coder Social logo

wall-follower-in-ros-using-python's Introduction

Wall-follower-in-ROS-using-Python

This was my final project for a robotics course in UMD. (ENPM809E - Python Applications for Robotics)

This algorithm was implemented using the Robot Operating System (ROS) libraries, Gazebo as simulator and Python as programming language.

Task

The goal of this project is to solve a maze problem using only one Turtlebot 3 robot which comes equipped with a laser scanner.

We had to achieve the following tasks:

  • Detect a wall
  • Follow the wall
  • Avoid collision with obstacles
  • Find the exit

We had to accomplish the Tasks automatically.

Test Environment

  • ROS: Melodic
  • Ubuntu: 18.04LTS
  • Python: 3.6.9
  • (Gazebo: 9.0.0)

Approached Code Structure

To execute the same, I created one python package(FinalProject_ws) which has one module (motion_plan). This module can be used in any catkin space if configured as per the tree below.

.
└── catkin_ws                       # Your simulation workspace
    ├── src                         # Cloned from this directory 
    │   ├── maze
    │   │   ├── launch
    │   │   |   ├── maze.launch 
    │   │   ├── world
    │   │   |   ├── maze.world      # Folder that contains maze 1's definitions
    │   │   |   └── maze2.world     # Folder that contains maze 2's definitions
    │   │   ├── CMakeLists.txt
    │   │   └── pakage.xml
    │   ├── motion_plan          
    │   │   ├── nodes
    │   │   |   ├── follow_wall.py  # Folder that contains motion planning for the robot
    │   │   ├── src
    │   │   |   └── ...
    │   │   ├── CMakeLists.txt
    │   │   └── pakage.xml
    │   └── CMakeLists.txt
    ├── devel                       # Folder created after compilation
    └── build                       # Folder created after compilation

Follow_wall.py:

This program consists of various fiunctions to check if the bot has detected a wall and based on the distance from obstacle on right side and left side, the program will either enter the algorithm for Right wall follower or the Left wall follower.

Instructions to run the code:(In PyCharm)

  • Download the 'FinalProject_Nimbekar.zip' folder from Canvas and unzip it.

  • Run the roscore command in terminal to start ros.

  • Run the maze in terminal one:

roslaunch maze maze.launch
  • Then run the Code in terminal two:
rosrun motion_plan follow_wall.py
  • Manually stop the code once the maze is cleared.

Built With

  • ROS - Set of software libraries and tools used to build the robot
  • Gazebo - Tool used to simulation
  • Python - Programming language

Author

Nupur Nimbekar

wall-follower-in-ros-using-python's People

Contributors

nimbekarnd 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.