Uploaded March 2019 | Updated September 2026, 2 hours ago
** 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: youtube.com/watch?v=N6K2LWG2kRI&list=PLuteWQUGtU9BU0sQIVqRQa24p-pSBCYNv
** Watch the setup episode here: youtu.be/iLiI_IRedhI
*** 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/ros_tutorials
** 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 *******
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
facebook.com/tizianotutorials
******** Find me on Reddit
reddit.com/user/tizianofiorenzani
******** Find me on Linkedin
linkedin.com/in/tiziano-fiorenzani
******** Find me on Twitter
twitter.com/TFiorenzani
#ros #rostutorial #sonar #obstacle
** 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: youtube.com/watch?v=N6K2LWG2kRI&list=PLuteWQUGtU9BU0sQIVqRQa24p-pSBCYNv
** Watch the setup episode here: youtu.be/iLiI_IRedhI
*** 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/ros_tutorials
** 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 *******
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
facebook.com/tizianotutorials
******** Find me on Reddit
reddit.com/user/tizianofiorenzani
******** Find me on Linkedin
linkedin.com/in/tiziano-fiorenzani
******** Find me on Twitter
twitter.com/TFiorenzani
#ros #rostutorial #sonar #obstacle




![DIY Laser Scanner with TfMini and Raspberry Pi | ROS Tutorial for beginners #7
** Visit my brand new portal at https://tiziano-school.thinkific.com/ where you can find this ROS series as a FREE course **
A Laser Scanner can be obtained by rotating a lidar, using a motor and encoder or a stepper motor. In this example well be using a simple RC servo. Once we have the scan information, it can be integrated in ROS using a LaserScan message and then visualized in Rviz
In this example we build a cheap laser scanner using a TfMini plus lidar, a servo and a Raspberry Pi. We develop a library for controlling the servo and one for reading the laser. Then we create a servo scanner library and a ROS node. Finally we visualize the scan in Rviz
NOTE [June 2019]: The TfMini Plus now works with UART and I2C
http://en.benewake.com/res/wuliu/docs/15614876323609996SJ-GU-TFmini%20Plus-01-A04-Datasheet.pdf
We will use Servoblaster for controlling the servo directly from the Raspberry Pi
*** Thanks to Benewake for supplying the TfMini plus lidar: http://en.benewake.com/ ***
MAIN VIDEO:
1:32 - How it works
3:00 - TfMini library
3:40 - Servoblaster
5:40 - Servo Scanner Library
7:03 - ROS Node
9:47 - Rviz
*** PARTS ***
Benewake TfMini Lidar: https://amzn.to/2UvDBuS
Benewake TfMini Plus Lidar: https://amzn.to/2DpV3eo
Raspberry Pi 3 B (https://amzn.to/2GvqUuN) or B+ (https://amzn.to/2Xzqf2o)
- Raspberry Pi 4 (4 GB RAM): https://amzn.to/36GqwXf
- Raspberry Pi 4 (2 GB RAM): https://amzn.to/2Aj7Pg3
- Wide angle camera: https://amzn.to/2Pwc6P7
3D printed laser bracket: https://github.com/tizianofiorenzani/ros_tutorials/tree/master/laser_scanner_tfmini/3dprint
i2c Splitter (Pixhawk style): https://amzn.to/2WxMPIS
*** FIND THE CODE:
* My Github: https://github.com/tizianofiorenzani/ros_tutorials
TfMini Github: https://github.com/TFmini/TFmini-RaspberryPi
ServoBlaster Github: https://github.com/richardghirst/PiBits/tree/master/ServoBlaster
*** WATCH THE WHOLE ROS TUTORIAL SERIES: https://www.youtube.com/playlist?list=PLuteWQUGtU9BU0sQIVqRQa24p-pSBCYNv
** DRONE TUTORIAL SERIES: https://www.youtube.com/watch?v=TFDWs_DG2QY&list=PLuteWQUGtU9BcXXr3jCG00uVXFwQJkLRa
*** Connect the TfMini to Ardupilot/Arducopter: http://ardupilot.org/copter/docs/common-benewake-tfmini-lidar.html
******** Find me on Facebook
https://www.facebook.com/tizianotutorials
******** Find me on Linkedin
https://www.linkedin.com/in/tiziano-fiorenzani/
******** Find me on Twitter
https://twitter.com/TFiorenzani
** Go to my channel: https://goo.gl/BjLGnS
** Check out my latest video: https://goo.gl/ZhcNi4
** Check out my most popular video: https://goo.gl/5KMJnU
#ros #tutorial #laserscanner #lidar DIY Laser Scanner with TfMini and Raspberry Pi | ROS Tutorial for beginners #7](https://i.ytimg.com/vi/NqkvlIHe4Yg/mqdefault.jpg)





