Attempting to Install GoPiGo3 Software On Pi OS Buster

The approved, supported, best OS for the GoPiGo3 is the GoPiGo OS (version 3.0.2 29Mar2022)

But if you want the GoPiGo3 software on 32-bit Pi OS Buster
which is no longer called “Pi OS (Legacy)” then follow the instructions below.



GoPiGo3 Software Install over Archived “Legacy” 32-bit Buster PiOS

Link to archived “Legacy (Buster) 32-bit Pi OS”:

  https://downloads.raspberrypi.com/raspios_oldstable_armhf/images/raspios_oldstable_armhf-2023-05-03/
  1. Download 2023-05-03-raspios-buster-armhf.img.xz to your desktop or laptop

  2. Download latest Raspberry Pi Imager from https://www.raspberrypi.com/software/

  3. Run Raspberry Pi Imager (v1.8.5 used 2024-09-22)

  • Select Device: (cannot be Pi5)
  • Select Operating System:
    • Use custom → navigate to 2023-05-03-raspios-buster-armhf.img.xz → Open
  • Choose Storage
  • Edit Settings
    • user: pi ← must configure user pi
    • configure WIFI: (Remember SSID is case sensitive)
  1. Boot the image (does not need to be on a physical GoPiGo3 at this point),
  • ssh into it or from an attached monitor and keyboard:
  1. Update the OS:
sudo apt update
sudo apt -y upgrade
sudo reboot
  1. Install GoPiGo3 API

Execute:

curl -kL dexterindustries.com/update_gopigo3 | bash
curl -kL dexterindustries.com/update_sensors | bash
  1. FIX Broken Python3 Installation of I2C_mutex (Dexter-AutoDetection-and-I2C-mutex egg)
cd ~/Dexter/lib/Dexter/RFR_Tools/miscellaneous/
sudo python3 setup.py install
  1. Test your installation:
python3
>>> import I2C_mutex
>>> import di_sensors
>>> (ctrl-d)

Kudos to @jimrh for finding this workaround

1 Like

Note that certain things mentioned above are not necessarily mandatory:

  • Configuring WiFi

    • Networking is mandatory.
    • The type of network connection depends on what you have and need.
    • WiFi is optional and you can use a wired Ethernet connection for the setup and configuration as it might be faster.  However, you’re going to have to set up WiFi eventually, unless you want your robot to be dragging a network cable everywhere it goes!
       
  • Being connected to a robot
    This is optional, but almost anything that you might do to test the installation requires the use of the robot, such as reading sensors or moving servos.  Additionally, once the robot’s software is fully installed and functioning properly, the robot’s LEDs, (antenna and power), will begin responding which helps verify correct and complete installation.

  • SSH into the robot

    • If you’re doing a headless installation, absolutely.
    • However you can also do this with a keyboard, monitor, and mouse - or a RealVNC remote connection if you enable VNC in raspi-config.

Note that this step is a mandatory step, even if there is nothing to update.  Don’t ask me why, but I’ve had trouble installing the GoPiGo libraries on various platforms and an update/upgrade cycle fixed it.
:man_shrugging:

* Rebooting is required only if any changes were made.

1 Like

Note:

I just tried these instructions on an untouched image and it did not work.

Additional research ongoing.

1 Like

Interesting, I actually applied the fix twice. First after the update_gopigo3 and again after the di_sensors.

Perhaps that was the secret incantation.

Or perhaps more was broken than just the missing I2C.

1 Like

I see part of my problem:

Part of the download crashes early.

Done installing RFR_Tools
Cloning into 'GoPiGo3'...
remote: Enumerating objects: 389, done.
remote: Counting objects: 100% (389/389), done.
remote: Compressing objects: 100% (333/333), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
./update_gopigo3.scr: line 193: cd: /home/pi/Dexter/GoPiGo3: No such file or directory

. . . . and as a consequence, nothing installs correctly.

I have also noticed the early abend when running the
git clone http://www.github.com/DexterInd/GoPiGo3.git /home/pi/Dexter/GoPiGo3 command too.

There needs to be a way to guarantee a good download - maybe an rsync from somewhere?

Update:
Failures continue.

I can download entire Linux images from everywhere, my wife can watch Russian movies in full HD, and my granddaughters can team-play some wild on-line game with their father, but I can’t do a git clone?  This is NUTS!

1 Like

I finally got a good download and it appeared to work.

(I used my cell phone as a “mobile hotspot” to get a working connection to GitHub.)

Now, to try it again with a clean install. . .

1 Like

Success with your plan!

  1. For whatever reason, my ISP is choking on curl and get clone requests.  I ended up using my cell phone’s internet by setting up a “mobile hotspot”.

  2. To make things easier, I:

    • Created an “installation” script that automates the steps that @cyclicalobsessive created above.
    • Pre-fetched the installation scripts curl’d by the commands as written - so instead of curl’ing them, they’re right here.
    • I modified these installation scripts to remove the “silent” and “quiet” parameters from various things, so that progress, (and errors!), are more easily seen.

Unpack all three files into the pi user’s home directory,[1] verify that they’re executable, and run the Install_GoPiGp3 script from a terminal window.

The script stops after each step so that you can CTL-C out if that step fails.  It also offers to reboot to finalize the installation after everything’s done.  CTL-C out if you don’t want to reboot just then.

GoPiGo3_Install_Scripts.tar.gz.txt (4.8 KB)

Next steps:
Print out all the three scripts, (including the fix-up script), and try to figure out what’s going wrong in the original scripts.

==================== Footnotes ====================

  1. Looking at the scripts, it looks like making them work for any user shouldn’t be that difficult since the “pi” user’s username is already stored in a variable.  All I have to do is figure out how to get the output from whoami into that variable and we’re golden!  (Famous last words. . . .)
1 Like

But the install as a non-pi user will need to create /home/pi/Dexter/ and put gpg3_config.json, and the serial numbers file there as expected by the gopigo3.py class.

And there might be some pi paths in the 99-rules file IIRC

And the ip announce feature perhaps, but that might use the user home dir

1 Like