You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,4 +49,4 @@ Five different tasks can be performed:
49
49
50
50
## `make_basler.sh`
51
51
52
-
Downloads and installs the Basler Pylon SDK for Linux. This is needed to communicate with our camera. Normally called by the `just install-basler` or other `just` recipes.
52
+
Downloads and installs the Basler Pylon SDK for Linux. This is needed to communicate with our camera.
Copy file name to clipboardExpand all lines: src/bitbots_misc/bitbots_docs/docs/manual/tutorials/cl_simulation_testing_setup.rst
+9-18Lines changed: 9 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,36 +16,27 @@ As such you can lookup some of the needed requirements there.
16
16
- Add your SSH key to GitHub to access and sync our repositories
17
17
- If you don't know what I am talking about or you don't yet have a SSH key, follow this guide: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys
18
18
- Go to your account settings and add your SSH key (the ``.pub`` file) to `GitHub <https://github.com/settings/keys>`_
19
-
- setup bitbots_main in your home directory
19
+
- Make sure you have [pixi](https://pixi.sh) installed for your user.
``pixi run ros2 launch bitbots_bringup simulator_teamplayer.launch game_controller:=false``
41
30
This should start the simulation environment in the Webots simulator, while also starting all necessary
42
31
nodes of the robot software (walking, vision, etc.).
43
32
In the simulator we should see a field with a single robot.
44
-
``rl`` is short for ``ros2 launch`` and can be used as an alias as described in `section 5 <https://docs.bit-bots.de/meta/manual/tutorials/install_software_ros2.html>`_.
33
+
34
+
Instead of doing `pixi run ...` you can also activate the pixi environment for the current terminal with
35
+
``pixi shell`` and then run the command without the prefix ``pixi run``.
45
36
46
37
With ``game_controller:=false`` we ensure, that the game_controller_listener is not started as well, but instead
47
38
we will simulate the current gamestate by our own script (in another terminal):
48
-
``rr game_controller_hl sim_gamestate.py``
39
+
``pixi run ros2 run game_controller_hl sim_gamestate.py``
49
40
50
41
Which allows us to simulate the current gamestate and different phases of the game.
51
42
Now everything is ready for some simulation testing.
@@ -55,7 +46,7 @@ Now everything is ready for some simulation testing.
55
46
By changing the simulated gamestate and seeing how the robot reacts, we can test our behavior.
56
47
If there are issues with the robots behavior, they most likely have to do with DSD configuration or different
57
48
parallelism handling in ROS 2.
58
-
To be able to visualize the current DSD execution, we can start ``rqt`` and in the ``Plugins`` menu select
49
+
To be able to visualize the current DSD execution, we can start ``pixi run rqt`` and in the ``Plugins`` menu select
59
50
``RoboCup -> DSD-Visualization``. This will show us the current DSD execution and can help in finding deadlocks
Copy file name to clipboardExpand all lines: src/bitbots_misc/bitbots_docs/docs/manual/tutorials/install_software_ros2.rst
+19-78Lines changed: 19 additions & 78 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,15 @@
1
1
Software installation with ROS2
2
2
===============================
3
3
4
-
In this tutorial, we will learn how to install ROS2 Jazzy Jalisco on Ubuntu 24.04 and build our software stack.
4
+
In this tutorial, we will learn how to install all dependencies and build our software stack.
5
5
6
6
You might want to look at the :doc:`vscode-dev-container` tutorial, if you want to use a preconfigured development environment with Visual Studio Code and devcontainers.
7
7
8
8
**TLDR**: single command setup
9
9
------------------------------
10
10
11
11
**Prerequirements**
12
-
- You have a running Ubuntu 24.04 environment
13
12
- You have an existing Github account and added a SSH key to your account
14
-
- You have root access to your system (sudo)
15
13
16
14
If you have not previously set up any of our software stack, you can use the following command to install and setup everything in one go:
17
15
@@ -25,105 +23,48 @@ If you have not previously set up any of our software stack, you can use the fol
25
23
Manual steps with in depth explanation
26
24
--------------------------------------
27
25
28
-
**0. Use Ubuntu 24.04**
26
+
**0. Use any modern Linux distribution**
29
27
30
-
As ROS works best on Ubuntu, we are using this distribution.
31
-
Currently, ROS2 Jazzy runs on Ubuntu 24.04.
28
+
We mainly develop and test our software on Ubuntu so we recommend using Ubuntu for development as well.
29
+
Due to the use of pixi other distributions as well as Mac OS might work as well, but might require some tweaks.
32
30
33
-
If you are not already using Ubuntu 24.04, consider installing it on your system (perhaps as a dual boot?).
34
31
Alternatively you can use a devcontainer :doc:`vscode-dev-container`, with a preconfigured environment and follow those instructions, as these docs do not apply to the devcontainer.
35
32
36
-
**1. Setup and Install ROS 2**
33
+
**1. Install Pixi**
37
34
38
-
- Follow this guide and when it comes to the section **Install ROS 2 packages**, install the recommended ``ros-jazzy-desktop-full``: https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html
39
-
- Install additional dependencies:
35
+
We manage our development environment with `pixi <https://pixi.sh>`_, which makes setting up and using our software stack much easier.
36
+
Run the following command to install pixi for your user:
40
37
41
38
.. code-block:: bash
42
39
43
-
sudo apt install \
44
-
clang-format \
45
-
cppcheck \
46
-
python3-colcon-clean \
47
-
python3-colcon-common-extensions \
48
-
python3-pip \
49
-
python3-rosdep \
50
-
python3-vcstool \
51
-
ros-jazzy-plotjuggler-ros \
52
-
ros-jazzy-rmw-cyclonedds-cpp \
53
-
ros-jazzy-rqt-robot-monitor \
54
-
ros-jazzy-rqt-runtime-monitor
55
-
56
-
**2. Download our software (if not already done)**
40
+
curl -sSL https://pixi.sh/install.sh | bash
41
+
42
+
**2. Download our software**
57
43
58
44
- Create a GitHub account, if not already done (see `here <http://doku.bit-bots.de/private/manual/dienste_accounts.html>`_ for further information)
59
45
- Add your SSH key to GitHub to access and sync our repositories
60
46
- If you don't know what I am talking about or you don't yet have a SSH key, follow this guide: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys
61
47
- Go to your account settings and add your SSH key (the ``.pub`` file) to `GitHub <https://github.com/settings/keys>`_
62
48
- Now, you can clone (download) our main code repository (repo) called `bitbots_main <https://github.com/bit-bots/bitbots_main>`_:
63
-
- Open a terminal and go to the directory where you want to download our code (typically ``~/git/bitbots/``)
64
-
- Create the directory with: ``mkdir -p ~/git/bitbots``
65
-
This is were your source code will live and grow.
66
-
- Move to this directory with: ``cd ~/git/bitbots``
49
+
- Open a terminal and go to the directory where you want to download our code, e.g. ``~/git/bitbots/``
67
50
- Clone the code repository with: ``git clone git@github.com:bit-bots/bitbots_main.git``
68
51
Confirm the host key by typing ``yes``, if asked.
69
52
- Move into the newly created directory with: ``cd bitbots_main``
70
-
- Clone all code and other files by running: ``just install``
71
-
This will take a while, as it downloads all the code and other files from our repositories and additionally installs all missing dependencies (using rosdep and pip).
72
-
- Finally, you can register pre-commit hooks with ``just install-pre-commit`` (automatic code-formatting and warnings), which will be run every time you commit code to our repositories.
73
-
74
-
**3. Setup colcon workspace**
75
-
76
-
`Colcon <https://docs.ros.org/en/jazzy/Tutorials/Beginner-Client-Libraries/Colcon-Tutorial.html>`_ is the tool provided by ROS 2 to build and install our ROS packages, so that they can be launched later.
77
-
The colcon workspace is where your source code gets build and where we use colcon. Nowerdays, we just use the ``bitbots_main`` repository as our colcon workspace, so no further setup is needed.
78
-
79
-
**4. Final touches**
80
53
81
-
To let your system know where it should find all the ROS 2 dependencies and packages and to add colored output etc., we add a little bit of config to your ``~/.bashrc`` file, which will be run every time you open a new terminal.
82
-
In case you are not using the bash shell, replace ``~/.bashrc`` and ``bash`` with your shell's configuration file. Adapt the colcon workspace path, if you have chosen a different location than ``~/git/bitbots/bitbots_main``.
54
+
**3. Setup the workspace and build the software**
83
55
84
-
- Run the following command:
56
+
Now that you have downloaded the code, you need to build it.
57
+
A number of dependencies will be installed automatically during the build process.
58
+
Make sure you have about 10 GB of free disk space available.
59
+
Run the following command in the ``bitbots_main`` directory to build the software:
85
60
86
61
.. code-block:: bash
87
62
88
-
cat >>~/.bashrc <<EOF
89
-
90
-
# >>> bit-bots initialize >>>
91
-
92
-
# Add python pip bins to PATH
93
-
export PATH="\$HOME/.local/bin:\$PATH"
94
-
95
-
# Ignore some deprecation warnings
96
-
export PYTHONWARNINGS="ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources,ignore:easy_install command is deprecated,ignore:setup.py install is deprecated"
97
-
98
-
# Limit ROS 2 communication to localhost (can be overridden when needed)
# Load our ros plugin script containing useful functions and aliases for ROS 2 development
116
-
if [[ -f \$COLCON_WS/scripts/ros.plugin.sh ]]; then
117
-
source \$COLCON_WS/scripts/ros.plugin.sh
118
-
fi
119
-
120
-
# <<< bit-bots initialize <<<
121
-
122
-
EOF
63
+
pixi run build --packages-skip bitbots_basler_camera
123
64
124
-
source ~/.bashrc
65
+
The compilation of the basler camera driver is skipped, as it requires the Pylon SDK to be installed manually.
66
+
If you need the basler camera driver, install the Pylon SDK manually or run `bash scripts/make_basler.sh` if you are using Ubuntu 22.04 and have root access.
125
67
126
-
- Configure the robot hostnames, see :doc:`configure_hostnames`.
Copy file name to clipboardExpand all lines: src/bitbots_misc/bitbots_docs/docs/manual/tutorials/vscode-dev-container.rst
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,14 +28,15 @@ Setup VSCode Dev Container
28
28
6. Open a terminal in VSCode, you should see a number of instructions on how to setup the container. Follow them.
29
29
7. Install recommended extensions for the repository
30
30
31
-
You should now have a fully working development environment (IntelliSense, Build, ...) for the repository. You can source the workspace by running `sa`. Now all the commands should be available to you.
31
+
You should now have a fully working development environment (IntelliSense, Build, ...) for the repository.
32
+
You still need to setup your SSH keys in the container to be able to push.
33
+
Instructions for that are shown in the terminal when the container starts.
34
+
To activate the pixi environment in a terminal run `pixi shell` or prefix commands with `pixi run ...`.
32
35
33
36
34
37
Known issues
35
38
------------
36
39
37
40
- Rebuilding the container results in all modifications to the container being lost. This does not include the repository, which itself is persisted in the container.
38
-
- Sometimes `just install` results in an `mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Permission denied`. I spend some time trying to fix this but couldn't find a solution. The workaround is to run `just install` again. This time it should work.
39
-
- I did everything as stated, but my python IntelliSense does not pick up bit-bots related packages. To solve this open the command palette (Ctrl+Shift+P) and run `ROS: Update Python Path`. This should fix the issue.
40
41
- GUI applications do not start. Run `xhost local:root` on the **host** machine to fix this.
41
42
- I can not find my files in the home directory. The home directory is mounted at `/srv/host_home` in the container. You can find your files there.
0 commit comments