uneven movement tests

Hi, I am very excited to have just got my monsterborg. I am far from a robot expert so I am making tentative steps. I have built the monsterborg and just tried out the monsterSequence.py code. It was way, way off a square so I followed the instructions to adjust the movement. I have found pretty consistently that it goes quite a bit further in reverse than forward (forward was with the camera at the back which kind of surprised me - should it be that way?) and it spins left less than it spins right. Sometimes just a little, sometimes quite a lot, but always more right than left.

This being the case, it is really hard to write set sequences as 90 degrees in one direction is not at all 90 degrees in the other. Likewise with movement.

Any ideas?

Thanks,
Pablo

piborg's picture

This is probably a case of slight differences in motor speed between the four motors and their driving direction.

At a guess I would say one or both of the right side motors are running faster than the left when driving backwards. This would cause them to drive slightly faster when turning right and increase the speed in reverse as well.

Balancing all four motors is quite tricky, the easiest thing to do is instead adjust the speeds used the script. You can change the +1.0 and -1.0 for smaller values when turning right.

For example this version of PerformSpin only runs at 90% speed when spinning to the right:

# Function to spin an angle in degrees
def PerformSpin(angle):
    if angle < 0.0:
        # Left turn
        driveLeft  = -1.0
        driveRight = +1.0
        angle *= -1
    else:
        # Right turn at 90%
        driveLeft  = +0.90
        driveRight = -0.90
    # Calculate the required time delay
    numSeconds = (angle / 360.0) * timeSpin360
    # Perform the motion
    PerformMove(driveLeft, driveRight, numSeconds)

The same change can be made to the PerformDrive drive as well.

I would make these changes to the script and then adjust the values until forwards / reverse movement are about the same as well as left / right spinning.

Thanks, I'll give that a go.

Pablo, even when it is already some time ago, may I ask how you fixed this?
I have the Impression I see a similar Problem...
Thanx

Subscribe to Comments for &quot;uneven movement tests&quot;