Software > Software

Two Servo Wheel Improved Robotic Movement


How can a fluid/smooth movement of a robot with two servos can be achieved?, my application is object avoidance, and i have a scanning servo with two SHARP IR sensors which find the most open spaces in the room. I have a problem making the movement less "Jerky", i tried correlating the angle to pulse widths for the two servos. I just want to know if there is any general algorithms out there i can use to make the transition between angles more smoother.

Thank you for your help.

Easiest way to do it, in my opinion, is to use mean value, as opposed to current value from IR Sharp. The other option could be using PID or Fuzzy Logic.

I understand what you mean, what you want to perform is pure maths. WHen the robot changes route for example going to the left, the right wheel spins faster while the left wheel slows down to accomplish the change route.

It's actually pure math formula to calculate on which speed the servo's should turn.

about the "pure math", here's what i came up with so far in terms of relationship between angle (0->180) and pulse widths to the two wheel servos:




PS I'm using the Arduino Servo Library, on an Arduino Uno

HOWEVER, like my original question, the movements would be very rapid and "jerky' because of the constant change in the angle (pos variable) which represents that most open space.

another question, if i use the fuzzy logic to get an adjustment angle relative to the direction of travel, proximity of obstacle, and angle of obstacle; how do i translate that angle into pulse widths for the servos, do i just rotate to that angle (for a certain number of pulses) or do something else?


[0] Message Index

Go to full version