Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@ All code is written as individual ROS 2 packages.

The workspace is managed using the [pixi](https://pixi.sh) package manager. This allows us to have reproducible builds and easy user space dependency management similar to tools like `uv` or `cargo`. This also means that no system wide ROS installation or superuser privileges are required to install or run the code.

Full step-by-step instructions for installing the Bit-Bots software stack and ROS 2 can be found in our documentation [here](https://doku.bit-bots.de/meta/manual/tutorials/install_software_ros2.html).


Run the following command inside this repository to build the workspace. All dependencies will be installed automatically. Make sure you have [pixi](https://pixi.sh) installed. A few optional proprietary dependencies will be needed for full functionality, see the documentation for details.

``` shell
pixi run build
```
Follow our [installation guide](https://docs.bit-bots.de/meta/manual/tutorials/installation.html) for a quick installation or step-by-step instructions.

## Using the workspace

Expand All @@ -38,7 +31,13 @@ alternatively, you can run individual commands inside the workspace without acti
pixi run <command>
```

To see some predefined / commands, run
To build the workspace, run the following command in the terminal:

``` shell
pixi run build
```

To see some predefined tasks / commands, run

``` shell
pixi task list
Expand All @@ -49,7 +48,7 @@ pixi task list
To deploy the software to a robot, run

``` shell
pixi run deploy <robot_ip|robot_name>
pixi run deploy
```

For more information on the deployment tooling, see [this documentation](scripts/README.md).
Expand Down
8 changes: 4 additions & 4 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ This tool is also callable via `pixi run deploy <arguments>`.

Deploy, configure, and launch the Bit-Bots software remotely on a robot.
This tool can target all, multiple, or single robots at once, specified by their hostname, robot name, or IP address.
Five different tasks can be performed:
These different tasks can be performed:

1. Synchronize the local source code to the target workspace
3. Configure game-settings and wifi on the target
4. Build (compile) the workspace on the target
5. Launch the teamplayer software on the target
2. Configure game-settings and wifi on the target
3. Build (compile) the workspace on the target
4. Launch the teamplayer software on the target

### Example usage

Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/deploy_robots.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def _parse_arguments(self) -> argparse.Namespace:
parser.add_argument(
"-w",
"--workspace",
default=".",
help="Path to the workspace directory to deploy to. Defaults to the current directory.",
default="/home/bitbots/bitbots_main",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we want to put the bitbots_main dir on the robot?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect bitbots_main to live in the home dir

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oki!

help="Path to the workspace directory to deploy to. Defaults to '/home/bitbots/bitbots_main'.",
)
parser.add_argument("--skip-local-repo-check", action="store_true", help="Skip the local repository check.")

Expand Down
17 changes: 17 additions & 0 deletions scripts/make_basler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set -eEo pipefail
# Go to the download button and copy the link address.
PYLON_DOWNLOAD_URL="https://data.bit-bots.de/pylon_7_4_0_14900_linux_x86_64_debs.tar.gz.gpg"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pylon 7.4.0 was released in September 2023, the latest available version is from January 2026 version 26.01 (pylon has changed to a yy.mm version scheme).
Should we upgrade at some point (and create an issue for this) or is there anything speaking against that?

PYLON_VERSION="7.4.0"
REQUIRED_UBUNTU_VERSION="24.04"

# Check let the user confirm that they read the license agreement on the basler website and agree with it.
echo "You need to confirm that you read the license agreements for pylon $PYLON_VERSION on the basler download page (https://www.baslerweb.com/en/downloads/software-downloads/) and agree with it."
Expand All @@ -26,6 +27,20 @@ else
SHOW_PROGRESS="--show-progress"
fi

check_os_is_required_ubuntu_version () {
# Check if the OS is ubuntu
if [[ "$(lsb_release -is)" != "Ubuntu" ]]; then
echo "This driver package only supports Ubuntu. Please install Ubuntu $REQUIRED_UBUNTU_VERSION and try again."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if that is true the dependencies of pylon are literally only:

  Depends: libstdc++6
  Depends: libc6

which most likely is available on debian as well

exit 1
fi

# Check if the ubuntu version is the required one
if [[ "$(lsb_release -rs)" != "$REQUIRED_UBUNTU_VERSION" ]]; then
echo "This driver package only supports Ubuntu $REQUIRED_UBUNTU_VERSION. Please install Ubuntu $REQUIRED_UBUNTU_VERSION and try again."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is most definitely not true.
According to the latest pylon readme
it is literally built on ubuntu 18.04

exit 1
fi
}

check_internet_connection () {
# Check if we have an internet connection, except in the ci as azure does not support ping by design
if [[ $1 != "--ci" ]] && ! ping -q -c 1 -W 1 google.com > /dev/null; then
Expand All @@ -39,6 +54,8 @@ if apt list pylon --installed | grep -q $PYLON_VERSION; then
echo "Pylon driver $PYLON_VERSION is already installed."
else
echo "Pylon driver $PYLON_VERSION is not installed. Installing..."
# Check if the OS is the required ubuntu version
check_os_is_required_ubuntu_version
# Check if we have an internet connection
check_internet_connection "$1"
# Check if the url exist
Expand Down
35 changes: 25 additions & 10 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -eEuo pipefail
# static/global variables
DIR="$(dirname "$(readlink -f "$0")")"
BRANCH="${1:-main}"
REPO_URL="git@github.com:bit-bots/bitbots_main.git"
REPO_URL_SSH="git@github.com:bit-bots/bitbots_main.git"
REPO_URL_HTTPS="https://github.com/bit-bots/bitbots_main.git"

ask_question() {
while true; do
Expand All @@ -26,16 +27,21 @@ setup_repo() {
echo "Setting up bitbots_main repository..."

if (( in_repo )); then
cd "$meta_dir" || exit
cd "$main_dir" || exit
git checkout "$BRANCH"
else
if [[ ! -d "$PWD/bitbots_main" ]]; then
git clone "$REPO_URL"
echo "Cloning repository bitbots_main..."
# Try to clone via SSH first, fall back to HTTPS if that fails
if ! git clone "$REPO_URL_SSH"; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I like this implicit fallback. It might cause problems later on if people try to push via ssh.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am also not 100% happy with that.

Who is the target user of this script?

  • Obviously, we want our members to use this script and we can throw and error message explaining how to setup the SSH key on GitHub and try again, then exit.
  • But in general, these kind of scripts are targeted at the general external community, which we also want to support. These people might only "consume" software and do not intend to ever contribute. They might not even have a GitHub account, and demanding them to create an account and upload some weird S s H (?) key just to continue this crashing one-script-to-setup-everything is too much.

Compromise: If SSH clone fails, warn about missing keys and link to guide how to set them up. Then ask user, if they intend to fix this or continue with HTTPS.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that

echo "SSH clone failed, trying HTTPS..."
git clone "$REPO_URL_HTTPS"
fi
git checkout "$BRANCH"
fi

meta_dir="$(realpath "$PWD/bitbots_main")"
cd "$meta_dir" || exit
main_dir="$(realpath "$PWD/bitbots_main")"
cd "$main_dir" || exit
fi

echo "Installing dependencies..."
Expand All @@ -45,14 +51,21 @@ setup_repo() {
setup_host() {
echo "Setting up system dependencies not covered by pixi. This may require sudo rights. For non-Ubuntu systems, please install the required packages manually."
if (( has_sudo )); then
$meta_dir/scripts/make_basler.sh
$main_dir/scripts/make_basler.sh
basler_installed=1
fi
}

build_repository() {
echo "Running full colcon build..."
echo "Running full build..."
set +u

# Append "--packages-skip bitbots_basler_camera" to the build command if setup_host was skipped or failed
if (( basler_installed )); then
$HOME/.pixi/bin/pixi run build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work with a global pixi install or other potential installation locations (for whatever reason).
I would prefer adding export PATH="$PATH:$HOME/.pixi/bin" to setup_pixi if it was freshly installed (it is automatically added to .zshrc by the script anyway).

Also Indentation

else
$HOME/.pixi/bin/pixi run build --packages-skip bitbots_basler_camera
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

fi
}

has_sudo=0
Expand All @@ -63,13 +76,15 @@ if (( ! has_sudo )); then
echo "Because, you don't have sudo rights, no host dependencies will be installed."
fi

basler_installed=0

in_repo=1
meta_dir="$(realpath "$DIR/../")"
if [[ ! -d "$meta_dir/.git" ]]; then
main_dir="$(realpath "$DIR/../")"
if [[ ! -d "$main_dir/.git" ]]; then
in_repo=0
fi

setup_ros
setup_pixi
setup_repo
setup_host
build_repository
6 changes: 3 additions & 3 deletions src/bitbots_misc/bitbots_docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ find_package(ament_cmake REQUIRED)
# then, we can't build the documentation in this package
file(COPY files DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME})

# we cannot use the compiled catkin package of bitbots_docs since that would
# require this package to depend on itself. therefore we need to compile the sub
# cmake file ourselves and include it manually
# we cannot use the compiled package of bitbots_docs since that would require
# this package to depend on itself. therefore we need to compile the sub cmake
# file ourselves and include it manually
configure_file(cmake/enable_bitbots_docs.cmake.in
${CMAKE_BINARY_DIR}/enable_bitbots_docs.cmake @ONLY)
include(${CMAKE_BINARY_DIR}/enable_bitbots_docs.cmake)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function(enable_bitbots_docs)
# create directories neccessary for sphinx
# create directories necessary for sphinx
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/docs/_build/doxyoutput)
file(COPY @CMAKE_INSTALL_PREFIX@/share/bitbots_docs/files/_static DESTINATION ${CMAKE_SOURCE_DIR}/docs)

Expand Down
59 changes: 0 additions & 59 deletions src/bitbots_misc/bitbots_docs/docs/_static/bitbots_cpp_style.xml

This file was deleted.

This file was deleted.

11 changes: 5 additions & 6 deletions src/bitbots_misc/bitbots_docs/docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Welcome Bit-Bots main documentation!
================================================
====================================

This is the main page of `Hamburg Bit-Bots <https://bit-bots.de>`_ documentation. Feel free to poke around
and see if you can find something.
This is the main page of `Hamburg Bit-Bots <https://bit-bots.de>`_ documentation.

If you want to take a look at the code, our Github Organisation is also named `Bit-Bots
If you want to take a look at the code, our GitHub Organisation is also named `Bit-Bots
<https://github.com/bit-bots>`_.
The main repository is `bitbots_main <https://github.com/bit-bots/bitbots_main>`_.

Expand Down Expand Up @@ -34,15 +33,15 @@ The main repository is `bitbots_main <https://github.com/bit-bots/bitbots_main>`
.. toctree::
:maxdepth: 1
:glob:
:caption: Electronics
:caption: Electronics Wolfgang

manual/hardware/electronics/*


.. toctree::
:maxdepth: 1
:glob:
:caption: Mechanics
:caption: Mechanics Wolfgang

manual/hardware/mechanics/*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
===============
======
Screws
===============
======

Wolfgang
===============
========

**NOTE: This is outdated and lacks some screws that were added later. Use with caution.**

By Position
-------------
-----------

+----------------------------------------+----------+--------+------------+
| Position | Type | Amount | Per Robot |
| | | | |
Expand Down
Loading