Shop OBEX P1 Docs P2 Docs Learn Events
How to stop smoothly when using the Parallax Motor Mount and Wheel Kit with Pos — Parallax Forums

How to stop smoothly when using the Parallax Motor Mount and Wheel Kit with Pos

jmbertoncelli@USAjmbertoncelli@USA Posts: 48
edited 2009-09-06 18:59 in Robotics
Hello All,

I have a question about the Motor Mount and Wheel Kit with Position Controller, How to stop smoothly when an object has been detected in front of a robotic rover?· Let say that you have a rover with·a sensor(s) that is giving you the distance·to an·object for your rover to avoid then what should be the right command(s) to send to the position controller to stop smootlhy few centimeters or inches before to colide with the object??? I know that that I can use the clear position command but that is all but smooth... What from your point of view should be the best option to manage this process?

thanks.

jm.

Comments

  • SandgroperSandgroper Posts: 62
    edited 2009-09-04 15:48
    One way is to reduce the speed of the motors as the distance to the object decreases. This can produce smooth results, but the trade off is the amount of time and distance that it takes to come to a stop.

    Another way is to simply switch the motors off when they reach the threshold distance and let them free wheel to a stop. Sounds simple, but if the robot is very light it will still stop suddenly, especially if the robot has soft tyres or is operating over a soft surface. The trade off is that it saves power. If the mass of the robot and its payload doesn't change, and it only operates over smooth, hard surfaces, it shouldn't be too much of a problem.

    A third method is to thow the motors in reverse. This might sound strange, because you'd expect it to bring the robot to a sudden stop. Whether it does or not will depend on the mass off the robot, its velocity at the time, and how long the braking force is applied for. The drawbacks are that it wastes a lot of power, and it risks damaging the motor and gearbox. However, controlled braking (e.g. pulsing the motors in reverse) can be very useful in certain situations. Trying to stop a forward moving robot on a downhill slope is one example.
  • jmbertoncelli@USAjmbertoncelli@USA Posts: 48
    edited 2009-09-04 19:35
    Thanks for your inputs but I still have questions... If this kit has been designed for robotics then one should be able to come with a good way to manage smooth stop when an obstacle has been detected in front of the robot??

    based on the documentation:

    "Then it uses the current average speed to calculate the distance required to decelerate smoothly to the
    final end point without overshoot. When traveling in one direction, if a new position advancement value
    requires the wheel to reverse direction, it will still decelerate smoothly to a stop at the user-set ramp rate
    before re-accelerating in the opposite direction toward the new end point."

    If we can QUERY the current position (QPOS) then we know the current POS then if we * by -1 the current POS and set the new TRVL with the new current POS that should stop the robot... however there is still and unknown how many POS the robot will still travel before to stop related to the speed and ramping down rate...???

    based on the documentation:

    "Sending a command to travel 0 positions is a special case used to bring the wheel to a
    smooth stop when traveling. The current speed is decelerated at the speed ramp rate and
    the end point is advanced to the exact location where the speed will reach zero. Note that
    this special case is not considered accumulative and will override the previously remaining
    distance to travel. However, TRVL commands sent after this will be accumulative as
    expected."

    Can we compute what is the maximum distance before that the robot stop related to the speed and ramping rate...??? If yes my problem is solved I just have to set my obstacle detection subsystem with the right distance + a cushion.

    thanks

    jm.
  • ercoerco Posts: 20,256
    edited 2009-09-05 23:24
    jm: You're exactly right, except that only you know the dynamics of your system: robot weight, wheel/tire characteristics, floor traction and speed. Very difficult to compute the stopping distance with all those variables. You must "empirically determine the coefficient of dynamic performance"; AKA test & fudge to get repeatable stopping distances. Skidding is to be avoided at all costs. Assuming you want to maintain reasonable full speed up to the object, you must start decelerating (to a stop) with enough distance remaining to ensure you don't hit the object. Come up with a loop routine (for/next, do, whatever you like) to ramp your robot's speed from max to zero. Test, test, & test to measure the distance consistently required to come to a straight, full stop. Add your "cushion margin" to that distance, and that's the target distance at which to trigger your stop routine. Once you're safely stopped a cushion margin away, you can always creep forward slowly while continually measuring the distance to approach the desired target distance.

    Just in case, keep that baseboard touchup paint handy!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • jmbertoncelli@USAjmbertoncelli@USA Posts: 48
    edited 2009-09-06 18:59
    Thanks erco. I have the paint!!!! Do you think that Parallax could provide a function to QUERY the Position Controller that could return the number of POS still remaining before reaching the set point (0 to a stop)? They should obviously know what is going on inside the Position Controller then it should not be too hard for them to at least provide the number of POS until full stop?

    jm.
Sign In or Register to comment.