Open-Source Leg v1.0 & v2.0
The schematic below outlines how the Open-Source Leg is controlled. LiPo batteries are used to power the motors while a microcomputer communicates executables to the actuators, and separate joint and motor encoders enable low-level closed feedback loops to increase the accuracy of joint angles. The following is a step-by-step guide on how to utilize these features and get the OSL up and running.
Building your own customized Raspbian OS
We’ve developed a CI tool to build an up-to-date Raspbian OS that can be used headless to control the OSL or any robotic system in general. The tool reconfigures an official Raspbian distro to include custom packages for robotics and automation, wireless connectivity to a known and configurable WiFi network, and finally, it will create a fallback access point when the known wireless networks are not in range (fixed IP: 10.0.0.200). This enables usage of the same process and hardware when not in the known Wifi network range (e.g. demos and conferences).
All the libraries that are necessary for communication, drivers for common sensors and ICs, and the API for working with Dephy actuators are installed by default. Additional packages can also be added to the configuration file. Instructions on how to build, modify, and download your own Raspbian OS can be found here.
After downloading the image file, you can use the official Raspberry Pi Imager or Etcher or any similar software to flash the image onto a microSD card.
Connecting to your Raspberry Pi
Once you’ve set up the microSD card, insert it into the SD card slot of the Raspberry Pi and power it via its USB-C connection. It might take 5-7mins for the Raspberry Pi to complete its initial boot cycle upon which it will mail you its IP address.
With the Raspberry Pi’s IP address, you can SSH via your terminal or use VSCode’s Remote Explorer extension to connect to the Raspberry Pi and write/run code.
Running Dephy Actuator examples
The following examples and demos contain reading data from actuators and commanding actuators with different control laws. You can find these demo scripts in the directory “~/Actuator-Package/Python/flexsea/”.
Helpful links: Dephy’s software guide, Actuator-Package repository, Flexsea API
In addition to python scripts, Dephy also has a GUI tool called “The Plan GUI“, which is a cross-platform graphical dashboard written in C++ with the Qt framework. It allows data visualization, data logging, controller tuning, and much more.
We’re currently developing an open-source python library for numerical computation, data acquisition, and control of the open-source leg. The package is in its testing phase and if you like to try it out, you can find the PyPI repository here or install it via python-pip:
If you find a bug, kindly create an issue on the Github repository. Any contributions to the python library are welcome.