From 33be3fed42fb7b2ed1f32c6ec4ded20b5c9cb2af Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Wed, 20 Mar 2024 19:10:15 +0100 Subject: [PATCH] Fix spelling issues --- README.md | 2 +- documentation/src/ch01-01-design-principles.md | 8 ++++---- documentation/src/ch03-01-required-materials.md | 4 ++-- documentation/src/ch04-01-raspberry-pi-setup.md | 12 ++++++------ documentation/src/ch05-01-building-leg.md | 16 +++++++++++----- documentation/src/ch05-02-building-body.md | 16 +++++++++------- documentation/src/ch06-01-installing-software.md | 12 ++++++------ documentation/src/ch08-00-inverse-kinematics.md | 2 +- documentation/src/title-page.md | 3 ++- .../src/aqlarp_main/aqlarp_main/aqlarp_main.py | 12 ++++++------ .../src/aqlarp_main/aqlarp_main/src/crawling.py | 8 ++++---- 11 files changed, 52 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 7b9c172..f567817 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ AQLARP stands for **A**ffordable **Q**uadruped **L**earning **A**nd **R**esearch **P**latform. -AQLARP was created as my final for high school. +AQLARP was created as my final project for high school. For more information please see the [documentation](https://aqlarp.dediamondpro.dev) diff --git a/documentation/src/ch01-01-design-principles.md b/documentation/src/ch01-01-design-principles.md index 0be97ed..ecefac6 100644 --- a/documentation/src/ch01-01-design-principles.md +++ b/documentation/src/ch01-01-design-principles.md @@ -1,14 +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. +This is the most important principle for AQLARP. AQLARP should be a solid, extendable platform, which you can use as a 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. +3. Well Documented: AQLARP has 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. +AQLARP is relatively affordable. The parts chosen are a balance of price and how suitable they are to build a platform. Affordability, however, comes second to 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. +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. \ No newline at end of file diff --git a/documentation/src/ch03-01-required-materials.md b/documentation/src/ch03-01-required-materials.md index 3ab5312..89e3516 100644 --- a/documentation/src/ch03-01-required-materials.md +++ b/documentation/src/ch03-01-required-materials.md @@ -7,6 +7,6 @@ AQLARP's bill of materials is available [here](https://docs.google.com/spreadshe 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 +- Screw driver for the type of screws you choose +- Soldering iron - 3D printer \ No newline at end of file diff --git a/documentation/src/ch04-01-raspberry-pi-setup.md b/documentation/src/ch04-01-raspberry-pi-setup.md index b6ed16c..a63929b 100644 --- a/documentation/src/ch04-01-raspberry-pi-setup.md +++ b/documentation/src/ch04-01-raspberry-pi-setup.md @@ -1,24 +1,24 @@ # 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. +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, which 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. +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. +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, choose 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. +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 easily remember, 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. +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 and 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 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@ ``` -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. +If you chose a different username than AQLARP, put 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 boot up. ## 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: diff --git a/documentation/src/ch05-01-building-leg.md b/documentation/src/ch05-01-building-leg.md index 8662846..4b10fc3 100644 --- a/documentation/src/ch05-01-building-leg.md +++ b/documentation/src/ch05-01-building-leg.md @@ -1,29 +1,35 @@ # Building The Legs -In this chapter we will be building the 4 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) + - [Sock](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Sock.stl) (Printed in TPU since 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) + - [Sock](https://github.com/DeDiamondPro/AQLARP/blob/master/models/stl/legs/Sock.stl) (Printed in TPU since 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. +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 attachment. 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. \ No newline at end of file +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. \ No newline at end of file diff --git a/documentation/src/ch05-02-building-body.md b/documentation/src/ch05-02-building-body.md index c0fc9cc..3a69bde 100644 --- a/documentation/src/ch05-02-building-body.md +++ b/documentation/src/ch05-02-building-body.md @@ -9,30 +9,32 @@ In this chapter we will go over building the main body. - [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. +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 soldering 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. +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 on 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 and then screw the screws into 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. +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. +After this 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 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. +Now we will install the front and back cover. To do this first feed the wires of the servos through 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. +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. +To connect the gyro 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. diff --git a/documentation/src/ch06-01-installing-software.md b/documentation/src/ch06-01-installing-software.md index f987bf2..36a11b9 100644 --- a/documentation/src/ch06-01-installing-software.md +++ b/documentation/src/ch06-01-installing-software.md @@ -1,12 +1,12 @@ # Installing software In this chapter we will go over installing and setting up all software required for AQLARP to work. You should already have AQLARP's GitHub repo cloned in your home directory as specified in [chapter 4.1](/ch04-01-raspberry-pi-setup.html#clone-the-github-repo) ## Installing ros2 -AQLARP is built using ros2 iron, it might work with later versions but this is untested. To install ros2 iron you can follow [their installation instructions](https://docs.ros.org/en/iron/Installation/Ubuntu-Install-Debians.html). After installing ros2 you must also install colcon, this is ros2's build system. To do this run the command below. +AQLARP is built using ros2 iron, it might work with later versions but this is untested. To install ros2 iron you can follow [their installation instructions](https://docs.ros.org/en/iron/Installation/Ubuntu-Install-Debians.html). After installing ros2 you must also install colcon, which is ros2's build system. To do this run the command below. ```console $ sudo apt install python3-colcon-common-extensions ``` ## Sourcing ros2 automatically -To use ros2 you must source it every time, this can be annoying. To do this automatically run the following command. +To use ros2 you must source it every time, which can be annoying. To do this automatically run the following command. ```console nano ~/.bashrc ``` @@ -17,7 +17,7 @@ source ~/new_ws/install/setup.bash ``` Then press `Ctrl + O` to save and `Ctrl + X` to exit. To make this apply you should log out of the Raspberry Pi and start a new shell session. ## Installing dependencies -To install dependencies first go into the workspace directory, to do this run the following command. +To install dependencies first go into the workspace directory. To do this run the following command. ```console $ cd ~/AQLARP/ros2_ws ``` @@ -46,7 +46,7 @@ To run all code of AQLARP, and thus start the robot, run the following command. ```console $ ros2 launch aqlarp_main aqlarp.launch.py ``` -To control the robot you will have to connect a ps4 controller, you can either do this by using a cable and connecting it using one of the USB ports, or alternatively you can use the instructions in the next part to connect the ps4 controller wirelessly. +To control the robot you will have to connect a ps4 controller. You can either do this by using a cable and connecting it using one of the USB ports, or alternatively you can use the instructions in the next part to connect the ps4 controller wirelessly. The controls for AQLARP are as follows: - Playstation button: start and stop the servos @@ -100,9 +100,9 @@ ExecStart=/opt/ros/iron/bin/ros2 launch aqlarp_main aqlarp.launch.py [Install] WantedBy=multi-user.target ``` -If you use a different user then AQLARP or have cloned the GitHub repo in a different location, you will have to edit this file accordingly. To save the file press `Ctrl + O` and then press `Ctrl + X` to save. +If you use a different user than AQLARP or have cloned the GitHub repo in a different location, you will have to edit this file accordingly. To save the file press `Ctrl + O` and then press `Ctrl + X` to save. -Then finally to enable the service run the following command. +Then finally to enable the service, run the following command. ```console $ sudo systemctl enable --now aqlarp.service ``` \ No newline at end of file diff --git a/documentation/src/ch08-00-inverse-kinematics.md b/documentation/src/ch08-00-inverse-kinematics.md index 9d8849b..86f7f12 100644 --- a/documentation/src/ch08-00-inverse-kinematics.md +++ b/documentation/src/ch08-00-inverse-kinematics.md @@ -1,4 +1,4 @@ # Inverse Kinematics -In this chapter we will look at the calculations behind the inverse kinematics of AQLARP, these calculations are based on trigonometry since it is quite easy to split all these problems into triangles. +In this chapter we will look at the calculations behind the inverse kinematics of AQLARP. These calculations are based on trigonometry since it is quite easy to split all these problems into triangles. If you are not familiar with this topic or want more info, I would recommend watching the video below as it does a great job explaining this concept in a simple manner. \ No newline at end of file diff --git a/documentation/src/title-page.md b/documentation/src/title-page.md index be3e5d8..e54ce1a 100644 --- a/documentation/src/title-page.md +++ b/documentation/src/title-page.md @@ -1,12 +1,13 @@ # AQLARP ![](img/AQLARP-render-transparent.png) + Welcome to the AQLARP documentation. This documentation is built with [mdBook](https://github.com/rust-lang/mdBook) AQLARP stands for **A**ffordable **Q**uadruped **L**earning **A**nd **R**esearch **P**latform. AQLARP is licensed under the [MIT license](https://github.com/DeDiamondPro/AQLARP/blob/master/LICENSE). -AQLARP was created as my final for high school. +AQLARP was created as my final project for high school. > **🚨 This documentation might be incomplete** > diff --git a/ros2_ws/src/aqlarp_main/aqlarp_main/aqlarp_main.py b/ros2_ws/src/aqlarp_main/aqlarp_main/aqlarp_main.py index e2af6f9..0673089 100644 --- a/ros2_ws/src/aqlarp_main/aqlarp_main/aqlarp_main.py +++ b/ros2_ws/src/aqlarp_main/aqlarp_main/aqlarp_main.py @@ -4,7 +4,7 @@ from aqlarp_interfaces.msg import JointAngles, GyroAngles, Heading from std_msgs.msg import Empty, Bool from src.kinematics import calc_angles -from src.crawling import CrawlingGiat +from src.crawling import CrawlingGait from src.utils import clamp, project_to_circle # Leg indexes: @@ -20,9 +20,9 @@ def __init__(self): # Initialize the node super().__init__('aqlarp_main') - # Create a list with the supported giats, this is currentelly only the crawling giat + # Create a list with the supported gaits, this is currently only the crawling gait # But more can be added at a later data. - self.giats = [CrawlingGiat()] + self.gaits = [CrawlingGait()] # Initialize some default variables self.enabled = False @@ -43,7 +43,7 @@ def __init__(self): # Run the main function 100 times per second self.timer = self.create_timer(0.01, self.update) - # Function that is called when new gyro values are recivied + # Function that is called when new gyro values are received def gyro_update(self, msg): # Save the new values self.gyro_pitch = msg.pitch @@ -68,8 +68,8 @@ def update(self): self.disable_joints_publisher.publish(Empty()) return - # Get the leg positions from the current giat - positions = self.giats[0].get_leg_positions(self.x_heading, self.z_heading, self.rotation_heading) + # Get the leg positions from the current gait + positions = self.gaits[0].get_leg_positions(self.x_heading, self.z_heading, self.rotation_heading) # Initialize a new empty joint angles object jointAngles = JointAngles() diff --git a/ros2_ws/src/aqlarp_main/aqlarp_main/src/crawling.py b/ros2_ws/src/aqlarp_main/aqlarp_main/src/crawling.py index a28c0e3..6094c6b 100644 --- a/ros2_ws/src/aqlarp_main/aqlarp_main/src/crawling.py +++ b/ros2_ws/src/aqlarp_main/aqlarp_main/src/crawling.py @@ -2,9 +2,9 @@ from .utils import project_to_circle, ease, clamp from .leg_positions import LegPositions -# The class for the crawling giat -# In this giat one leg is lifted at a time -class CrawlingGiat(): +# The class for the crawling gait +# In this gait one leg is lifted at a time +class CrawlingGait(): def __init__(self): # Initialize the x value self.x = 0 @@ -16,7 +16,7 @@ def get_leg_positions(self, moving_x, moving_z, rotation_heading): # Get the heading by projecting the x and z values to a circle heading_x, heading_z = project_to_circle(moving_x, moving_z, False) - # Intiliaze an empty leg positions value + # Initialize an empty leg positions value positions = LegPositions() # If the robot isn't moving, set all legs to the default position and return