Formula for controlling the movement of a tank-like vehicle?

前端 未结 10 1715
情话喂你
情话喂你 2021-01-05 18:13

Anyone know the formula used to control the movement of a simple tank-like vehicle?

To \'steer\' it, you need to alter the force applied the left and right \"wheels\

相关标签:
10条回答
  • 2021-01-05 18:14
    Change in angle (in radians/sec) = (l-r)/(radius between treads)
    Velocity = l+r
    

    For the dtheta, imagine you had a wooden pole between your two hands, and you want to calculate how much it rotates depending on how hard and which way your hands are pressing - you want to figure out:

    how much surface distance on the pole you cover per sec -> how many rotations/sec that is -> how many radians/sec (i.e. mult by 2pi)

    0 讨论(0)
  • 2021-01-05 18:25

    For a skid steered vehicle that is required to turn in radius 'r' at a given speed 'Si' of the Inner Wheel/Track, the Outer track must be driven at speed 'So' :

    So = Si * ((r+d)/r)
    

    Details:

    In Skid Steering, a turn is performed by the outer wheels/track traveling further distance than the inner wheels/track.

    Furthermore, the extra distance traveled is completed in the same time as the inner track, meaning that the outer wheels/track must run faster.

    Circle circumference circumscribed by "Inner" track:

    c1 = 2*PI*r
    'r' is radius of circle origin to track/wheel
    

    Circle circumference circumscribed by "Outer" track:

    c2 = 2*PI*(r+d)
    'r' is radius of circle origin to inner track/wheel
    'd' is the distance between the Inner and Outer wheels/track.
    

    Furthermore, c2 = X * c1, which says that c2 is proportionally bigger than c1

    X = c2 / c1
    X = 2*PI*(r+d) / 2*PI*r
    X = (r+d)/r
    

    Therefore for a skid steered vehicle that is required to turn in radius 'r' at a given speed 's' of the Inner Wheel/Track, the Outer track must be driven at :

    So = Si * ((r+d)/r)
    

    Where:

    'So' = Speed of outer track
    'Si' = Speed of inner track
    'r'  = turn radius from inner track
    'd'  = distance between vehicle tracks.
    
    
                   ********* <---------------- Outer Track
               ****    |    ****                     
            **         |<--------**----------- 'd' Distance between tracks
           *        *******<-------*---------- Inner Track
          *      ***   ^   ***      *  
         *      *      |<-----*------*-------- 'r' Radius of Turn
         *     *       |       *     * 
         *     *       O       *     * 
         *     *               *     * 
         *      *             *      * 
          *      ***       ***      *  
           *        *******        *   
            **                   **    
               ****         ****       
                   *********           
    
    0 讨论(0)
  • 2021-01-05 18:26

    Well, keep in mind that you're also talking about duration here. You need to find out the forces taking in to account the speed at which the tank turns at (1, -1).

    I.E., if the tank takes one second to spin 360˚ at (1, -1), and you want to spin 180˚ in one second, (.5, -.5) would do the trick. If you wanted to spin the same amount in half a second, then (1, -1) would work.

    This is all further complicated if you use abs(lrate) != abs(rrate), in which case you'll probably need to break out a pencil!

    0 讨论(0)
  • 2021-01-05 18:26

    Here's how I would attack the tank problem.

    The center of the tank will probably be moving by the average speed of the right and left tracks. At the same time, the tank will be rotating clockwise around it's center by ([left track speed] * -[right track speed]) / [width].

    This should give you speed and a direction vector.

    Disclaimer: I have not tested this...

    0 讨论(0)
  • 2021-01-05 18:26

    It has been a while since I did any physics but I would have thought that the apposing forces of the two tracks moving in opposite directions results in a torque about the center of mass of the tank.

    It is this torque that results in the angular momentum of the tank which is just another way of saying the tank starts to rotation.

    0 讨论(0)
  • 2021-01-05 18:27

    I'd say you're thinking about it in the wrong way.

    Increasing the difference in speed between the two treads doesn't cause degrees of turn - they, combined with time (distance at different speed) cause degrees of turn.

    The more of a difference in tread speed, the less time needed to achieve X degrees of turn.

    So, in order to come up with a formula, you'll have to make a few assumptions. Either turn at a fixed rate, and use time as your variable for turning X degrees, or set a fixed amount of time to complete a turn, and use the track speed difference as your variable.

    0 讨论(0)
提交回复
热议问题