In the Start we will see 3 things :
- How to have ros2 and ros2 control,
- How to create a good workspace and Bolt with all there dependencies,
- And how to do your first colcon build.
The Robot Operating System
(ROS) is a set of software libraries
and tools for building robot applications. From drivers to state-of-the-art
algorithms, and with powerful developer tools, ROS has what we need for Bolt project. And it’s all open source
.
ROS 2 it's the big brother of ROS 1, he adapts the changes of robotics community since the start of ROS 1 and leveraging what is great about ROS 1 and improving what isn’t
- You need a local setup with
Ubuntu 22.04
- If you have one go to this link for ROS 2 Humble Installation
ROS2 CONTROL
is a framework for (real-time) control of robots this goal is to simplify integrating new hardware and overcome some drawbacks.
-
Type that on your Terminal :
sudo apt update sudo apt install ros-humble-ros2-control sudo apt install ros-humble-ros2-controllers
You need to have a clear workspace
to do some tests or find your files easily. Many different workspaces exist but for the rest of the tutorial you would be easier to use the same workspace as me.
-
Having a
local workspace
is better (when you are in LAAS otherwise you dont need it):cd /users/local/<User_Name>
-
If the path doesn't exist
create it
:-
Go to :
cd / sudo mkdir -p users/local/<User_Name> cd users/local/ sudo chown User_Name User_Name
-
-
Create your
own Workspace
:mkdir -p Bolt_ws/src cd Bolt_ws/src
-
Add the
Bolt project
(in the src file) :You need to have
git tool install
git clone --recursive https://github.com/stack-of-tasks/odri_bolt_robot.git
-
Add some
dependencies
of Bolt (in the src file) :git clone --recursive https://github.com/open-dynamic-robot-initiative/master-board.git git clone --recursive https://github.com/open-dynamic-robot-initiative/odri_control_interface.git sudo apt install python3-sphinx python3-pybind11 ros-humble-xacro
Every time you change something in your code you need to upload with a colcon build
otherwise your updates don't be transmitted.
-
Install Colcon
with these extension :sudo apt update sudo apt install python3-colcon-common-extensions
-
Go to the
Bolt_ws
file :cd ..
-
Do your first
Colcon Build
:colcon build
-
If everything install properly you must come to this end when you do your
first colcon build
:
-
To only
update a part
of your code you changed, you can do this :colcon build --packages-select odri_bolt_description
This example is only here for updating the package odri_bolt_description
Now you have all you need for the project and you know how to do Colcon Build