My flavor of Bolt includes FDM actuators printed in PETG, machined pulleys I sourced myself, electronic hardware I sourced myself, in addition to the DIY approach to motor shaft assemblies. As such, I have been keen to test ODRI Bolt masterboard, microdriver, and actuator before assembling the complete Bolt to ensure that my manufacturing skills are up to par. This post documents the first test and will get into some specifics regarding compiling the scripts I had to run, as I found compiling and using the SDK to be more time-consuming than I expected. I hope this saves other novices like me some time while building their own Bolt.
Progress to date
- Installed Docker locally and run the setup script in a fresh Ubuntu 20.04 container, as documented here
- I have prepared and flashed the Masterboard V2, as documented here
- I have prepared and flashed a microcontroller (uDriver 2), as documented here
- Assembled one actuator, as documented (to be posted)
Now with everything in place, I downloaded and compiled the ODRI Control Interface to run and test my actuator by following these steps:
Compile the SDK
Download the SDK using Treep, which was installed locally, but first, unlock SSH keys.
pip install treep
Setup an SSH key to clone the project locally, following these instructions:
ssh-keygen -t ed25519 -C "your_email@example.com" #create new ssh key with email lable
press enter to save to default location /home/<your user>
enter passphrase
eval "$(ssh-agent -s)" #start agent
ssh-add ~/.ssh/id_ed25519 #add private key
Add the key to your Github account.
Clone packages to a new directory as called for in the instructions.
mkdir -p ~/devel
cd ~/devel
git clone git@github.com:machines-in-motion/treep_machines_in_motion.git
treep --clone master-board
treep --clone odri_control_interface
git clone git@github.com:machines-in-motion/treep_machines_in_motion.git
Start a new container based on the ubuntu20.04:all-code image that I created as documented in my development machine post, making sure to pass the host network through to the container.
docker run -it --net=host --privileged --name=bolt -v ~/devel/:/local_share ubuntu20.04:all-code /bin/bash
In the container I entered the shared development directory and compiled the SDKs:
cd local_share
mkdir workspace
cd workspace
export CMAKE_PREFIX_PATH=/opt/openrobots #export open robot path
colcon build
Run the customer demo script
I then took the solo demo and YAML and modified them for a single actuator, I also added a routine to allow me to input a desired position through key commands. I saved these files in the demo folder through VS Code which I had running locally (devel/workspace/src/odri_control_interface/demos/):
- config_singleactuator.yaml (update the interface by running ifconfig in terminal and replace line 2 bold text of the YAML to your interface “interface: enp0s31f6“)
- demo_singleactuator.py
Supply power to the system:
Then I ran the script in the container’s interactive shell:
python demo_singleactuator.py
It worked! I was able to run ODRI Bolt masterboard, microdriver, and actuator test by seting a position and return to the position. To do so, I simply entered small position changes of 0.5 and pressed enter. The video below shows the results, fast forward to about 60 seconds in.