Notifications
Clear all

Object detection and avoidance using ultrasonics  

Page 1 / 3
  RSS

Pugwash
(@pugwash)
Prominent Member
Joined: 1 year ago
Posts: 997
2019-09-08 12:08 pm  

This short video caught my eye and interest, as until now I have only seen demos of the ultrasonic sensors fixed statically.

If you forget about the fancy radar display and speed up the horizontal scanning rate a bit, I think this could be a useful addition to the front of a robot to either avoid objects or find them.

Has anybody got any thoughts on this?


Quote
ETinkerer
(@etinkerer)
Trusted Member
Joined: 1 year ago
Posts: 57
2019-09-08 5:38 pm  

OK, If your going to do that you have to set up an array of LED's for a Cylon eye. ? 

Pat

The most exciting phrase to hear in science, the one that heralds new discoveries, is not “Eureka!” (I found it!) but “That's funny …”
Author: Isaac Asimov


ReplyQuote
Pugwash
(@pugwash)
Prominent Member
Joined: 1 year ago
Posts: 997

ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 1 year ago
Posts: 1791
2019-09-08 8:46 pm  
Posted by: @pugwash

Has anybody got any thoughts on this?

That's exactly how I plan on using an HC-SR04.  I don't have a robot up and running yet, but when I do that's going to be my first navigation project.   Also I don't think I'll need to speed up the scan rate for my purposes.  All I'll be using this for is to detect the main course path I want the robot to navigate.  No need to have a lot of speed on the scan for that.  I'll have other sensors for object avoidance detection.

I watched that video quite some time ago and have been wanting to build a prototype project with the radar graphics he shows in his demo.   But as with everything else around here it gets toss onto a back-burner.  I figure that when I actually need it for the robot navigation I'll be sure to implement it then. ? 

I have more than enough parts to build one.  But my parts drawer marked TIME is EMPTY!  I'll need to ORDAHH in some more time. ? 

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Pugwash
(@pugwash)
Prominent Member
Joined: 1 year ago
Posts: 997
2019-09-09 8:23 am  

@robo-pi

Have you tried setting this up?

I gave it a go yesterday, just hooking up the servo and the ultrasonic unit but without mounting the sensor on the servo. Using the sketch provided, the servo turns at nowhere near the speed in the demo.

I have tried getting rid of the delay(), speeding up the serial communications to 115200 bps to no avail. Tried this on two different servos and still no bettering of scan speed.

I seem to be at a bit of a frustrating dead end here.


ReplyQuote
Pugwash
(@pugwash)
Prominent Member
Joined: 1 year ago
Posts: 997
2019-09-09 8:31 am  

@robo-pi

I have more than enough parts to build one.  But my parts drawer marked TIME is EMPTY!  I'll need to ORDAHH in some more time. ? 

EMPTY, I sincerely hope not!

At the moment I am avoiding eBay and AliExpress like the plague. I am trying not to displace even more air out of my parts drawer with stuff I may not need.

Can you remember "Needful Things" by Stephen King, if that was the case with us we would really be in a pickle!

Tempus fugit, it is time for my first coffee of the day. 


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 1 year ago
Posts: 1791
2019-09-09 8:34 am  
Posted by: @pugwash

Have you tried setting this up?

I haven't tried it yet.  Although I actually downloaded the Processing IDE tonight so I can do the fancy screen graphics.  I've been meaning to learn about the Processing IDE anyway.

Posted by: @pugwash

Using the sketch provided, the servo turns at nowhere near the speed in the demo.

I haven't looked at the sketch, but I've used these same servos on my robotic Me Arm and they can move much faster than he has his moving.   I don't know why your servos aren't moving quickly.

Posted by: @pugwash

I have tried getting rid of the delay(), speeding up the serial communications to 115200 bps to no avail. Tried this on two different servos and still no bettering of scan speed.

I'd need to know more details of what you are doing.    How fast the servo moves shouldn't have anything to do with the baud rate of the serial com.   I've decided to try to make time for this project as this is something I've been wanting to do for quite some time.   So I'm currently looking into it.  Right now I'm just trying to get the graphic  interface working using the Processing IDE.

Do you have the graphic interface up and running?

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 1 year ago
Posts: 1791
2019-09-09 8:46 am  
Posted by: @pugwash

At the moment I am avoiding eBay and AliExpress like the plague. I am trying not to displace even more air out of my parts drawer with stuff I may not need.

I have a lot of air to displace in my parts drawers.   So I plan to keep on ORDAHH-ing.   But I only order parts that I'm pretty confident that I'll be using.  I don't think I'll be sorry that I ordered those LED and KEY display boards. I already have plans for quite a few of them.

Also after watching the latest episode of DB1 I can see where I'll need to be ordering tons of sensors.  So I'll probably be doing that pretty soon.  The nice thing about AliExpress is that there is no minimum order.   So I often order just a few trinkets a week.   That way there's always a new surprise in the mail box. ? 

I do try to order stuff in quantities of 10 or more at a clip.   After all, once I learn how to use a module I usually end up using a lot of them.   I prefer to have a lot of the same things that I know how to use well, rather than a bunch of different stuff that I have to figure out how to use.

Plus I'm currently building 4 identical robots.   Well, they won't be exactly identical, but fairly close.  The idea is that I can then try different things with each of them, and even potentially see if I can get them to work together as a team toward accomplishing a single goal.

They are all built on those small robot chassis.

Alysha Baby

I'll eventually be placing an HC-SRO4 sensor on a servo to scan the area in front of these robots.   That's been in my plans all along. 

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Pugwash
(@pugwash)
Prominent Member
Joined: 1 year ago
Posts: 997
2019-09-09 9:30 am  

@robo-pi

Do you have the graphic interface up and running?

I haven't bothered with the graphics interface, as I consider it a bit superfluous. What I am interested in is just knowing if there is anything obstructing the path i.e. a relatively narrow-angle and what may jus to the sides of the path i.e. identifying objects that don't have to be necessarily avoided.

There is a reason behind this. My boat had a Raymarine Autopilot attached to the tiller and if I had set the course over ground (COG) but in my path was a marker buoy, I had two choices. Switching off the autopilot and subsequently having to completely reset the COG after passing the buoy. Or I could press either the left or right button on the control panel to steer port or starboard of the object. This would alter my COG by 5° for five minutes then automatically take me back to the onto the original navigation line and carry on with my original heading.

Perhaps this clarifies my train of thought!

 


ReplyQuote
Pugwash
(@pugwash)
Prominent Member
Joined: 1 year ago
Posts: 997
2019-09-09 9:35 am  

@robo-pi

Four identical robots, eh! Canadian for a question mark ? 

Your back yard is going to look like something out of "SilentRunning"!

Then you'll have to teach them to tend the garden!


ReplyQuote
Pugwash
(@pugwash)
Prominent Member
Joined: 1 year ago
Posts: 997
2019-09-09 3:10 pm  

@robo-pi

I checked the spec for these servos and it said 120mS for a 60° turn.

I have set one up to move directly from 60° to 120° with no intermittent steps and it is actually taking 692ms.

I'll try another one, I've got a dozen in my drawer.


ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 1 year ago
Posts: 502
2019-09-09 8:18 pm  
Posted by: @pugwash

@robo-pi

Do you have the graphic interface up and running?

I haven't bothered with the graphics interface, as I consider it a bit superfluous.

A graphics display can be useful in checking if the data collection is working correctly  even though the visual display is of no use to the robot itself.

The processing language also looks interesting as it also handles video data. I actually posted a video link somewhere else on this forum showing how to use the processing language with video data. There is a Raspberry Pi version of the processing language.  

With regards to sonar my view is  you first need to decide on a robot base shape (as that effects the sensors required and their layout) and the set of tasks you want your robot to carry out. Then you can work out the sensors required to achieve those tasks. So do you need a scanning sonar device to get the data your robot will require to carry out a particular task? What kind of obstacles is it to deal with? Flat wall on different angles to the robot? Corners? When your robot reads in the list of sonar distances how is it going to process those numbers to decide what actions to take next in terms of its goals? I notice robot vacuum cleaners don't use sonar?

I have been using Bill's tutorial,
https://dronebotworkshop.com/hc-sr04-ultrasonic-distance-sensor-arduino/#1
To get up to speed on the subject and will experiment with them on my robot base.


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 1 year ago
Posts: 1791
2019-09-09 8:47 pm  
Posted by: @casey

A graphics display can be useful in checking if the data collection is working correctly  even though the visual display is of no use to the robot itself.

Yes, I know it's not useful for the robot itself.   But it will allow me to see what the sensor sees so I can visually see what its capabilities are.   Actually when I install this on the robot I have my own graphics program that will display what the robot actually sees.  That program is written in C#.   And again, that's not really needed for the robot, but it will allow me to see what the robot sees.

Posted by: @casey

So do you need a scanning sonar device to get the data your robot will require to carry out a particular task? What kind of obstacles is it to deal with? Flat wall on different angles to the robot? Corners? When your robot reads in the list of sonar distances how is it going to process those numbers to decide what actions to take next in terms of its goals? I notice robot vacuum cleaners don't use sonar?

My navigation system will consist of multiple elements.   The robot will know where it is in relation to the layout of my home.  Therefore when it looks in a specific direction with the sonar it will have a good idea of what it should expect to see.   This is will not be an obstacle avoidance system.   Although it will be able to tell if it's not getting the distance readings it should be getting based on its location and where it is looking.  So in that sense it will be able to detect that something isn't normal.

At this point in time I'm not worried about having a fully autonomous robot that can solve unexpected problems.  That will come later.  Right now all I'm concerned with is having the robot be able to verify that it is in a correct path relative to floor plan that it already has full information about.   If it sees things it doesn't expect to see, it can simply stop and report to me that things aren't right.  It will be up to me to then figure out why the system isn't working as expected.

I take it one step at a time.  Get it to do what I expect it to do under pristine conditions.  Only then move on to having it deal with unexpected situations.   Trying to do the latter before I've gotten the former down pat would  be akin to trying to run before I've learned how to walk.

So it's just pure navigation for now.  Obstacle avoidance will come later.  Although I already do have obstacle avoidance sensors on the robot.  But those are just for emergency.  It needs to be within inches of a collision before those kick in.  They aren't part of the actual navigation system. They just serve as emergency stops.

DroneBot Workshop Robotics Engineer
James


ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 1 year ago
Posts: 502
2019-09-09 9:47 pm  
Posted by: @robo-pi ...it will allow me to see what the robot sees.

We need to keep in mind for anyone not familiar with image processing and recognition is that the display only allows you to see the data being given to the robot. What the robot actually "sees" depends on what it does with the data. 


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 1 year ago
Posts: 1791
2019-09-09 11:17 pm  
Posted by: @casey
Posted by: @robo-pi ...it will allow me to see what the robot sees.

We need to keep in mind for anyone not familiar with image processing and recognition is that the display only allows you to see the data being given to the robot. What the robot actually "sees" depends on what it does with the data. 

Exactly.  And in the case of my robots I'm the programmer so I'll be the one to decide what it does with the data it sees.   So it really helps me to know what it's seeing.  

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Page 1 / 3