-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f365af7
Showing
101 changed files
with
663,602 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Publish Documentation | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # To push a branch | ||
pages: write # To push to a GitHub Pages site | ||
id-token: write # To update the deployment status | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install latest mdbook | ||
run: | | ||
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') | ||
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" | ||
mkdir mdbook | ||
curl -sSL $url | tar -xz --directory=./mdbook | ||
echo `pwd`/mdbook >> $GITHUB_PATH | ||
- name: Build Book | ||
run: | | ||
# This assumes your book is in the root of your repository. | ||
# Just add a `cd` here if you need to change to another directory. | ||
mdbook build documentation | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v2 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload entire repository | ||
path: 'documentation/book' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea/ | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 DeDiamondPro | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# AQLARP | ||
![](documentation/src/img/AQLARP-render-transparent.png) | ||
|
||
AQLARP stands for **A**ffordable **Q**uadruped **L**earning **A**nd **R**esearch **P**latform. | ||
|
||
AQLARP was created as my final for high school. | ||
|
||
For more information please see the [documentation](https://aqlarp.dediamondpro.dev) | ||
|
||
## AQLARP Walking Demo: | ||
|
||
[![](https://img.youtube.com/vi/xvpN8pladkQ/0.jpg)](https://www.youtube.com/watch?v=xvpN8pladkQ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
book | ||
.obsidian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[book] | ||
authors = ["DeDiamondPro"] | ||
language = "en" | ||
multilingual = false | ||
src = "src" | ||
title = "AQLARP" | ||
|
||
[output.html] | ||
mathjax-support = true | ||
git-repository-url = "https://github.com/DeDiamondPro/AQLARP" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# AQLARP | ||
|
||
[AQLARP](title-page.md) | ||
# Introduction | ||
- [Design Principles](ch01-01-design-principles.md) | ||
- [Coordinate System](ch02-01-coordinate-system.md) | ||
# Building | ||
- [Required Materials](ch03-01-required-materials.md) | ||
- [Raspberry Pi Setup](ch04-01-raspberry-pi-setup.md) | ||
- [Building](ch05-00-building.md) | ||
- [Building The Legs](ch05-01-building-leg.md) | ||
- [Building The Main Body](ch05-02-building-body.md) | ||
- [Installing Software](ch06-01-installing-software.md) | ||
# API | ||
- [ROS2 Topics](ch06-01-ros2-topics.md) | ||
# Concepts explained | ||
|
||
- [Inverse Kinematics](ch08-00-inverse-kinematics.md) | ||
- [Inverse Kinematics Of The Legs](ch08-01-inverse-kinematics-legs.md) | ||
- [Inverse Kinematics Of The Body](ch08-02-inverse-kinematics-body.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Design Principles | ||
AQLARP stands for **A**ffordable **Q**uadruped **L**earning **A**nd **R**esearch **P**latform. These are the principles AQLARP is based on. | ||
## Platform | ||
This is the most important principle for AQLARP. AQLARP should be a solid, extendable platform, which you can use as starting point to build on and create your own amazing projects. | ||
Here are some of the design decisions to make AQLARP a platform: | ||
1. Extendibility: the top, front and back are easily replaceable with your own components that suit the needs of what you are trying to create. | ||
2. Interoperability: AQLARP makes use of [ROS2](https://ros.org) so you can easily write your own code, in any programming language you chose, that can effortlessly interact with other parts of AQLARP's codebase. | ||
3. Well Documented: AQLARP has a good documentation to learn about AQLARP and how to extend it. Additionally AQLARP's code has clear comments to help you understand it. | ||
## Affordable | ||
AQLARP is relatively affordable. The parts chosen are a balance of price and how suitable they are to build a platform. Affordability does not come before making AQLARP a stable and extendable platform. | ||
## Learning | ||
AQLARP can be used as a learning tool. To aid in this AQLARP is well documented and extendable. Additionally AQLARP uses [ROS2](https://ros.org) which is commonly used in the robotics industry and is a valuable skill to learn. | ||
## Research | ||
AQLARP is extendable and it is easy to add extra sensors to measure the influence of a variety of factors. Additionally AQLARP is open source so you can change anything you want to aid in your research. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Defining AQLARP's coordinate system | ||
Knowing AQLARP's coordinate system is import so you know what setting each axis will do. | ||
Here are the definitions for it: | ||
- X-axis: | ||
- Increasing the value will make AQLARP move to the front | ||
- Decreasing the value will make AQLARP move to the back | ||
- Y-axis: | ||
- Increasing the value will make AQLARP go up | ||
- Decreasing the value will make AQLARP go down | ||
- Z-axis: | ||
- Increasing the value will make AQLARP go to the right | ||
- Decreasing the value will make AQLARP go to the left | ||
|
||
The origin of these axis is where the leg is connected to the top joint, this is a per leg coordinate system. | ||
|
||
Below are some images to clarify what axis does what. | ||
![](img/Coordinate-System-XY.png)![](img/Coordinate-System-XZ.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Required Materials | ||
|
||
AQLARP's bill of materials is available [here](https://docs.google.com/spreadsheets/d/e/2PACX-1vRbQA3j36Z8nV3XLGrAlESTOF5qkMQ1r0tQvmaywV8VTpTOwY9WorlNrphstLwu9Ot1-xkpC_Ci4Gyd/pubhtml). ([download](https://docs.google.com/spreadsheets/d/e/2PACX-1vRbQA3j36Z8nV3XLGrAlESTOF5qkMQ1r0tQvmaywV8VTpTOwY9WorlNrphstLwu9Ot1-xkpC_Ci4Gyd/pub?output=xlsx)) | ||
|
||
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRbQA3j36Z8nV3XLGrAlESTOF5qkMQ1r0tQvmaywV8VTpTOwY9WorlNrphstLwu9Ot1-xkpC_Ci4Gyd/pubhtml?widget=true&headers=false", width = 100% height = 560px></iframe> | ||
|
||
I would encourage you to look around and see if you can find parts for cheaper since these prices will change with time and depending on your area they may also vary. | ||
|
||
Additionally you will have to have the following tools: | ||
- Screw driver for the type of screws you chose | ||
- Sottering iron | ||
- 3D printer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Raspberry Pi setup | ||
During the build process, it will be required to set the servos to 90 degrees at some points, to do this the raspberry pi should be set up and connected to the servo controller, that is what we will be doing here. | ||
|
||
## Installing Ubuntu | ||
Firstly, install the [Raspberry Pi Imager](https://www.raspberrypi.com/software/) from their website, this is what we will be using to flash the Ubuntu image to a micro SD card. | ||
|
||
After installing the imager open it up and select the appropriate Raspberry Pi device, if you are using the same parts this will be a Raspberry Pi 4. Then Click `Choose OS` and scroll down to `Other general-purpose OS` and click it. Then select Ubuntu and choose any 64-bit version. I would recommend using the latest LTS version (22.04.4 LTS at the time of writing). If you plan on ever connecting a display chose the desktop version, otherwise the server version will be fine. Make sure to select a 64-bit version. | ||
|
||
Now you have to specify some settings, to do this press `Ctrl + Shift + X`. Check the Checkbox `Set username and password`. For username you can set what you want, but the rest of this documentation will be based in the username `AQLARP`. Then choose a password you can remember easily as we will need this later. Next check the checkbox `Configure wireless LAN`, set `SSID` to the name of your WiFi network, and enter the password in the password field. | ||
![](img/raspberry-pi-imager-settings.png) | ||
|
||
Then click save, select your micro SD card with the storage button and click next to start flashing the image to the SD card. After this is done put the micro SD card in the raspberry pi and power it using the USB C port. | ||
|
||
## Connecting to the raspberry pi | ||
Next you will have to find the IP of your raspberry pi, if you have access to the router you can log in to it's dashboard and find the IP as such. If you don't have access to the router finding the IP will be significantly harder, you will have to use a tool like nmap to find the IP. Make sure you can access other devices (like the Raspberry Pi) on your network, some school or work networks might block this. If you cannot access other devices on your network I would recommend using a [cheap travel router](https://www.amazon.nl/GL-iNet-GL-MT300N-V2-Reiserouter-Repeater-Extender/dp/B073TSK26W). As an added bonus of this you will be able to easily view the Raspberry Pi's IP in it the router's dashboard. | ||
|
||
Once you have the IP you can connect using ssh. To do this open a terminal (search `cmd` in Windows and open it) then execute the following command: | ||
```console | ||
$ ssh AQLARP@<Raspberry Pi Ip> | ||
``` | ||
If you chose a different username than AQLARP, but it in the command instead of AQLARP. It will then ask you to input the password you chose when setting it up. If you can't immediately connect to the Raspberry Pi, be patient since it can take a few minutes for the Raspberry Pi to bootup. | ||
|
||
## Clone the Github Repo | ||
Next you will have to clone the GitHub repo, since this contains all of AQLARP's code. To do this run: | ||
```console | ||
$ git clone https://github.com/DeDiamondPro/AQLARP.git | ||
``` | ||
|
||
## Install dependencies | ||
To use the scripts, some basic dependencies have to be installed. To do this run the following commands | ||
```console | ||
$ sudo apt update | ||
$ supt apt install -y python3 python3-pip i2c-tools | ||
$ python3 -m pip install adafruit-circuitpython-servokit rpi.gpio | ||
``` | ||
|
||
## Connecting the servo driver | ||
To connect to the servo driver, you can check the wiring image below. | ||
The loopback from V+ to V+ might not be required if it is attached correctly, but it was required for me. | ||
![](img/PCA_wiring.png) | ||
Connect V+ and GND (the socket version) to a power supply of 5-7V. This can be the battery and a voltage regulator if you wish. | ||
|
||
Now to check if the controller is connected correctly, run the following command. | ||
``` | ||
$ i2cdetect -y 1 | ||
``` | ||
You should see it show up with the address `0x40` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Building | ||
In this chapter we will go over how to build AQLARP | ||
|
||
> **🚨 This documentation might be incomplete or incorrect** | ||
> | ||
> It is advisable to have a basic understanding of the parts of the robot to effectively address encountered issues. If you need help, feel free to open an issue on [AQLARP's GitHub](https://github.com/DeDiamondPro/AQLARP). However there is no guarantee that I will be able to help you. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Building The Legs | ||
In this chapter we will be building the 4 legs. | ||
## Required 3D-printed parts per leg: | ||
- Left legs: | ||
- [Leg-Top-Left](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Leg-Top-Left.stl) | ||
- [Leg-Bottom-Left](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Leg-Bottom-Left.stl) | ||
- [Leg-Joint-Top-Left](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Leg-Joint-Top-Left.stl) | ||
- [Leg-Joint-Bottom-Left](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Leg-Joint-Bottom-Left.stl) | ||
- [Sock](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Sock.stl) (Print out of TPU, this part is to provide grip) | ||
- Right legs: | ||
- [Leg-Top-Right](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Leg-Top-Right.stl) | ||
- [Leg-Bottom-Right](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Leg-Bottom-Right.stl) | ||
- [Leg-Joint-Top-Right](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Leg-Joint-Top-Right.stl) | ||
- [Leg-Joint-Bottom-Right](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Leg-Joint-Bottom-Right.stl) | ||
- [Sock](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Sock.stl) (Print out of TPU, this part is to provide grip) | ||
## Assembly | ||
First, take the top part of the leg and attach the servo in the hole, the gear of the servo should be facing the same way as the hole at the top for the circular servo horn. Then attach the circular servo horn in the top hole using 4 small screws. After doing those 2 steps, it should look something like this. | ||
![](img/Legs-img1.png) | ||
Then attach the `Leg-Joint-Top` and `Leg-Joint-Bottom` part together using an M3 screw and a locknut. Don't overtighten it, it should be able to rotate freely. Then attach it to the bottom leg part, after doing that it should look something like this. | ||
![](img/Legs-img2.png) | ||
Then connect the top and bottom of the leg together using an M4 screw and a locknut, again don't overtighten it since it should be able to rotate freely. After doing that you should have something like this. | ||
![](img/Legs-img3.png) | ||
Then finally you must set the servo to 90 degrees, to do this connect the servo to the servo driver and run the following command on the Raspberry Pi. | ||
```console | ||
$ python3 ~/AQLARP/scripts/set90.py | ||
``` | ||
Then connect the top joint part to the servo, try to make the angle as close to 90° as possible. Then lock them together using an M3 screw. | ||
|
||
And that is a completed leg, the rest of the servos will be added when assembling the body since if you attach them now you won't be able to access some parts that you will need to access later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Building The Main Body | ||
In this chapter we will go over building the main body. | ||
## Required 3D-printed parts | ||
- [Main-Body](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/body/Main-Body.stl) | ||
- [Front-Back-Body](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/body/Front-Back-Body.stl) x2 | ||
- [Top-Joint-Left](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/body/Top-Joint-Left.stl) x2 | ||
- [Top-Joint-Right](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/body/Top-Joint-Right.stl) x2 | ||
- [Top-Cover](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/body/Top-Cover.stl) | ||
- [Nut-Tool](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/misc/Nut-Tool.stl) (Needed for assembly, breaks quite easily, you might need multiple) | ||
|
||
## Assembly | ||
First install the 3D-printing inserts into the main body. There are holes for 6 M4 inserts at the top and 14 standoffs with place for M3 inserts in the bottom. To insert an insert carefully place it on the hole and then push it in using a sottering iron, this melts the plastic around it so the insert can slide right in and stay there securely. | ||
|
||
Then install the 4 servos in the corners of the main body, these should be installed with the servo gear at the bottom. The locknuts should be on the inside and the screws at the outside. Unfortunately it is practically impossible to reach the nuts at the bottom when tightening the screws. To address this you can use the nut tool file I provided, load 2 nuts in it and place it where you need it then screw the screws in to the nuts and tighten the servo that way. Be careful not to overtighten it since the nut tool snaps very easily. | ||
|
||
After that is done you need to install the circular servo attachments to the top joint parts using the 4 small screws. Now connect the servos in the corners to the servo driver and set them to 90° using this command. | ||
```console | ||
$ python3 ~/AQLARP/scripts/set90.py | ||
``` | ||
Now install the top joint part, make it so it is as straight as possible. Then use an M3 screw to screw it into the servo from the side. | ||
|
||
After that is done you can install the final servo into the top joint part using M4 screws and locknuts. Then set them all to 90 degrees using the command above again and then install the leg on it, again trying to make it as straight as possible. | ||
|
||
Now we will install the front and back cover, to do this first feed the wires of the servos trough the hole at the bottom and into the main body, and then attach the front/back cover using 4 M4 screws and locknuts. | ||
|
||
## Wiring | ||
We will create the wiring outside of the body before moving it in, this is easier since we have more space to work with outside of the body. | ||
|
||
Connect the battery to the voltage regulators so you can configure their target voltage. Adjust the 20A voltage regulator until it outputs about 6.8V and adjust the XL4005 voltage regulator until it outputs 5V. This is very important as a wrong voltage could destroy your components. | ||
|
||
Now wire everything up as shown in the image below. | ||
![](img/ALL_wiring.png) | ||
Please note the voltage regulators in the image aren't the same as those actually used. Make sure you connect the negative and positive pole correctly. | ||
|
||
To connect the gryo and servo controller to the same pin you need Y-wires, you can easily create 2 of these by cutting open 2 jumper wires and soldering 3 parts together. | ||
|
||
## Connecting the servos | ||
It is vital you connect each leg to the correct pin on the servo controller. The top joint should be the first of the 3 pins, the bottom joint the second and the sideways joint the third. | ||
The pins for the legs are as follows: | ||
- Front Left: pin 9-11 | ||
- Front Right: pin 0-2 | ||
- Back Left: pin 6-8 | ||
- Back Right: pin 3-5 | ||
|
||
## Installing in body | ||
Now you just have to install all components in the body as is shown in the image below. | ||
![](img/Component_Layout.png) | ||
|
||
After that is done you just have to install the top cover and then you're done! |
Oops, something went wrong.