Difference between revisions of "Self Driving RC Car/2020"
Jump to navigation
Jump to search
(→OpenCV) |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<youtube>OL0vg1WmI6I</youtube> | <youtube>OL0vg1WmI6I</youtube> | ||
<youtube>YeUMtQyvZKM</youtube> | <youtube>YeUMtQyvZKM</youtube> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Presentation = | = Presentation = | ||
Line 85: | 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 92: | 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 159: | Line 154: | ||
=== 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 165: | 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 200: | 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 | ||
Line 212: | Line 214: | ||
# how many beats may be missed before remote car is forced to stop | # how many beats may be missed before remote car is forced to stop | ||
watchdog.max.missed.beats=6 | 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 220: | 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: |