Giter VIP home page Giter VIP logo

vmc_project's Introduction

Vector Field Histogram algorithm implementation

Simple simulation of a turtle bot moving within a maze. Algorithm developed using ROS2 and Python3

Inspired by the paper A Constrained VFH Algorithm for Motion Planning of Autonomous Vehicles

Installation of the ROS package

1 - Move to catkin workspace folder

cd ~/catkin_ws/src/

2 - Clone the repository

git clone [email protected]:oselin/vmc_project.git

3 - Copy the track file into the Gazebo folder

cp -r vmc_project/models ~/.gazebo

3 - Recompile CMakeLists file and source the folder

catkin_make
source ~/.bashrc

Run the program

First of all, launch Gazebo with the chosen track

roslaunch vmc_project project_world.launch

Then, activate the VFH algorithm by running the script

rosrun vmc_project racer.py

If you want to see in real time how data is manipulated, run

rosrun vmc_project plotter.py

or

rosrun vmc_project plotter2.py

Difference between Plotter and Plotter2

The designed node publishes two types of data

  1. velocity commands to the robot
  2. manipulated data, or VF histograms + occupancy map

Since the latter is a very big message (almost 5000 float32 values), to increase the perfomances the following workaround has been designed.

plotter.py: builds the graphs basing on the complex and heavy message

plotter2.py: reads LiDAR values directly from /scan topic and performs the same data manipulation steps as in racer.py. That is to avoid a useless publishing on a custom topic

Known issues in the software

Since this data manipulation is quite complex, the computer cannot keep up with both manipulating data, publishing commands and manging real time plots.

This slows down all the computations, leading to a failure of the algorithm. Workaround: A cool way to see real time plots is to first record the LiDARS values with

rosbag record /scan

And then simulate data publishing, but this time running only the plotter. Therefore

rosbag play <your-recording>

And on a new terminal

rosrun vmc_project plotter2.py

vmc_project's People

Contributors

muttigiacomo avatar oselin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

epoxx-arch

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.