Problem with Gopigo

I used an image of the memory card from Dexter and ran some updates. I then ran the program to perform the basic movements of the robot and it ran fine. I then tried to run the sample code that would send back a video signal to the browser and got an error in the code. I went back and followed the instructions to update both the memory card as well as the firmware hoping that would help but now the Gopigo doesn’t even respond to the program for basic movements. I have run the troubleshooting routine on the desktop to create a log file. Not sure where to upload to the file tho… help please?

Hi @jimfranks,

You can follow this tutorial to transfer the files from Pi to your computer. Can you tell us what instructions you followed to run the firmware update and also you had mentioned that you ran a sample code that would send a video signal to the browser. Can you send us the link to that program and also the error that you got on using that.

-Shoban

Shoban,

Do you have an email address that you want me to send the log file to? I don’t see an upload option on the forum page.

Thanks,

Jim

Shoban,
The sample code I attempted to run is one that was on the card under examples called robot_web_server.py. The error I got was Traceback (most recent call last):
File “./robot_web_server.py”, line 86, in
import sockjs.tornado
ImportError: No module named sockjs.tornado
The firmware update was the one I found following step 5 of the instructions called "Using your GoPiGo for the first time. If you need any other information. As soon as you tell me what to do with the log file, I’ll get that to you as well.

I appreciate the support!

Jim

You should be able to upload the logs here now.

You have to install for tornado. I believe its something like sudo pip install tornado but not exactly sure

Hi @jimfranks,

Thanks for the information. You should be able to upload the logs on the forums on clicking the upload button as shown in the image below.

Can you do the following and let us know if this helps you.

  1. Make sure your Pi has internet connectivity.

  2. Do a firmware update by running this command
    sudo bash /home/pi/Desktop/GoPiGo/Firmware/firmware_update.sh
    Make sure the firmware update is successful and post a screenshot of it.

  3. It also looks like a few packages are missing to run the robot_web_server.py, so to install them run this program or type this command on your terminal -
    sudo bash /home/pi/Desktop/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot/browser_stream_setup.sh

-Shoban

robot_web_server.txt (158 Bytes)
log.txt (6.1 KB)
Dexter_Software_Update_log_2017_04_05__09_48_02.txt (198.3 KB)

Ok I ran those commands, reconnected the motors and ran the program again. The errors have changed so I am uploading the latest ones for you to take a look at.

April 7 errors.txt (1.7 KB)

I’m seeing
sudo bash robot_web_server.py

That should be
sudo python robot_web_server.py

I’m such a Linux noob lol… OK lets thy this …April 7B errors.txt (833 Bytes)

Thanks for the patience guys!

Jim

OK I did some research and tried running the code from it’s original location rather than from the working copy that I made. It now comes up with a video signal from http://dex.local:98 The only issue is that it sticks a navigation button right in the middle of that image which I assume it supposed to be on the side. As soon as I move the navigation button the program locks up and dumps me out.

I replaced the batteries in the unit because I suspected that low batteries would cause the lockup and I was correct. So esentiall the program runs now. I’m not too concerned at this point that the “joystick” control shows up in the middle of the screen because I plan on reworking the code anyway. One last question: can the gopigo have both motors running at different speeds so the unit can actually “turn”? The demos seem to turn the unit by stopping one motor completely to accomplish a turn to the right or left.

Thanks for the excellent support!

Jim

Don’t see a reason why not. Might as well try. The example probably did it that way because it could.

@jimfranks: the code for joystick functionality is here. It uses the default functions for turning the gopigo, i.e., left() and right(). You can use left_rot() and right_rot() to turn the motors in the opposite directions. You should also have a look at this if you want to see how to control each motor individually.

Do let us know if this helps.