Comments (11)
Does the car move forward when you press left and right arrow keys? Or do the front wheels just turn?
Have you defined self.pwm_forward
and self.pwm_backward
?
from self-driving-car.
@zfhall Just the front wheels turn, self.pwm_forward
and self.pwm_backward
are already defined.
The only changes made were the declaration of the servo, the SetAngle function and setting the angles inside of the def's, as posted above.
Thanks
from self-driving-car.
I have also had the humming-but-no-movement issue before, but it’s been awhile since I last had that problem so I don’t recall the fix off the top of my head. I’ll reply back here if I remember though.
from self-driving-car.
Actually, I had a temporary issue earlier today where I couldn’t turn but only move forward/backward, but that was due to crossed/touching wires (I did a poor job soldering and have exposed wire metal). As soon as I moved the wires apart from each other the car was able to turn again. Not sure if that’s your extact issue though. If it’s never worked for you I would also double check that you plugged the wires into the correct GPIO pins on the Pi.
from self-driving-car.
What motor control chip are you using? The L293D and L298N cannot handle high current DC motors. If you are using one of these chips, it's likely that the voltage drop across them is so large when a load is applied, that there is next to no voltage being sent the motor. Try the Cytron MD10C DC Motor Driver instead.
from self-driving-car.
@RyanZotti I doubled checked the wiring and I don't see any issues. I can try a deep check.
@zfhall I am using the L293D motor contoller, but I don't know if thats the issue since the servo is connected to the RPI and there's only one motor being run from the controller.
I think it might be an issue with the edited code because after some more testing it seems that with my servo code up top- I get really bad latency/performance issues with driving forward and back: I would press the up arrow and a few seconds later the motors would come on shortly and then full power for a few seconds.
However, with servo steering there is a bit a latency at first but later little. I also tried running the servo code with servo unplugged and got same issues moving back and forth.
from self-driving-car.
@Charlieglider I may be missing something here, but if the motor connected to the L293D is used for forward/backward control, and you are having problems driving forward/backward, then the L293D could still be at fault. Does the forward/backward motor ever run continuously without cutting out? What car are you using? Does the DC motor (not servo) have a serial number? It sounds like you have the same setup as I do, and I had this exact problem until I switched to the MD10C. If you have a multimeter, try measuring the voltage sent to the motor when you tell it to drive forward/backward. If the voltage is lower than your battery voltage, you likely have a problem with the chip.
from self-driving-car.
@zfhall Apologies for any confusion, when I run the normal drive_api.py (no changes/servo added in) I get decent driving performance forward and back (no left and right capability because I am using a servo). However, when I run drive_api.py with my changes made above and the servo added in, I get the steering capabilities but get choppy driving or have the forward/back motor running continuously without cutting out.
I can try measuring the voltage at the motor, I also think I'm losing power/performance somewhere, but it might be a separate issue to the one with the servo.
from self-driving-car.
@Charlieglider Ah OK, that makes sense now. I'll try and have another look at your issue when I next get the chance. But I'm going to quite busy over the next few days so hopefully, someone else can chime in with a solution. Good luck!
from self-driving-car.
@zfhall Ok, thank you.
from self-driving-car.
I know it has been a while since the last post on this issue.
Nonetheless, any ideas for getting this car to work with the servo?
from self-driving-car.
Related Issues (20)
- FFSERVER HOT 9
- REST API HOT 1
- Reinforcement learning HOT 2
- /etc/ff.conf_original HOT 1
- Thank you for the code. I have achieved it. HOT 1
- Output Video Frame Rate? HOT 20
- TensorBoard Visualisation HOT 4
- Improve Deployed Model's Autonomous Driving Behavior HOT 12
- FFmpeg HOT 3
- Possible Issue with "self.images_per_epoch" in Dataset.py HOT 2
- A better walkthrough of the training data collection process? HOT 3
- drive_api.py does not show live feed? HOT 4
- How to do data processing and model training on my own PC or laptop rather than AWS? Please help. HOT 1
- ai_drive not working from cnn trained models. HOT 1
- ai_drive not working.
- model
- localhost/drive not found HOT 1
- Dataprep error HOT 1
- Circuit connecttion HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from self-driving-car.