Rock Candy wireless / no directional stability

Forums:

Hi,

I used the zeroboorg / PI Zero combi and the problem is, that if I move the left joystick forward, only the left wheels start moving more forward start all wheels which let hte robot always start to the right and during the drive it alway have a right drift.
I checked it with the jstest js0 and saw, that sometine if moving the left joystick smoothly forward or a little bit in the left direction the not only axisup/down get power (1 in the test software) but also 0 geht power.
Any ideas, how to solve or to correct this.

Many thx in advanve

Peter

piborg's picture

This is actually because of the ZeroBorg and can be fixed with a quick code change and swapping some wires :)

Basically their is a bit of a difference between the motor outputs in forward and reverse operation.
In the zbJoystick.py script we run the left side motors the other direction from the right ones.

I suggest you have all of the motors running the same way.
First open zbJoystick.py in an editor and look for these lines:

                # Set the motors to the new speeds
                ZB.SetMotor1(-driveLeft * maxPower)
                ZB.SetMotor2(-driveLeft * maxPower)
                ZB.SetMotor3(driveRight * maxPower)
                ZB.SetMotor4(driveRight * maxPower)

What you need to do is add a - sign in front of driveRight, like this:

                # Set the motors to the new speeds
                ZB.SetMotor1(-driveLeft * maxPower)
                ZB.SetMotor2(-driveLeft * maxPower)
                ZB.SetMotor3(-driveRight * maxPower)
                ZB.SetMotor4(-driveRight * maxPower)

Once you have changed the code swap the + and - connections on motors 3 and 4 on the ZeroBorg.
This will make them move in the correct direction again.

HI,

just done, works perfect ... many thx and have a nice weekend wherever you are :-)

Peter

Subscribe to Comments for "Rock Candy wireless / no directional stability"