Replies

  • I am also working on a project using continuous servos for gimbal. I need a way to compensate for the gyro drift (for yaw) and thus, make the use gyro drift to determine the velocity of the servo.

    Any suggestions on how to achieve these two aims will be helpful.
  • I think Adam did the code for the infinite-servos, than I had some changes made that made his code incompatible with mine.

    I'm not sure if he already merged his changes on top of mine.

    I do not have infinite servos to test width, so I will not add infinite-servo control features.

  • Developer

    Turns out the solution was quite simple. I just checked new code into master that will allow users to specify if they are using 360 (continuous) servos. Currently the code uses the angular output from the AHRS solution to compute a corresponding PWM "position" for the servo. This works with regular servos where PWM = position, but with 360 servos PWM = speed of rotation. The solution was to use the output of the gyros (rate of rotation) from the AHRS rather than the angle. This way we know how fast the angle is changing instead of the actual angle. This is then multiplied by the proportional gain and transformed into the PWM signal. I did several tests today with my photoshipone gimbal (Spektrum H6040 servos) and it worked perfectly! This should be available in the next release and I will add documentation to the wiki when the code rolls out to everyone.

  • If you're using some external rotary encoders, like the AS5040 magnetic encoder, and are using an Arduino or similar board to control a motor driver, maybe use the arduino map function to convert the pulse output from the APM for tilt or pan to a value in degrees at which you want to point the camera, then feed that into the controller for the servo/encoder. There is an excellent PID library for arduino that I've used for this very issue.

    http://arduino.cc/en/Reference/map

    http://arduino.cc/playground/Code/PIDLibrary

    In the setup below I'm using a Baby Orangutan B-328 from Pololu.com, which has an ATmega328 and a dual channel motor driver that can push 1 amp, and is compatible with most arduino code. I cut the gears on the servo to allow continuous rotation, and removed all the electronics, setting it up as a basic gear motor. The magnetic encoder is on a board from Mad Scientist Hut.

    3692337213?profile=original

  • I'm wondering this as well.  I've got THESE installed in a pan tilt gimbal, but i'm not sure how to set them up.  Or if you even can.

    Has anyone had luck with this?

  • I have a 360 modded servo setup that uses the guts from two servos, one is used for the motor/gears the other is used for the potentiometer. they are geared together so I get 720degrees out of standard servo signals. its not really that hard, but if you mess up like i did it costs you a couple servos.

     

  • Does it have optical encoders? Or how does it get the position data?

  • Developer

    I think that this is impossible because the code has no way of knowing the current position of the servo.

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13, 2022
More…