Pi OS Bookworm is officially released!

Finally success with 64-bit PiOS Bookworm Desktop - with a different sdCard/formatted MS-DOS(FAT) and erased before imaging.

Need to test on my GoPiGo3 later - (Setup script succeeded. )

2 Likes

GoPiGo3 passed tests - I’m done.

It Works … But I Cheated

DISCLAIMER: This is my personal test - no connection to ModRobotics

GoPiGo3 “Dave” (Pi4) works on 64-bit PiOS Desktop (Bookworm)

  • Power Switch works
  • Hardware I2C only (This is a major cheat!)
  • Motors, Encoders work
  • DI Distance Sensor works, only one allowed (I only need one.)
  • Servos work
  • Ultrasonic Ranger works
  • DI IMU not supported (needs software I2C)
  • Did not test GoPiGo3 desktop tools (did not configure remote desktop)
2 Likes

Some observations of this relative to GoPiGo3 on Bookworm with a desktop on a 2GB Pi4:

  • base OS processor load (with pigpio daemon and gpg_power service alive) is very low
  • base OS physical memory usage (with pigpio/gpg_power) is about 1GB
  • base OS effective memory usage (with…) is about 340M leaving 1.5GB “available”
  • pigpiod at idle uses roughly 7% of one core or 2% of the Pi4 processor
  • GoPiGo3 LEDs Python example uses 2% of one core or 0.5% of the Pi4 processor
  • GoPiGo3 Servo Python example uses 10% of one core or 2.5% of the Pi4 processor
  • Grove Ultrasonic Ranger Python example uses 1% of one core or 0.2% of Pi4 processor
  • GoPiGo3 Distance Sensor Python example uses 28% of one core or 7% of the Pi4 !!!
    (Single reading is not the best mode, but is the easiest to use with the sensor.)
  • Drive 1 meter test briefly used 30% of one core/8% of Pi4 to command GoPiGo3, then practically nothing waiting for the GoPiGo3 to announce drive complete.
  • Python3 wheelBaseRotateTest briefly uses 1% of one core of Pi4 to command a 360 deg rotation then nothing waiting for the GoPiGo3 to announce rotation complete
  • Reading the MPU9250 IMU at 10Hz in Python3 takes 1% of one core of Pi4
pi@PIOSB64D:~ $ uptime
 10:23:02 up 12:16,  1 user,  load average: 0.02, 0.05, 0.01
pi@PIOSB64D:~ $ free
               total        used        free      shared  buff/cache   available
Mem:         1892432      351548      996716       14872      628528     1540884
Swap:         102396           0      102396

2 Likes

Some further testing of GoPiGo3 on Bookworm in C++:

Working:

  • read_info.cpp
  • leds.cpp
  • motors.cpp
  • drive.cpp
  • ultrasonic.cpp (mod of sensors.cpp for my Grove Ultrasonic Ranger in AD2) UPDATE: was my error

Not working:

  • i2c.cpp - Error 4 - I2C bus error
2 Likes

Working:

  • servos.cpp
  • ultrasonic.cpp !! programmer error - works just fine

Created a servos test program to match the Python Servo.py. The Python3 Servo.py takes 10% of one core, while the C++ servos.cpp takes 7% of one core making it 30% faster in this case.

3 Likes

Oh yes - ROS 2 Humble on PiOS Bookworm

Oh wow - the world of ROS is containerized. I’ve seen references to Docker and running ROS/ROS 2 in Docker but I never needed to grok what a beautiful thing this is!

  1. Installed Docker on PiOS Bookworm
  2. (Tried the pre-built ROS 2 Humble Desktop dockerfile - they didn’t build it for Pi4)
    So built a ROS 2 Humble Desktop / Jammy Jellyfish 22.04 dockerfile
  3. Run the dockerfile
pi@PIOSB64D:~/bookworm_test/ROS2_Humble $ sudo docker run -it r2hd

root@f28044c95af4:/# ros2 run demo_nodes_cpp listener &
ros2 run demo_nodes_cpp talker
[1] 47
[INFO] [1697771577.848362187] [talker]: Publishing: 'Hello World: 1'
[INFO] [1697771577.849841132] [listener]: I heard: [Hello World: 1]
[INFO] [1697771578.848235875] [talker]: Publishing: 'Hello World: 2'
[INFO] [1697771578.849053124] [listener]: I heard: [Hello World: 2]
*ctrl-c
root@e11358278468:/# *ctrl-d
exit
pi@PIOSB64D:~/bookworm_test/ROS2_Humble $

The scripts are in my bookworm_test/ROS2_Humble github repo

-rw-r--r--  1 pi pi  709 Oct 19 21:25 1_setup_docker_apt_repo.sh
-rw-r--r--  1 pi pi  146 Oct 19 21:26 2_install_docker_pkgs.sh
-rw-r--r--  1 pi pi   65 Oct 19 21:35 3_clone_ros_docker_images.sh
-rw-r--r--  1 pi pi  267 Oct 19 22:58 4_build_humble_desktop_container.sh
-rw-r--r--  1 pi pi  131 Oct 19 23:11 5_run_ROS2_Humble_Docker_image.sh

Because ROS / ROS 2 allow distributed nodes - I can run the GoPiGo3 node on the bot, and all the processing of the sensor data on the Pi5 (when the hardware arrives). The first dual processor GoPiGo3 may be possible with ROS/ROS2 - (the battery may not be up to powering them).

Who needs Ubuntu anymore? Not me!

Well maybe - we haven’t run the performance tests …

3 Likes

@cleoqc

One of the things I would like to do and/or see is a Bookworm based GPGOS.

Eventually I want to build a GoPiGo3 enabled image and try to run some of my stuff on it.

Will Bookworm run on earlier Pi’s?  (Like the 3 or 4?)

2 Likes

That’s a great idea (if the battery can handle it).
Were you going to network them with WiFi? I wonder if the two boards will interfere in some way, reducing bandwidth?

/K

2 Likes

Exactly my thoughts

  • first I get it working with Pi5 on my desk
  • Then someone else figures out the power to mount the Pi5 on top of their bot
  • Lastly someone figures out how to do network over a wire. The TurtleBot4 uses network over a wire with the Create3 base.
2 Likes

Yes in both 32-bit and 64-bit versions (on Pi5 the kernel is 64-bit but the OS can be either):


2 Likes

I was thinking that the Pi-5 might have the chops to run the whole show itself?

WiFi interference won’t be a problem if:

  • The channels are exactly the same.
  • The channels are far enough apart so that there is no overlap at all.

Using the 2.5ghz band as an example, the only three channels that don’t interfere are 1, 6, and 11, and if you want to be absolutely sure you pick 1 and 11.

If the channels are the same, the protocol handles collisions. If they don’t overlap at all, it’s all good too.

The big problem is when a channel partially overlaps another, because WiFi channels aren’t cleanly separated groups of frequencies, and all the channels overlap except channels 01, 06, and 11.  In that case, speed drops dramatically.

2 Likes

Of course - if someone is willing to build one from scratch or break their existing bot down and rebuild with a Pi5. In my case, and at this time, Dave needs too many personalities.

2 Likes

Like for a Pi3B+ running 2.4GHz channel to the home router, and the Pi5 using a 5GH channel to the home router.

2 Likes

The great topics continue @cyclicalobsessive! I have been trying to understand the use cases for containers such as Docker and compare them with VMs. The operation and use cases for VMs are more understandable to me but I don’t grok containers yet. I have seen containers used for ROS but I don’t yet “get” what the advantages are. In your case, what do you believe the container will provide? I gather that the container has Ubuntu/ROS2 inside so it can run on the Raspberry Pi OS and that would certainly be an advantage but are there other advantages? On the flip side, how “contained” is the ROS2 inside the Docker container. Is there anything it cannot do or does it really have full access to the resources of the host OS to get at all of the robotics hardware?

3 Likes

I’m right there with you, exactly the same questions. I have read only the headlines and post titles. I use a virtual machine on my Mac to run an Ubuntu/ROS 2 Desktop for visualization (rViz, rqt_graph, view image topics).

I didn’t even read anything about what a Docker container is - I just followed the ROS installation guide and then had to search Google how to get out / quit the container. That is often the way I do things - do it first, then read enough to understand what I did. I learn by doing, and best by tutorials that I can skip the theory until I know it works. Just show me how, I’ll learn the why later.

2 Likes

. . . . and the 2.5ghz band shares its frequencies with other powerful sources of interference, like microwave ovens!

I had a client once who had a medical practice just below another office that had a microwave right over their heads.

I don’t know how big their microwave was, but every time they fired it up for whatever reason, the client’s network went down!

2 Likes

This reminds me of what originally was called the “VCR” question.

Back in the day (not saying when or even if I personally was there, mind you), one could understand a lot about a person by asking then how they first learned to use a VCR.

If they said they just started pressing buttons to see what happened, you knew they learned “kinesthetically”. If they said they read the manual, you knew they learned “liguistically”. If they asked their kids, you knew they learned “intrapersonally”. And so forth, with combinations possible of course… (My catagorization is based on the “Gardner’s Theory of Multiple Intelligences” BTW but there are other ways to categorize).

I mention this, because [1] these “VCR” type questions keeps coming up, [2] I wanted to explain that I am definitely less kinesthetic and more liguiistic and [3] between the different approaches, maybe we can all figure out the pros and cons of containers!

3 Likes

This is the coolest thing I have read this year!
(Explains why I have reached the 1 year mark five times on the piano, and will never be able to play my flute with feeling. No “music smart”.)

3 Likes

Only advantage is allowing any version of ROS to be installed on nearly any version of PiOS.

Disadvantages I read are

  • configuration nightmare
  • two environments to keep updated
  • backup nightmare
  • complicates access to hardware

It is the ROS equivalent of Python virtual environments - complications I have figured how to avoid so far.

I found only one disadvantage of running Ubuntu 22.04 and ROS (non-containerized) on the Pi3B+/Pi4 - generating the picamera image topic, and smart folks solved that one since I coded my work-around.

3 Likes

Very cursory test does not show any detectable extra load from containerized ROS, and the Docker ROS nodes have full communication to and from ROS on the GoPiGo3 and on my ROS VM running visualization on my Mac

And a major, major PITA is that everytime you restart the container, there is no bash terminal history…

3 Likes