Documentation for update_gopigo3.sh and related scripts?

This topic was prompted by @cyclicalobsessive’s reply to topic #9471Does GoPiGo3 still really need Python 2?”, specifically:

options include --bypass-GUI-installation

This then prompted two questions:

  • Where can I find documentation on the command line switches for update_gopigo3.sh and update_sensors.sh?

  • What switches should I use for my specific case?

Regarding Documentation

From inspecting the scripts, I found the following:

  • –no-dependencies

  • –no-update-aptget

  • –bypass-rfrtools

  • –bypass-python-rfrtools

  • –bypass-gui-installation

  • –user-local

  • –env-local

  • –system-wide

But what do they do? Perhaps --bypass-gui-installation is obvious (is that all it does?), but what do the others do?

For example:

  • where can I find a list of the dependencies that -no-dependencies skips?

  • what is the use case for applying --no-update-aptget ?

  • where can I find a list of the rfrtools and the python-rfrtools and why would one want to bypass them?

  • what are --user-local, --env-local and --system-wide used for?

Part of my problem is that I am not a Linux maven - even reading these scripts to understand what they may be doing is difficult.

Any documentation that can be provided would be appreciated!

Regarding My Specific Case

I have the Ubuntu 20.04 server installed on my Raspi and I want to get just the GoPiGo3 drivers and supporting python code installed. I tried following the “Quick Install” instructions at GitHub - DexterInd/GoPiGo3: The GoPiGo3 is a Raspberry Pi Robot!

curl -kL dexterindustries.com/update_gopigo3 | bash

That was the wrong thing to do because I believe I got the entire GoPiGo3 OS installed. Certainly I got a desktop that I don’t want.

I next noticed the “Virtual Environment Installation” section. However, I don’t know what that is (@cleoqc please consider adding some explanatory statement on what is meant by this term). Still, I noticed the switch “–bypass-gui-installation” (and remembered the comment above) so --bypass-gui-installation seems called for if “no desktop” is all it does. As indicated, I don’t know what “–user-local” means/does. There is also “-s --” after “bash” and I also don’t know enough about linux to understand what that does.

If someone can explain / advise on what switches to use to just the GoPiGo3 drivers and supporting python code installed, that would be great!

3 Likes

Understatement of the day! But then again - these scripts were documented for the DexterIndustries/ModularRobotics developers (and anyone determined to venture into understanding enough to know how to use and extend the scripts to their one-off purposes with no guarantee of official support for their “to infinity and beyond” project.)

Everything is located in the DexterIndustries GitHub repositories (GoPiGo3/install/Readme, and DI_Sensors/install/Readme, and RFR_Tools inline comments in the scripts

What does the book instruct?
Your specific case is which specific version of Ubuntu?
What was the approximate date of the scripts the book instructed?

It is probable the scripts have been updated since the book was published and perhaps you will need to git clone a version of the scripts from that time period. I think that is possible but I don’t know how exactly it is done, and I don’t actually think even that would be all that is needed since the scripts clone stuff down themselves.

I have built several custom install GoPiGo3 for Ubuntu x.y scripts, but 18.04 is not in that list. If you truly get stuck installing the GoPiGo3 code, point me to the image you started with, and I will fire it up and mod my install for Ubuntu script to get you past this point.

Virtual Environments are a Python developer’s personal playground environment that does not ruin the “system/came with the OS” set of Python packages. Nearly every “true Python developer” wants virtual environments and seems to make one for nearly every project. Those of us that did not get the true Python developer training, willing to do system backups to restore back to before we broke the system Python do nasty things like doing everything without virtual environments. In Bookworm’s Python they actually made a new pip option called “–break-system-packages” that is needed to install python packages not in a virtual environment. (Virtual Environments also allow using different Python interpreter versions than the system default version, should you ever get to that point of needing to run something on a particular old version of Python). So the GoPiGo3 install scripts support installing all of the GoPiGo3 code in a virtual environment so it is available to code in the virtual environment.
Saw this today from the Python governing folk:

I’m with you there, but Google claims:

  • -- End of options. Anything further on the command line is an argument, not an option.
  • -s If this option is present, or if no arguments remain after option processing, then commands are read from the standard input.

The update_gopigo3.sh file is a bash script brought down with curl and piped to the bash command interpreter.

2 Likes

Thanks for letting me know!

3 Likes

I just remembered there was a special release called “install on ubuntu”

I don’t remember how to install it. Perhaps a forum search with that term “install_on_ubuntu” will turn up. I remember I tried it and it didn’t work for the version of Ubuntu I was targeting, perhaps it wanted 18.04…

It says 6 commits ahead of and 82 commits behind the most current release - that doesn’t sound good but if your bot is a 6 tick encoders, it won’t matter. If your bot serial number is in this list - you will need the 16-tick encoder commits. (Did you ever run Read_Info.py when you had GoPiGo OS up? That’s how you find your serial number before you manage to get the GoPiGo3 software installed on your favorite OS…)

2 Likes

I cheat.

My preference is to do something the “standard” way, (using the pre-built GoPiGo images), because that way everything “just works” and I can concentrate on my projects instead of fighting the system itself.

However, if I remember correctly, you’re trying to run ROS, right?

Maybe I am not remembering correctly, but didn’t @cyclicalobsessive create some pre-built ROS installs? If he did, maybe you can try one?

Even if he didn’t, I believe he did create some automatic scripts that would take an (Ubuntu?) install and automagically set it up to run ROS.

Since I am a total coward when it comes to ROS, I haven’t tried them. (Yet)

@cyclicalobsessive has a good GitHub repo with a lot of his work. You should check it out/clone it.

If you’re REALLY serious about this stuff, you can clone both the Dexter Industries AND @cyclicalobsessive’s repos.

As you gain experience and develop useful updates, you can submit pull requests and share your work with everyone else too.

P.S.

I prefer to start with a “standard” build - even if I plan to do something else - because it gives me something to start with that is “guaranteed” to work, and it allows me to verify that everything is working as expected.

This is because I have spent so much time in the past, on various projects, where I didn’t verify a baseline configuration first - and the result was always confusion. Either I didn’t understand some fundamental aspect or there was something wrong that I didn’t realize was happening.

Please, do continue your research into ROS, but you may wish to consider keeping a “standard” GoPiGo OS build in your library as well.

3 Likes

I agree with you @jimrh but you also do remember correctly that I came to GoPiGo3 because of handsonros and I arrived at handsonros because I wanted to learn ROS1 with a “real” robot, not in “theory” or in “simulation”.

I have already passed through the Lego Robotics (aka Mindstorms) phase which, IMO, is actually very simiar to doing GoPiGo3 with Bloxter (i.e. what I think you are doing). I have two complete sets of Lego Robotics and a regulation FLL table. I mentored an FLL team awhile back and then moved on. Doing Lego Robotics programming has changed over the years. As you may know, it used to involve a derivative of National Instruments LabView but now they use Scratch which is very similar to Bloxter. I also built and programmed a Nybble which uses Arduino “brains”. I figured it was time to “level-up” with ROS. So, if I want to learn ROS1, it seemed to me I could just follow the excellent directions in handsonros. It hasn’t quite worked out that however…

2 Likes

Well, my eyes are opened there! Until you pointed this out and I did a bit of googling, I had no idea how deeply entrenched python is in many Linux distros! So much so that you can break your Linux environment by “upgrading” Python.

The Linux world is even crazier than I imagined! I am thus more glad than every that, professionally, I develop code in Windows and not in Linux. If I had to write code for Linux as a day job, I think I would have found another career by now! Thanks again for the great clarification @cyclicalobsessive!

3 Likes

You sound like you have a lot more robotics experience than at least some of us.

I, personally, got into the GoPiGo, (and robotics in general), because I decided that robotics was the next hardware/software challenge I wanted to take.

The GoPiGo sold me because:

  • It seemed like a “real” robot and not some half-baked toy.  Something I could “grow into” instead of outgrow.

  • It wasn’t obscenely expensive.

  • The “googly eyes” had me in stitches!

The people here are also second to none, have been tremendously helpful, and I owe them a debt of gratitude for all their help, guidance, and friendship.

2 Likes

handsonros specifies the same command as in the DexterInd Github:

As you point out, these scripts now vs. when the book was created may differ and the current version is always used when you issue the above curl command.

3 Likes

have you tried the read_info.py example?

you sure you don’t want to use my 20.04 script to get GoPiGo3 working? let me know when you’ve exhausted your patience, not pushing you- just there for you in my way.

3 Likes

@cyclicalobsessive I’ll give it a look - where can I find the 20.04 script again?

3 Likes

Here are the instructions for

  • creating a pi user, needed groups and membership,
  • installing the GoPiGo3, DI_Sensors, RFR_tools, and all dependencies
  • testing the install

I don’t know if you have the pi user, password, and all the groups the pi user needs to be in - the script you ran may have set the user and groups up already, in which case you can skip running the script that sets up the pi user.

If you want to understand the pi user and group permissions, you could test your system by checking that pi user exists (su pi or try to login as pi:robots1234), that the groups exist (groups), that pi is a member of the listed groups (groups pi, and that the permissions on the device files are per the script (sudo ls -al /xyz)

Also is sudo group set up for “no password” by cat /etc/sudoers and look for
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
or type sudo ls and see if it asks you for a password

The script that installs the GoPiGo3 specific software on Ubuntu 20.04 is here

If you want to deeply understand the script instead of just running it, you can open it in a window and copy each line one by one into the terminal.

If you are on discord, I could text/or talk as you do it - figure a time convenient for both.

3 Likes

@cyclicalobsessive just noticed that your earlier reply indicated Ubuntu 20.04 (what I am using) but the script indicates Ubuntu 22.04. Have you tried the script with Ubuntu 20.04? Also, the md file is named “Obsolete_Setup_1_Ubuntu22.04_LTS_Server.md”. Can I assume it still is relevant but just obsolete solely because you have an image that is the “result” of running this script?

2 Likes

I originally built the script on 20.04 so I am pretty sure it still works on 20.04.

My first ROS 2 project was Galactic Turtle which was on 20.04 - then when Humble came out I moved everything to 22.04 and Humble (which broke my GoPiGo3 node…)

Yes - the “Obsolete” is because I want folks to use the totally built image for which I built the extensive “Intro to using ROS 2 on the GoPiGo3” documentation stream.

2 Likes