Closed slowrunner closed 2 years ago
I removed pip2 (well I renamed it as pip for now although that will lead to issues on GoPiGo OS. I have to revisit this)
Thanks @CleoQc but I still got some (different) errors installing, so I found a way that works. I think you should revert the change you did for me.
BTW - I was pulling my hair out trying to figure out why I was updating and not seeing the _check_serial_list method. Turns out the install_on_ubuntu branch didn't have the latest gopigo3.py file. I switched to the master branch (and manually brought the pkl list down) and ROSbot in ROS2 is now "ticking along 16 times better"!
For anyone that might need to UPDATE GoPiGo3, DI_Sensors, and R4R_Tools(gets I2C_mutex) on Ubuntu 20.04.2:
=== UPDATE THAT WORKED
(!!! log in as pi !!!)
- BACKUP ~/Dexter
cp -r ~/Dexter ~/Dexter.old
rm -rf ~/Dexter
- Get Dexter/GoPiGo3 (from master)
$ sudo git clone http://www.github.com/DexterInd/GoPiGo3.git /home/pi/Dexter/GoPiGo3
- Get Dexter/DI_Sensors
$ sudo git clone https://github.com/DexterInd/DI_Sensors.git /home/pi/Dexter/DI_Sensors
- Setup RFR_Tools (for I2C_mutex)
$ sudo git clone https://github.com/DexterInd/RFR_Tools.git /home/pi/Dexter/lib/Dexter/RFR_Tools
$ cd /home/pi/Dexter/lib/Dexter//RFR_Tools/miscellaneous/
$ sudo python3 setup.py install
- SETUP GoPiGo3 Python3 egg
$ cd /home/pi/Dexter/GoPiGo3/Software/Python
$ sudo python3 setup.py install
...
Installed /usr/local/lib/python3.8/dist-packages/gopigo3-1.3.0-py3.8.egg
- Install DI_Sensors egg
$ cd /home/pi/Dexter/DI_Sensors/Python
$ sudo python3 setup.py install
- Get serial number file
$ wget -O .list_of_serial_numbers.pkl https://raw.githubusercontent.com/DexterInd/GoPiGo3/master/Install/list_of_serial_numbers.pkl
- Check your python is using the installed package
$ python3
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gopigo3
>>> print(gopigo3.__file__)
/usr/local/lib/python3.8/dist-packages/gopigo3-1.3.0-py3.8.egg/gopigo3.py
- Check what methods are in GoPiGo3 class:
$ python3
>>> import gopigo3
>>> for f in dir(gopigo3.GoPiGo3):
... print(f)
...
look for
_check_serial_number_for_16_ticks
- [OPTIONAL - Create default ~/Dexter/gpg3_config.json
>>> gpg3=gopigo3.GoPiGo3()
(ctrl-D to exit)
more ~/Dexter/gpg3_config.json
- [MY OPTION] - copy gpg_config.json
cp ~/rosbot-on-gopigo3/configs/tilde-Dexter.gpg3_config.json ~/Dexter/gpg3_config.json
My ROS2 GoPiGo3 is running well, but needs the latest gopigo3.py with the encoder ticks handling, so I tried: https://github.com/DexterInd/GoPiGo3/tree/master/Install#subsequent-updates
but fails with (full console log below):
Executable "pip2" couldn't be found. Error occurred with RFR_Tools installation.
I understand my case is unusual - sorry to be a bother.
DETAILS OF MY SYSTEM
OS: Ubuntu 20.04.2 LTS 64-bit Server Kernal: Linux ROSbot 5.4.0-1036-raspi #39-Ubuntu SMP PREEMPT Wed May 12 17:37:51 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux Python3: Python 3.8.10 Python2: Python 2.7.18 - "python2 --version" PIP/PIP3:
NO PIP2:
GoPiGo3: (16-tick model)
Tried with bypass rfrtools, and then full update minus gui:
FAILED: Update Python package (only)
FAILED: UPDATE w/o GUI
HOW RFR_TOOLS WAS ORIGINALLY INSTALLED (May 31,2021)
HOW GoPiGo3 and DI_Sensors WERE ORIGINALLY INSTALLED