Difference between revisions of "Self Driving RC Car/2020"
Jump to navigation
Jump to search
(17 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<youtube>OL0vg1WmI6I</youtube> | <youtube>OL0vg1WmI6I</youtube> | ||
<youtube>YeUMtQyvZKM</youtube> | <youtube>YeUMtQyvZKM</youtube> | ||
+ | |||
= Presentation = | = Presentation = | ||
<pdf>https://www.doag.org/formes/pubfiles/11143501/2019-NN-Tim_van_Eijndhoven-Building_a_Self-driving_RC_Car-Praesentation.pdf</pdf> | <pdf>https://www.doag.org/formes/pubfiles/11143501/2019-NN-Tim_van_Eijndhoven-Building_a_Self-driving_RC_Car-Praesentation.pdf</pdf> | ||
Line 72: | Line 73: | ||
== DCC-DCC converter == | == DCC-DCC converter == | ||
To run the Raspberry PI from the 7.4 Volt Battery of the car the DC-DC converter has to be soldered | To run the Raspberry PI from the 7.4 Volt Battery of the car the DC-DC converter has to be soldered | ||
− | into the voltage supply chain. | + | into the voltage supply chain. You might want to select a converter with enough power for your usecase |
+ | === 15 Watt 3 A === | ||
+ | This configuration works if you only want to run a Raspberry PI and directly control the motor and steering servos of the RC car. | ||
<gallery> | <gallery> | ||
File:RC_IMG_3116.JPG | File:RC_IMG_3116.JPG | ||
Line 79: | Line 82: | ||
File:RC_IMG_3122.JPG | File:RC_IMG_3122.JPG | ||
</gallery> | </gallery> | ||
+ | === 25 Watt 5 A === | ||
+ | This configuration is currently tried for running the servos over an Adafruit 16 channel servo controller and using extra servos. | ||
+ | [[File:DSC00011-parts.JPG|800px]] | ||
+ | [[File:DSC00016-connected.JPG|800px]] | ||
+ | |||
== Camera mount == | == Camera mount == | ||
<gallery> | <gallery> | ||
Line 96: | Line 104: | ||
= PI Installation = | = PI Installation = | ||
+ | see {{Link|target=Raspberry PI}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== WebCam Interface == | == WebCam Interface == | ||
Line 149: | Line 151: | ||
# Ubuntu 18.04.2 LTS | # Ubuntu 18.04.2 LTS | ||
== OpenCV == | == OpenCV == | ||
+ | see also {{Link|target=OpenCV}} | ||
=== MacOS === | === MacOS === | ||
If you'd like to generally use OpenCV you can get it e.g. from the macports project: | If you'd like to generally use OpenCV you can get it e.g. from the macports project: | ||
+ | ==== MacPorts ==== | ||
<source lang='bash'> | <source lang='bash'> | ||
sudo port install opencv +java | sudo port install opencv +java | ||
Line 157: | Line 161: | ||
</source> | </source> | ||
For your convenience you'll find these two files in the lib directory. | For your convenience you'll find these two files in the lib directory. | ||
+ | ==== From Source ==== | ||
+ | # install5 in opencvubuntu has the commands for MacOS - but does not work even if you install dpkg with | ||
+ | <source lang='bash'> | ||
+ | sudo port install dpkg | ||
+ | </source> | ||
+ | |||
=== Ubuntu 18 === | === Ubuntu 18 === | ||
You might want to use scripts/opencvubuntu to download the 75 MByte libopencv_java343.so and install the backports libjasper libraries that are not published with Ubuntu 18 by default. You'll find | You might want to use scripts/opencvubuntu to download the 75 MByte libopencv_java343.so and install the backports libjasper libraries that are not published with Ubuntu 18 by default. You'll find | ||
some other links in the script that might also give you hints on how to proceed if you have another environment or different needs. You might want to create an Issue if you run into trouble. | some other links in the script that might also give you hints on how to proceed if you have another environment or different needs. You might want to create an Issue if you run into trouble. | ||
=== Windows === | === Windows === | ||
− | Help Wanted -please file an issue if you want to things running on Windows. | + | Help Wanted -please file an issue if you want to try to get things running on Windows. |
+ | |||
= Deployment = | = Deployment = | ||
Line 191: | Line 202: | ||
# rc-duke configuration file | # rc-duke configuration file | ||
# remote car raspberry PI configuration | # remote car raspberry PI configuration | ||
− | remotecar.host= | + | remotecar.host=picaro |
remotecar.user=wf | remotecar.user=wf | ||
# camera url format | # camera url format | ||
− | camera.url=http:// | + | camera.url=http://picaro/html/cam_pic_new.php |
# webserver configuration | # webserver configuration | ||
webcontrol.port=8080 | webcontrol.port=8080 | ||
imageview.port=8081 | imageview.port=8081 | ||
+ | # watchdog | ||
+ | # how often to send a heart beat in milliseconds | ||
+ | watchdog.heartbeat.interval.ms=150 | ||
+ | # how many beats may be missed before remote car is forced to stop | ||
+ | watchdog.max.missed.beats=6 | ||
+ | # use servoblaster as servo control | ||
+ | servo.command=servoblaster | ||
# be careful with your GPIO configuration | # be careful with your GPIO configuration | ||
# you might damage your PI with a misconfiguration! | # you might damage your PI with a misconfiguration! | ||
Line 206: | Line 224: | ||
# wheel configuration | # wheel configuration | ||
wheel.gpio=18 | wheel.gpio=18 | ||
− | wheel.center= | + | # positive - higher values mean go right |
− | wheel.stepsize= | + | wheel.orientation=+ |
− | wheel. | + | wheel.center=144 |
− | wheel. | + | wheel.stepsize=1 |
+ | wheel.max.left=115 | ||
+ | wheel.max.left.angle=-18.0 | ||
+ | wheel.max.right=158 | ||
+ | wheel.max.right.angle=14 | ||
# engine configuration | # engine configuration | ||
engine.gpio=17 | engine.gpio=17 | ||
+ | # positive - higher values means going quicker | ||
+ | engine.orientation=+ | ||
engine.speed.zero=130 | engine.speed.zero=130 | ||
engine.stepsize=1 | engine.stepsize=1 | ||
− | engine.min.speed.reverse= | + | engine.min.speed.reverse=127 |
− | engine.max.speed.reverse= | + | engine.max.speed.reverse=122 |
− | engine.min.speed.forward= | + | engine.min.speed.forward=133 |
− | engine.max.speed.forward= | + | engine.max.speed.forward=138 |
− | + | engine.max.velocity.reverse=-1.0 | |
+ | engine.min.velocity.reverse=-0.5 | ||
+ | engine.min.velocity.forward=0.23 | ||
+ | engine.max.velocity.forward=1.0 | ||
</source> | </source> | ||
The deploy script as a help option that shows how it can be used: | The deploy script as a help option that shows how it can be used: | ||
Line 279: | Line 306: | ||
= First Experiments = | = First Experiments = | ||
+ | These are just some experiments with the Raspberry PI, Ultrasonic Sensors and Servos that might you get warmed up for the real | ||
+ | challenge of getting your 1:10 RC self driving car going. You don't need to go thru all theses experiments. The basic car only uses the camera and two servos and no ultrasonic sensors. | ||
# {{Link|target=Ultrasonic Sensor}} | # {{Link|target=Ultrasonic Sensor}} | ||
# {{Link|target=SG90-Servo}} | # {{Link|target=SG90-Servo}} | ||
Line 284: | Line 313: | ||
# {{Link|target=Raspberry PWM LED Control}} | # {{Link|target=Raspberry PWM LED Control}} | ||
# <youtube>2vAoOYF3m8U</youtube> | # <youtube>2vAoOYF3m8U</youtube> | ||
+ | Author: {{Link|target=Wolfgang Fahl}} | ||
+ | |||
<headertabs/> | <headertabs/> | ||
− | [[Category:Raspberry]] | + | [[Category:Raspberry]][[Category:Self Driving RC Car]][[Category:frontend]] |