Sunday, August 5, 2018

Ultrasonic Sensor + ROS (rviz)

My arduino uno starter kit is saved, nobody dare to get the assignment, but we need to continue this ROS tutorials come what may.

I had been observing many questions in most of these problems are the  ROS howtos , but  it needs to understand both side of a learner and the business of a developer. Well Robotic Operating System aka ROS had proven its system dexterity . However , I would say it has along way to go to  dominate all robotics software in the market. Those are the business side of the deal because  consumers are still needing  more  robots that can  perform  dynamic services to both  households and companies tasks. Also clients are expecting that an  AI almost similar to human comprehension can be used in robots.Somehow its a gradually happening today, people and business men alike are curios and excited what these machines are capable of.

Wait a minute,as I am saying we forget some part of the pi, and these are the learners of robotics  technology they are new breed of  technicians, programmers and analysts. Or let may ask this ,who would be the sales representative of robotics company,how the marketing  competitions will be observed sooner.Whatever happens we need to realize and consider that  there will be a group of learner willing to participate the trend, but in this current scenario developers are focus on advancing development to fast tract their robotics innovations-its a point of no return. So since not all robotics knowledge is an open book yet, everybody is searching for an answers to simplify and shorten their  learning curve as much as possible.

Indeed they need tutorials with learning by doing approach , and yours truly is trying to achieve that goal ,and we are also the same-learning in progress. So please accompany as while we will treasure the technology of robotics and how ROS would simplify this intellectual craving.     (for edition

To use std_msg/range in ROS
To use ultrasonic SRF04 sensors and its parameters
To simulate the sensor's (frame id, topics) data inside ROS visualization tool (rviz)

Software:  ROS Kinetic + Ubuntu 16.04
Hardwares: Arduino Mega + Ultrasonic SRF04


Setup of the experiments using arduino mega 2560 and ultrasonic SRF04

Copy and paste the program

Please check the program
Test the sonar program via  serial monitor, please uncomment "Serial.println(sensoReading)

Open four terminal for each cli commands

1)Run "roscore" command

2) Run  Arduino  with  serial port argument

3)Check the topic list

4)Echo or display the data content in the "sonaRange topic"

5)Run ros visualation tool "rviz

6)In rviz GUI

7)Change frame id name from  map to  "/sonar_ranger"

8) At the bottom of the Panel Select "Add" button to add "Range" for ultrasonic
and add the publish topic "/sonaRange"

9) Select color for the prism

10) In Rviz GUI you can see the prism length varies according to the
distance emitted by the Sonar SRF04 ultrasonic sensor.
Simulate the rviz if the circular prism change is lenght as you will interrupt
the sonar range of the ultrasound.

11) Save the rviz configuration
rosrun  -d rviz  sonar_rviz  to rerun the GUI of the sonar rviz

12) Realtime simulation of Ultrasonic "SRF04 inside RVIZ

We summarize the use of std_msgs using range of ultrasound

If roscore dont run in the cli please wait because it might be initiating
Or please check if the current ip address is the one being assigned in the /etc/hosts

Simple experiment to use ros visualization tools

No comments:

Post a Comment