Тёмный

ROS and SONARS for OBSTACLE AVOIDANCE | Tutorial #6 | ROS and Raspberry Pi 

Tiziano Fiorenzani
Подписаться 27 тыс.
Просмотров 34 тыс.
50% 1

** Visit my brand new portal at tiziano-school.thinkific.com/ where you can find this ROS series as a FREE course **
Let's write our first OBSTACLE AVOIDANCE algorithm, using ROS Kinetic, a Raspberry Pi and our Donkey Car. Thanks to 3 cheap sonar sensors we define new nodes for creating an obstacle avoidance action, to be fused with the controls coming from our laptop.
*** Propose your own algorithm and be part of my next shout out! **
** This is a ROS tutorial series for beginners that uses a Raspberry Pi and a cheap RC Car **
** You can find all the previous episodes here: • What is ROS (Robot Ope...
** Watch the setup episode here: • ROS and Raspberry Pi f...
*** Skip to the scene:
1:07 - How to connect the sonar to a Raspberry Pi
1:30 - How does the sonar work
2:12 - Main Algorithm explained
3:29 - ROS architecture
4:30 - Coding
7:00 - Sonar test
8:13 - Final testing
*** Find the Code: github.com/tizianofiorenzani/...
** Go to my channel: goo.gl/BjLGnS
** Check out my latest video: goo.gl/ZhcNi4
** Check out my most popular video: goo.gl/5KMJnU
****** DONKEY CAR PROJECT ******
www.donkeycar.com/
****** GET A CHEAP RC CAR ******
- Magnet or HSP94186: amzn.to/2QL6gy4
- Exceed Racing Desert Blue: amzn.to/2QLtrbp
- Exceed Short course: amzn.to/2PydaC3
- Exceed Truck: amzn.to/2PAp5j3
- Exceed Monster: amzn.to/2PyAyj1
****** RASPBERRY PI AND CAMERA ******
- Raspberry Pi 4 (4 GB RAM): amzn.to/36GqwXf
- Raspberry Pi 4 (2 GB RAM): amzn.to/2Aj7Pg3
- Raspberry Pi 3 Model B: amzn.to/2PwbMjn
- Raspberry Pi 3 Model B+: amzn.to/2PxkWfn
- Wide angle camera: amzn.to/2Pwc6P7
****** SERVOS ******
- Adafruit 16Ch Servo board: amzn.to/2LbxF7b
****** SONAR ******
- HC-SR04 (5pcs): amzn.to/2IVXEBZ
- SONARS withs stands (5 pcs): amzn.to/2XHtZA3
******** Find me on Facebook
/ tizianotutorials
******** Find me on Reddit
/ tizianofiorenzani
******** Find me on Linkedin
/ tiziano-fiorenzani
******** Find me on Twitter
/ tfiorenzani
#ros #rostutorial #sonar #obstacle

Наука

Опубликовано:

 

3 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 77   
@prandtlmayer
@prandtlmayer 5 лет назад
Modify the source code, send me the link and I will test it. The best will be on my shout out!
@shilpraj6973
@shilpraj6973 5 лет назад
how to make obstacles avoiding drone by using pixhawk? please make in depth tutorial
@vishal22248
@vishal22248 4 года назад
ya
@christaylor8142
@christaylor8142 4 года назад
Would be keen to see some ROS/Pixhawk tutorial videos using various peripherals e.g rpi camera, rplidar etc and sending control commands via mavros to pixhawk
@lokeshabhi3762
@lokeshabhi3762 4 года назад
Nailed it!!! This video is really explaining the Integration of sensors using ROS!!!
@Pravardhanreddy
@Pravardhanreddy 5 лет назад
This is so great. Keep these videos coming.
@tomnguyen4285
@tomnguyen4285 5 лет назад
I can't say how much this value to my current project. Thank you so much for making this tutorial!
@prandtlmayer
@prandtlmayer 5 лет назад
Post your project on my FB page
@CoolForPr3sident
@CoolForPr3sident 5 лет назад
Amazing Videos! Your work is very Detailed and explained very well. I will work on something similar for university in the Next year. Your Tutorials really help me to get into ros. Thank you so much.
@prandtlmayer
@prandtlmayer 5 лет назад
I'm glad. Share the word
@johncutter4386
@johncutter4386 5 лет назад
Great video!
@ThaRyddla
@ThaRyddla 4 года назад
And this is what I needed for some cave mapping, thanks!
@prandtlmayer
@prandtlmayer 4 года назад
Post something about your project, either here or on my Facebook page tizianotutorials
@DanielGarciaGuitar
@DanielGarciaGuitar 5 лет назад
Great video Tiziano! You could add to this project a lidar to upgrate the detection. Some of them are so cheap such as rplidar a1. You could add also some slam, it would be so interesting. Thanks for this amazing series of videos
@prandtlmayer
@prandtlmayer 5 лет назад
Rplidar is on my wish list
@user-ei4zf1cm3v
@user-ei4zf1cm3v 4 года назад
Thank you so much for the video But can I use Arduino instead of raspberry with ROS. ??
@IanSMoyes
@IanSMoyes 4 года назад
Hi Tiziano. Great video. However, I had a question. Didn't you get cross-talk problems between the 3 sensors?
@muchmirulyusasetiaji6271
@muchmirulyusasetiaji6271 4 года назад
youre hero
@arunshankarm1486
@arunshankarm1486 4 года назад
nice video...is there a way i can use this sonar data to apply in Q learning using rasberry pi and ROS
@nagendrababu7376
@nagendrababu7376 5 лет назад
thank you it is awesome . when you will do next video on DRONE TUTORIALS and how to understand the Dronekit-python APIs how to use them please make a videos on them if possible . i hope you will do video on them
@iZeroPvP
@iZeroPvP 5 лет назад
I love your content, you really help people like me who are just getting into robotics. Thank you!! I am trying to do something similar to this but instead of using sonar, I want to connect 3 cameras to the raspberry pi (middle, left, right, just like you did) and use machine learning AI to move the car when it detects an object. Any advice on that?
@prandtlmayer
@prandtlmayer 5 лет назад
If you manage to do that we could make a video together
@enricosaccheggiani3192
@enricosaccheggiani3192 3 года назад
Anche io ho fatto moltissime prove con il mio robocar e non ti dico quante volte il mio robottino e' andato a sbattere . grazie mille per la tua serie su ROS. I migliori saluti
@prandtlmayer
@prandtlmayer 3 года назад
Posta i link dei tuoi fallimenti e successi
@KulbirAhluwalia
@KulbirAhluwalia 5 лет назад
Love your comprehensive videos!! Can you make a video where the Donkey car has a USB mini microphone + aux speaker attached to the RPi and it can communicate in real time with the Laptop's inbuilt microphone and speakers!? Thank you so much :)
@prandtlmayer
@prandtlmayer 5 лет назад
That sounds interesting. Do you have any specific application for that?
@KulbirAhluwalia
@KulbirAhluwalia 5 лет назад
@@prandtlmayer so that we can instruct surrounding people to hand objects to the robot, help it if it gets stuck or just communicate normally
@mehmetckcan9239
@mehmetckcan9239 5 лет назад
Great video. I tried it with opencv like this. But fps had trouble to me
@prandtlmayer
@prandtlmayer 5 лет назад
Post your code. I am going to include opencv in the future
@aymanekaskassi4235
@aymanekaskassi4235 6 месяцев назад
Can i make this work if i don’t have a raspberry pi instead i m gonna control the car from my own laptop
@chamenthropha
@chamenthropha 5 лет назад
Hi Tiziano Very impressive stuff you are doing here , this video provided so much help . so Thank you a lot !! I am interested in building an obstacle avoidance system in my drone . dont plan on doing something similar in a future video ?
@prandtlmayer
@prandtlmayer 5 лет назад
Maybe. As for now you'd better check out the Obstacle avoidance already implemented in arducopter and px4
@chamenthropha
@chamenthropha 5 лет назад
@@prandtlmayer is there a video of that on your channel ? i cant find it
@prandtlmayer
@prandtlmayer 5 лет назад
No, there isn't
@ashutoshghuli1612
@ashutoshghuli1612 5 лет назад
plz, make a video on slam(simultaneous localization and mapping) technique. you are doing a great job go ahead
@prandtlmayer
@prandtlmayer 5 лет назад
As soon as I put my hands on a laser scanner
@anjalitiwari4774
@anjalitiwari4774 5 лет назад
hey there, I absolutely loved this video, I am using lidar for mapping and obstacles avoidance. I want to merge both ultrasonic and lidar data for this. How am going to do that! any idea? please help :-)
@prandtlmayer
@prandtlmayer 5 лет назад
I think sonars are not suitable for mapping, but they could be used for reacting to obstacles not detected by your laser. There might be a way of using them in the local planner, but I don't know for certain
@rouinisami3427
@rouinisami3427 3 года назад
i will use control L298N Driver with ROS but i don't find the node of L298N driver on github
@abdel9946
@abdel9946 2 года назад
Hy Tiziano I want to make the same functions but i don't have wheels which turn i can only speed up the outside wheel to make the turn, and i can see that you used the Twist library but i don't think i can with my configuration. What do you suggest me?
@prandtlmayer
@prandtlmayer 2 года назад
I think you can use the same and tune the speeds for your case
@emmanuelfranco7018
@emmanuelfranco7018 5 лет назад
great video Tizano, could you explain step by step, how to configure the raspberry pi as access point like the tutorial#0 to run the publisher made on the tutorial#3 and share info between the raspberry and the laptop?
@prandtlmayer
@prandtlmayer 5 лет назад
The image comes already with the hotspot setup. Write the image on the ad card. Done
@emmanuelfranco7018
@emmanuelfranco7018 5 лет назад
@@prandtlmayer thaks for that, how can i acces to it, or make it run?
@prandtlmayer
@prandtlmayer 5 лет назад
Visit ubiquityrobotics.com
@gamingparlour1732
@gamingparlour1732 5 лет назад
how does ros publisher in rasberry publishes data in to a topic that is runnig in my laptop
@prandtlmayer
@prandtlmayer 5 лет назад
The ROS master takes care of the communication. As long as the devices connect to the master they connect to each other
@muhammadsyaamil1568
@muhammadsyaamil1568 5 лет назад
i want to use ROS for my fyp project, my project is fully automated grass cutter. my project currently used infrared sensor to detect obstacle. if i use ROS, do i need to replaced it with ROS and can we set the movement of my grass cutter robot using ROS? pls reply i really need your answer
@prandtlmayer
@prandtlmayer 5 лет назад
Yes, you can do everything using Ros
@sangqiianbo
@sangqiianbo 5 лет назад
when you will do something like pathfinding or GPS navigation?
@prandtlmayer
@prandtlmayer 5 лет назад
In time we'll cover everything
@guoxinleo2695
@guoxinleo2695 5 лет назад
Will you show that how to connect a 360 degree Lidar or Kinect to a Pixhawk through ROS?
@prandtlmayer
@prandtlmayer 5 лет назад
Yes, I am going to do that
@atreyabhat
@atreyabhat 4 года назад
Thanks a lot for this. I am trying to implement it for turtlebot in gazebo and I have a doubt in the code. You have used an updaterange function where you used angle = fieldofview, but Isnt the fov constant for a sensor?.. Its predefined as 0.29 in gazebo plugin. So I modified it to just update the actual ranges instead of angle.. And it somewhat works now. Another thing, ur code is amazing and especially the control command part.. Im still trying to understand. Can you suggest me a good book which teaches practical control systems wrt robotic application? Because all the plotting of bode and nyquist and solving block diagrams in college are not helping me practically now. Thanks
@prandtlmayer
@prandtlmayer 4 года назад
Thank you, the code was meant to just give an idea and I am sure it can be optimized. Now for the control books First of all to suggest you the "Digital Control of Dynamics Systems" (Franklyn Powell), absolutely a must to have for digital and also classical control. Another really great book with lots of practical applications if Steve Branton's "Data-Driven Science and Engineering" and his amazing "Control Theory Bootcamp": ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Pi7l8mMjYVE.html
@atreyabhat
@atreyabhat 4 года назад
@@prandtlmayer Thanks a lot, will look into them
@javiers.8274
@javiers.8274 4 года назад
Very nice Tutorial, thanks! How ever It didn’t work for me. When I run the launch file it doesn’t show the data.. stays with “running..” the package did compilate and the sensor are already attached right. Any Idea?
@javiers.8274
@javiers.8274 4 года назад
When I run the test It works perfect but only that
@prandtlmayer
@prandtlmayer 4 года назад
One of the problem I faced was the infinite while loop that starts when the signal is fired and I was waiting for the bounce. Check if it's stuck there
@javiers.8274
@javiers.8274 4 года назад
Tiziano Fiorenzani Thanks for answering. I found the Problem. If one of the sensors don’t work, the program gets Stuck (waiting for a Signal that would not come). I changed 2 of the Banggood sensors for other good ones and It worked Perfectly. My car will be soon driving autonomous :D
@theken1499
@theken1499 4 года назад
if i use jetson ,can i use RPI.GPIO ,which library i need import?
@prandtlmayer
@prandtlmayer 4 года назад
should be jetson-gpio: github.com/NVIDIA/jetson-gpio
@imranhossain7234
@imranhossain7234 2 года назад
Can i mapping by sonar sensor?
@prandtlmayer
@prandtlmayer 2 года назад
No, it's too slow and not accurate enough
@abidikar
@abidikar 5 лет назад
Can we connect this to Pixhawk or APM flight controls...???
@prandtlmayer
@prandtlmayer 5 лет назад
Yes, there are actually a few ways. The first is connecting the sonar to the autopilot. Check out the Ardupilot documentation. Otherwise you can send the readings from the companion PC using a rangefinder mavlink message
@abidikar
@abidikar 5 лет назад
@@prandtlmayer thanks
@prasobhprakasan5921
@prasobhprakasan5921 4 года назад
What IDE used for programming?
@prandtlmayer
@prandtlmayer 3 года назад
I use many, from VS Code, to PyCharm. Sometimes even Notepad++ just for editing
@sangqiianbo
@sangqiianbo 5 лет назад
can not find obstacle_avoid_sonar.py and low_level_control_with_sonar.py in gethub
@prandtlmayer
@prandtlmayer 5 лет назад
github.com/tizianofiorenzani/ros_tutorials/blob/master/donkey_car/src/low_level_control_with_sonar.py
@alilou1xx487
@alilou1xx487 5 лет назад
Why you didn't add arduino to control the ultrasonic sensors
@prandtlmayer
@prandtlmayer 5 лет назад
That's an option, but for the sake of the tutorial the Raspberry Pi suffices
@epazmino23
@epazmino23 2 года назад
Hola, tienes algún canal en español?
@prandtlmayer
@prandtlmayer 2 года назад
No, I don't speak Spanish
Далее
Как похудеть на 10 кг ?! БЫСТРО!
07:06
How to use Cameras in ROS (Sim Camera and Pi Camera)
32:01
How to Use a PIR Motion Sensor with Raspberry Pi
12:24
Просмотров 112 тыс.
Building a ROS Robot for Mapping and Navigation #1
19:53
Autonomous Rover From Scratch (ROS) Part 2
17:18
Просмотров 77 тыс.
Installing ROS on a Raspberry Pi 4/400
38:21
Просмотров 19 тыс.
Копия iPhone с WildBerries
1:00
Просмотров 8 млн