The robotic arm firmware for controlling the movement of the arm. (This sentence is incredibly stupid and redundant. Who the hell wrote this...?)
Firmware for the Robotic Arm. Developed using the STM32CubeIDE, which uses the GCC toolchain. It uses micro-ROS to interface with ROS 2 (Foxy) via TTL UART.
- Table of Contents
- Dependencies
- Prerequisites
- Setup Procedure
- Interfacing with ROS 2
- ROS 2 Packages
- Rebuilding micro-ROS
- Windows 10 (If installing on Windows)
- Ubuntu 20.04 (If installing on Linux)
- ROS 2 (Foxy)
- micro-ROS
- STM32CubeIDE (version 1.11.2)
- Docker
-
You can install Docker Desktop
OR
-
You can install Docker Engine using
apt
repository on Ubuntu
-
There's some minor, yet important, differences when building on either Operating System.
There are two ways you can do this:
- Option A: Install EGit using the STM32CubeIDE Eclipse Marketplace (
Help -> Eclipse Marketplace
and search for "EGit") and import the project in STM32CubeIDE viaFile -> Import
and selectGit -> Projects from Git
- You need to select the
stm32
branch - Ensure "Clone submodules" is ticked
- You need to select the
- Option B: Clone the repository and import the project in STM32CubeIDE
- Checkout the
stm32
branch - MAKE SURE you fetch the submodules
- Checkout the
(Note that micro_ros_stm32cubemx_utils
is a submodule of the repo, and for some reason submodules have their HEADs on the non-Main
branches detached when they're cloned. You may want to ensure that you git checkout
the foxy
branch before you move on to the next step. Though, from my testing, this doesn't seem completely necessary. Still, it doesn't hurt...)
Create a new folder called libmicroros
in <project_dir>/micro_ros_stm32cubemx_utils/microros_static_library_ide/
. You can do this in your File Explorer or you can do it in the STM32CubeIDE Project Explorer
Get packages listed in ROS 2 packages
See the Adding Custom Packages section for more information
Note I don't quite know where to put the packages, yet...
The build script for micro_ros_stm32cubemx_utils
requires Docker:
- Windows users: Ensure that Docker is running everytime you build
- Linux users: Ensure that that non-privileged users can run Docker
TODO... For now, go to First micro-ROS Application on FreeRTOS for more information
No packages to add, currently :D
TODO... Link The appropriate package repo(s) or smth, idk...
Add your packages to microros_static_library_ide/library_generation/extra-packages
folder or, if you have your packages stored in an online repository, the folder also contains a file called extra_packages.repos
where you can add an entry containing your package repo.
More information can be found here.
You will generally want to do this when micro_ros_stm32cubemx_utils
is updated; a change in the micro_ros_stm32cubemex_utils
distro is required; or when a new ROS 2 package dependency has been added.
To rebuild micro-ROS, follow these steps:
- Go to
micro_ros_stm32cubemx_utils/microros_static_library_ide/libmicroros
and deletelibmicroros.a
(or, you can rename/move it if you want a backup for some reason). This will "trick" the build script into thinking that micro-ROS is no longer built into the project. - Double check that
micro_ros_stm32cubemx_utils
is checked out to the latest version on your desired branch, and/or you have your custom packages correctly added into the build system - Build and run the project!
Zac Sux :P