[SOLVED] GoPiGo2 not moving straight

After opening and assembling the GoPiGo2, I noticed that the robot does move straight but always turns right (see the video of the Boxter straight line test below). The battery pack is on top of the canopy and the wheels have rubber bands as recommended by the previous forum posts.

VID_20180430_211811.mpg (1.1 MB)

Then I submitted the response to Boxter but after the adjustments the GoPiGo2 still turns right (see the video of the 2nd Boxter straight line test below).

VID_20180430_211955.mpg (1.2 MB)

Iā€™ve also made a video of the wheels and encoders turning during the straight line test and they clearly show wobbling (see the video below).

VID_20180430_212221.avi (3.0 MB)

Could you please help me to resolve this issue? Thank you very much in advance!

Hello @stemguru
Can I ask you something? What exactly are you referring to by ā€œafter the adjustmentsā€ ?

I want to make sure I understand what youā€™ve done so far.
THank you,
Cleo

Hi @cleoqc

After I ran the Boxter straight line test and submitted my response about the degree of turning, the Boxter software said that it has made some adjustments to my GoPiGo2 and I should run the test again to confirm that my GoPiGo2 moves straight now. However, as you can see from the 2nd straight line test, it was still turning right :frowning:

The trimming process (to make it drive straight) is iterative. In your case, it may need to be run five or six times!

@cleoqc, I tried to repeat this process 6 times but it only made it worse. This is very strangeā€¦ Today my first test was almost perfect but already after 2 times running the straight line test, it was turning right really badly :disappointed_relieved: I was wondering if there are other adjustments that I could make using DexterOS?

Hi @stemguru,

Are you sure you didnā€™t run the trim process in the opposite way? Please run the trim process again, but do it the exact opposite way you did it before.
Beware that the trim process asks you to show the direction of your GoPiGo and not to which direction the robot has to be adjusted.

Thank you!

@RobertLucian, yes the trim process was done the right way. I have also tried the opposite way just to check but then the GoPiGo starts making circles. I was wondering if there is anything else that I could try?

If you are comfortable with Python, you can take a look at these functions. They will allow you to ā€œtrimā€ the motors more than what DexterOS offers.

1 Like

Also, still in the Python IDE, you can run basic_test_all.py (in GoPiGo/Software/Python)
The options ā€˜ttā€™, ā€˜twā€™ and ā€˜trā€™ (trim test, trim write, trim read) can help you set the trimming beyond what the DexterOS gui can.

Cleo

1 Like

hey @stemguru,
did you manage to get your robot to drive straight? I wouldnā€™t want to leave you with a stubborn robot.

Cleo

1 Like

Hi @cleoqc!

Thank you for the follow-up and sorry for the delay.

Iā€™ve programmed the driving test for my GoPiGo2 as follows: drive forward for 8 seconds, pause for 1 second and then drive backward for 8 seconds. The straight line on the floor can be used as a guideline. Below are the videos of the trim procedure for different inputs of trim_write() (from the module easygopigo.py) :

trim_write(0).mpg (2.1 MB)

trim_write(-8).mpg (2.2 MB)

trim_write(-7).mpg (2.3 MB)

trim_write(-6).mpg (2.1 MB)

The trim value of -7 looks best from this test although in the morning my best value was -6. The driving direction seems to be very sensitive to the smallest changes in the trim value. The backward driving is not ideal either and itā€™s probably due to the serious wobbling of the motor shafts (see my initial post). In the beginning the trim procedure was a bit confusing because trim_write(0) correspond to the value of 100 obtained by trim_read() and trim_write(-7) results in 93 from trim_read(). Now itā€™s clear how these values are obtained but it would make more sense to return the same values by trim_read().

The overall result is passable but I have to admit that I got a bit disappointed with the quality of the motors/encoders in GoPiGo2. As far as I understood, you have significantly improved them in the newest version of GoPiGo3 so I guess thatā€™s the natural learning curve :wink: Thank you very much for your help and support on this forum!

Hello @cleoqc! I was wondering if the wobbling of the motor shafts (see the 3rd video in my first post) is typical for the GoPiGo2 motors and if it would make sense for me to try to order a motor replacement kit? Do you think it might improve the driving experience or is the issue mostly due to the encoders? If I decide to order a motor replacement kit, would it be possible to deliver it to Europe (Belgium) or do you maybe sell it in Europe via distributors? Thanks a lot!

@stemguru
I do not know if our European distributors still have the old motors. You could order a new set with us, however Iā€™m not certain it will help all that much. The motors/encoders were the biggest improvment from version 2 to version 3.
Cleo

1 Like

@cleoqc
Thanks! I will save this money for GoPiGo3 then :wink: