This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dummy motor driver
#3
(2019-02-02, 08:58 AM)seandepagnier Wrote: What do the scripts do?  How do they communicate to the motor?

It would make more sense to implement a driver for your controller in servo.py  It would not be efficient to execute bash scripts for this purpose since the autopilot commands the motor at 10-25hz any lag would degrade performance.

I have the arduino driver used by many, but there is also a driver for direct control from raspberry gpio pins.  You could implement another driver.  I can't say more without more information,

thanks for your fast answer. this would be cool, but im not sure if this would have benefits for you or the community.
The controller is an arduino(or similar) with polulu motor controller, but the arduino has more sensors attached with a small control panel...it works standalone...arduino output goes to an raspi and has a program but its not very good and stable. so reorganisation is not so easy. 

the scripts just opens serial and send some command
For steering: it just sends an "s" and a value...from -45 to 45
For driving: it send "m" and a value...from -255(reverse) to 255
the arduino sends back changes...eg the motor slowly accelerates...so serial gives mit back:
M0
M1
M2
M3
And of course fail reporting.
This is why i asked to script it. Or how would you do it? Perhaps direct serial commands?or did you implement pipes?
Reply


Messages In This Thread
dummy motor driver - by qaywsxedc - 2019-02-02, 12:42 AM
RE: dummy motor driver - by seandepagnier - 2019-02-02, 08:58 AM
RE: dummy motor driver - by qaywsxedc - 2019-02-02, 11:01 AM
RE: dummy motor driver - by seandepagnier - 2019-02-02, 06:23 PM
RE: dummy motor driver - by qaywsxedc - 2019-02-03, 12:29 AM
RE: dummy motor driver - by seandepagnier - 2019-02-03, 02:04 AM
RE: dummy motor driver - by ddelorme - 2019-02-05, 10:39 PM
RE: dummy motor driver - by seandepagnier - 2019-02-06, 01:14 AM
RE: dummy motor driver - by ddelorme - 2019-02-07, 01:49 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)