GithubHelp home page GithubHelp logo

sharvashish / obstacle_detection__hcsr04 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 51 KB

Setup of upto 6 HCSR04 sensors with arduino, to detect obstacles from 6 directions, publishing data into ROS.

Arduino 100.00%

obstacle_detection__hcsr04's Introduction

Obstacle_detection__HCSR04

Upto 6 HCSR04 sensors with arduino, to detect obstacles from 6 directions, publishing data into ROS.

alt tag

Arduino samples data from any/all of the 6 sensors at given rate and publishes in ROS. It is Tested on FlytPOD with FlytOS. But should work with any ROS setup.

Features:

  1. Continuous output mode, One time poll mode for quering fresh data.
  2. Select which sensors to listen to from 6 sensors.
  3. Configurable sensor poll rate.

Contributor: Saumya Saksena, email: [email protected] Maintainer: Dhiraj, email: [email protected]

Hardware requirements: HCSR04 ultrasonic sensors, wires, arduino / Tiva C launchpad, USB cable, 5V power source.

Hardware setup:

  1. Print 3D parts using STL files.
  2. Supply all sensors with separate 5V power supply. Arduino can be supplied from USB cable as well.
  3. wiring information coming soon.

FlytPOD / ROS side setup:

  1. Install rosserial package on your system, by giving the following commands $ sudo apt-get install ros-indigo-rosserial-arduino ros-indigo-rosserial ros-indigo-rosserial-msgs ros-indigo-rosserial-client ros-indigo-rosserial-python
NOTE : If you are using the TI TIVA C Launchpad for this application, the procedure would be a little bit different. You  will have to install rosserial_tivac
You can install rosserial_tivac from source, 
  Navigate to your ROS workspace. Clone the git repository. Then build and install the package.
  
  $ cd <workspace_dir>/src
  $ git clone https://github.com/robosavvy/rosserial_tivac.git
  $ cd ..
  $ catkin_make
  $ catkin_make install
  1. Once the required packages are installed, the device becomes more or less plug-n-play. Connect the device to a USB port and the power up the sensors using a suitable power source that provides 5V.

  2. Now data should be published in ROS under topic 'sonar'. From terminal you can test it using $ rosrun rosserial_python serial_node.py /dev/ttyACM0 $ rostopic echo sonar

NOTE: If the first command shows that no device found on ACM0, you can disconnect the deivce from the flytpod and give the command again, or you can try with ACM1. Sometimes the ports get switched between the two.
  1. Make sure that flytOS is running. In your browser open localhost:9090/flytsonar
You would see the GUI now. Enjoy!

To install the flytSonar app to your FlytOS sd card follow these instrucitons.
  i. download the source from <link>
  ii. Copy the source code to /flyt/flytapps/web/ 
    You might need to perform this operation as root user.
  iii. edit web.py file to add an entry to access the app through onboard server.
  iv. Restart flytOS.

alt tag

obstacle_detection__hcsr04's People

Contributors

dhirajdhule avatar

Watchers

Sharvashish Das 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.