I am currently working on a project with the Go1. This project is to control the Go1 using a CANbus joystick.
I have managed to get it working using udp and connecting to its UDP network with my laptop (Ubuntu). To read the CAN-signals i am using a USB to CAN converter on the physical side and Socketcan and PythonCan on the software side. I can control the Go1 when i execute my own code ( either Python or C++) using the LeggedSDK.
The last steps for this project is to put the Can receiver and converter on the back of the robot, connect it to the Raspberry Pi through USB and execute the code on startup.
These last steps do scare me because, though I have managed until now, I am not too knowledgeable on Linux and .sh files, and I fear that I might change something that will make the Go1 stop working.
Has anyone had experience changing the Go1 startup code? Is it possible to add my Python (or C++) code to startup and have it execute on startup?
Could I install Can-Utils on the Go1 and have it read the CAN signals coming from the converter to the Raspberry usb port? Are there backups to the Raspberry and the Nano’s somewhere so that if something goes wrong, I can revert to the previous version?
Is it possible to add my Python (or C++) code to startup and have it execute on startup?
Yes, you can use crontab to execute your code or script.
Could I install Can-Utils on the Go1 and have it read the CAN signals coming from the converter to the Raspberry usb port?
We have not tested it so we cannot confirm the answer. The Pi is connected directly to the MCU of the GO1, and it is safer to perform this on the Nvidia if you do not have an external PC mounted on the GO1.
Are there backups to the Raspberry and the Nano’s somewhere so that if something goes wrong, I can revert to the previous version?
I’m aware there is a Go1 pi image available and there should be of the Nano as well but we do not have a copy of the nano image (also some Go1 versions have different firmware so the same image may not work for your Go1). Regardless, it is a risky process and we advise against it unless you are completely aware of what is going on.
Go1 itself has a lot of scripts running on startup, especially for the pi, so if you do put it there make sure there is a delay so that it does not disrupt the Unitree’s scripts that are running. Furthermore, I am not sure if the Pi is using the USB port or not for CAN signals already. If it is not, I would assume it would be safe to install CAN utils and run your script.
The safest thing to do is to create a backup of the entire pi image (which is risky if not done properly) and test out your code.