GoPiGo-3 on Bookworm and Python - What WERE they thinking!

@cyclicalobsessive

Re:
Trying to install the GoPiGo utilities on Bookworm 64 bit so I can run it on a Pi-4 with the V3 camera which requires PiCamera2 which only runs on Bullseye or later.

Apparently bookworm absolutely stamps its feet and INSISTS that anything even remotely Python related has to be run in a “virtual environment”.  Like it or not, feasible or not, the Gods of Python have decreed that stand-alone Python is no longer acceptable.

When you try it, you get all kinds of scary warnings - your dog will get fleas, you’ll have intractable dandruff, your cat will scratch and pee on everything, your pet turtle won’t love you anymore, and so forth1.  The only way possible is to pass a special parameter: --yes-i-want-to-bork-up-my-system, (or something like that.)

Running your install script and then trying some of the “Bookworm” examples generated the following results - so far:

  1. Basic power functions appear to work, at least according to the green light.  However the WiFi indicator LED doesn’t.

  2. The actual GoPiGo libraries are, apparently, not installed as I received errors that things like “easygopigo3” could not be found when running the Bookworm examples through Thonny.

  3. After running the “curl” command,
    (curl -kL dexterindustries.com/update_gopigo3 | bash),
    a fairly large amount of stuff was installed, the Python2 stuff being a significant exception along with things that have been removed from the bookworm repo’s.  If you’re interested, I’ll re-run it with errors directed to a file.

  4. After installing the GoPiGo libraries, (to the extent I could), I noticed when running the bookworm distance sensor example that it depends on “I2C_mutex” which is apparently not available and is likely one of your custom utilities.

Questions:

  1. Am I barking up the wrong tree?  (i.e. Should I even be trying this on Bookworm?  Or am I smoking my lunch?)

  2. Should I consider rolling back to Bullseye?

  3. Should I punt, tuck my tail between my legs, and slink on back to GoPiGo O/S 3.0.3, avoiding the later OS’s altogether?

What say ye?

====================

  1. Old joke: What do you get when you play a country song backwards?
     
    You get your wife back, your truck back, your dog back, your job back. . . . :rofl:
2 Likes

?? What are the GoPiGo utilities ??

ROFL!

Well not insists, but made it inconvenient, not recommended, “don’t ask us if something doesn’t work”, and quite possibly I am the only person using that --break-system-packages option.

That’s a good sign.

I would guess the libs were there, but Thonny perhaps was not configured to find them.

Which deleted the entire “Bookworm GoPiGo3 API” installed by my script…

No interest in trying to keep DI install scripts working for “unsupported OS targets”.

You did overwrite the changes need to run GoPiGo3 on Bookworm…

PiOS Bookworm is the recommended Raspberry Pi OS. I am doing all my work on PiOS Bookworm Desktop 64-bit, which was an initial pain to set up since it does not appear to allow headless setup.

Since Bookworm defaults to the Wayland window manager, I don’t think the GoPiGo3 QT desktop applications are going to run on Bookworm. I have had some success with changing the window system to x11 to get visual ROS 2 applications to run on Bookworm. I built my own command-line “GoPiGo3 Tuning Apps” (which work wonderfully on Bookworm), so I am not even attempting to port the GoPiGo3 desktop applications to Bookworm.

I am of the mind that ModRobotics will not likely update the installation script for Bookworm. As long as the GoPiGo OS continues to work for the basic kit and the monthly GoBox subscription which they can control the camera version folks have to use with the GoPiGo OS.

So …

Since you need it, and since it is the recommended RPi OS, yes, I think you should at least be trying to get a Bookworm GoPiGo3 system you can live with.

No, you should not be trying to use the DI update_gopigo3 script that appears to have been abandoned by ModRobotics. That sounds harsh, but MR is a business that has to make financial decisions in the interest of the business. I don’t hold any bad feelings toward MR.

I did 32-bit and 64-bit Bullseye installs, I don’t think the 64-bit install worked but I didn’t try very hard since the 32-bit install worked, and nothing I was doing needed 64-bit if I recall correctly.

This was my conclusion:

IF YOU ABSOLUTELY MUST, MUST HAVE PiOS BULLSEYE - WARNING: UNSUPPORTED and NOT-RECOMMENDED

This was my 32-bit Bullseye GoPiGo3 Repo:

Is it an all or nothing decision? I liked being able to boot up GoPiGo OS for helping folks that wander in, and then I could slap in my “Wonder if I can get GoPiGo3 API working on this latest OS?” card with the goal of finding out what broke and what works, and in the case of Bookworm "what can I band-aid to get the API to work for the motors, servos, distance sensor and ultrasonic sensor. (My DI IMU died, and I don’t need dual distance-sensors, so it is convenient that I don’t need software I2C anymore, and GoPiGo OS doesn’t run on Pi5 so my abilities to support those use cases is shot.)

2 Likes

Nope. Me too.

After reading this, I have decided to abandon that project - at least for the time being.

Ultimately my goal was to use Charlene with the V3 camera and Pi-5, (if I can find it), it looks like I might be stuck with what you have, one GoPiGo O/S robot and one ROS robot.

I know you have a Pi-5 running ROS.  Is it sufficiently ready for someone else to try it?

Assuming I can get ROS(x) running on Charlene, how do I:

  • Verify it’s working?
  • Make it “do something”, where “something” is some arbitrary action like moving around, using the distance sensor, detecting a bumper hit, or move the servos on command.

My near-term goal is to duplicate Charlie’s essential functionality, (use the camera and servos, duplicate my joystick guided robot), on Charlene and then expand further.

Have you done any experiments with guiding the ROS 'bot using a web interface?

What do you think of these ideas and how do you recommend that I do it?

What do you suggest

1 Like

The only ROS ready for anyone to try is the complete image with guided ROS walk-through for Pi3/4.

Pi5 code in the last 24 hours: " 272 files have changed and there have been [13,561 additions and 14 deletions]

Pi5 code in the last week: “289 files have changed and there have been [47,057 additions and 149 deletions]”

Everything you mention (except the bumper) is included in the step by step of the ROS2-GoPiGo3 image when installed on a Pi3/4 GoPiGo3.

Doing all that on an SDcard with the latest PiOS and Charlene’s Pi4 processor will maintain the most versatility to explore with enough “lessons to be learned”. (And all lessons learned on Pi4 PiOS Bookworm carry over directly to the Pi5 PiOS Bookworm configuration, but not the SDcards unfortunately.)

The ROS2-GoPiGo3 SDcard and step-by-step ROS exploration includes experiments with the rviz2 remote visualization tool, which will display the picam images, and allows remote /twist topic publishing. I am not aware of a joystick plug-in for rviz2 but it would not surprise me if someone did it. There are lots and lots of remote manipulated ROS robots, probably more than autonomous bots.

I love that you are interested in PiOS on the GoPiGo3. I love that you are curious about ROS on the GoPiGo3.

Each of those separately contain lots of “fun with robots”, but together would be “frustration with robots”.

2 Likes

Trust me. . .
I am sure that each of these separately contains enough frustration to last a lifetime!

2 Likes

That will contribute greatly to the GoPiGo3 community. More and more we are seeing “Camera doesn’t work” around the net, and recently here with “Dexter OS”. I don’t know if MR is planning another GoPiGo OS update, but if you figure out what the V3 camera on PiOS takes, it will help the community and MR.

I removed the PiCamera from GoPi5Go Dave, now that he is sporting a wide angle Oak camera.

2 Likes

@cyclicalobsessive

Update:

  1. I would like to try the Pi-5 on Charline.  (I found the Pi-5 I bought!)

  2. I do not care about ROS at this point in time.

  3. I want the Pi’s OS to be functional as a robot.

Up to now, my definition of “functional as a robot” depended on being able to run the included GoPiGo libraries and applications as they would be run in a “plain vanilla” GPGOS install.  (i.e.  Using the web interface to see if the robot’s camera is working and to exercise the motors, eyes, WiFi and power indicators, etc.)

Please remind me if there is a successful installation for Bookworm that doesn’t depend on virtual environments.

  • How to install?
  • How to test to see if everything is working?
  • How to make it do the things I want it to do?
    • My remote camera robot project and be able to drive the robot around.
    • Perhaps other development projects like my display experiments.[1]
    • Maybe, maybe, maybe, (am I a glutton for punishment, or what?!!), port some of the GPG apps over?

What do you suggest?

====================

P.S.

  • Can I assume that the steps listed in the document. . .
    https://github.com/slowrunner/GoPi5Go/blob/main/config/SETUP.md
    . . .are canonical for setting up a working GPG robot using Bookworm on a Pi-5?

  • Is there anything else I need to know before I do that?  (Aside from not "curl"ing down the MR updates via their old install script, right?)

  • Will Charline stop, turn towards me, rip off the eyelashes and insist on a Minions avatar mounted on top?  (And insist on being called something like “Dave”? :wink:)

---- OR ----

  • Should I try these instructions on the existing Pi-4 currently on Charline and, (after that’s working), try a Pi-5?
     

P.P.S.

I am still interested in knowing how to actually verify that things work.

====================

Why not?

IMHO a “Bookworm” install is a “Bookworm” install, right?  Why should a Pi-5 Bookworm install be different than a Pi-4 Bookworm install?  Or is that specific to a ROS install but not a generic one?

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

  1. Perhaps I should continue the experimental stuff in the current GPGOS, or should I “bite the bullet” and dive in with both feet?
2 Likes

Update ATM: 6mm stone (#36), in hospital, I’ll get back to you this weekend probably.

2 Likes

Good luck!

Keep us in the loop with your progress!!

2 Likes

Yikes. All the best - get well soon.
/K

2 Likes

For a Pi5 / PiOS Bookworm / GoPiGo3:

1) Install PiOS Bookworm 64-bit Desktop with user “pi”

2) Use my GoPiGo3 Install Scripts

cd ~
git clone https://github.com/slowrunner/GoPi5Go.git
cd GoPi5Go
./get_dexter_software.sh

Note - that script does the setup of the GoPiGo3 Python API

  • “modified for Bookworm and Pi5” GoPiGo3 Python API
    • no software I2C,
    • no pigpiod
    • Changed files in /home/pi/Dexter/xxx have original saved with extension .orig
  • on Raspberry Pi5 PiOS Bookworm 64-bit,
  • assumes cloned the GoPi5Go repo to /home/pi
  • No Virtual Env needed
  • Does not install GoPiGo3 desktop apps (I don’t believe they will work on PiOS Bookworm)

** === Install GoPi5Go Power Management Service

./install_gp5g_power_service.sh

3) Reboot and confirm steady green power LED

4) Test installation

cd ~
wget https://github.com/slowrunner/bookworm_test/raw/main/test/test_GoPiGo3.sh
chmod +x test_GoPiGo3.sh
./test_GoPiGo3.sh

Can instead execute:

$ ~/GoPi5Go/systests/gpg3_api_test/test_GoPiGo3.sh

** [Optional] === Drive GoPiGo3 from keyboard test ==== **

cd /home/pi/GoPi5Go/systests/drive_gpg
python3 drive_gopigo3_keyboard.py
python3 gpg3_drive_keyboard.py

5) [Optional] Remove /home/pi/GoPi5Go/ repository

cd /home/pi
rm -rf GoPi5Go

6) Explore all your prior software on Pi5 and PiOS Bookworm

  • Keep in mind: GPIO on Pi5 changed
2 Likes

Glad to see you’re back. Hope all is going well.
/K

2 Likes

Is there a reason that this is desirable?  (Aside from saving space?)

And double from me!

2 Likes

Not yet, but out of hospital confinement.

2 Likes

Some folks like to clean their closets, some are ok with the door closed.

2 Likes

Is there any reason to save it?

2 Likes

If you decide you want to understand how the GoPiGo3 API got installed, keep it. Perhaps remove ros2ws/ and systests/ but they won’t hurt anything there in the closet

2 Likes