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: README.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,16 +15,17 @@ All code is written as individual ROS 2 packages.
15
15
16
16
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.
17
17
18
-
Full step-by-step instructions for installing the Bit-Bots software stack and ROS 2 can be found in our documentation [here](https://docs.bit-bots.de/meta/manual/tutorials/install_software_ros2.html).
18
+
Full step-by-step instructions for installing the Bit-Bots software stack and ROS 2 can be found in our [documentation](https://docs.bit-bots.de/meta/manual/tutorials/install_software_ros2.html).
19
19
20
-
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.
20
+
Run the following command inside this repository to build the workspace.
21
+
All dependencies will be installed automatically.
22
+
Make sure you have [pixi](https://pixi.sh) installed.
23
+
A few optional proprietary dependencies will be needed for full functionality, see the documentation for details.
21
24
22
25
```shell
23
26
pixi run build
24
27
```
25
28
26
-
The first build will take a while as all dependencies are built from source.
27
-
Subsequent builds will be much faster.
28
29
The first build might fail due to missing dependencies.
29
30
Run `pixi run basler` to install the Basler pylon camera driver.
30
31
@@ -42,7 +43,13 @@ alternatively, you can run individual commands inside the workspace without acti
42
43
pixi run <command>
43
44
```
44
45
45
-
To see some predefined / commands, run
46
+
To build the workspace, run the following command in the terminal:
47
+
48
+
```shell
49
+
pixi run build
50
+
```
51
+
52
+
To see some predefined tasks / commands, run
46
53
47
54
```shell
48
55
pixi task list
@@ -53,7 +60,7 @@ pixi task list
53
60
To deploy the software to a robot, run
54
61
55
62
```shell
56
-
pixi run deploy<robot_ip|robot_name>
63
+
pixi run deploy
57
64
```
58
65
59
66
For more information on the deployment tooling, see [this documentation](scripts/README.md).
echo" --ci Run non-interactively for CI (skips confirmation and progress)"
20
+
echo" --skip-os-check Skip the Ubuntu version/OS check"
21
+
echo" -h, --help Show this help message and exit"
22
+
}
23
+
24
+
# Parse arguments position-independently
25
+
forargin"$@";do
26
+
case"$arg"in
27
+
--ci)
28
+
CI=true
29
+
SHOW_PROGRESS=""
30
+
;;
31
+
--skip-os-check)
32
+
SKIP_OS_CHECK=true
33
+
;;
34
+
-h|--help)
35
+
print_help
36
+
exit 0
37
+
;;
38
+
*)
39
+
UNKNOWN_ARGS+=("$arg")
40
+
;;
41
+
esac
42
+
done
43
+
44
+
# If unknown arguments were passed, warn and show help
45
+
if [[ ${#UNKNOWN_ARGS[@]}-gt 0 ]];then
46
+
echo"Unknown argument(s): ${UNKNOWN_ARGS[*]}"
47
+
echo
48
+
print_help
49
+
exit 1
50
+
fi
51
+
11
52
# Check let the user confirm that they read the license agreement on the basler website and agree with it.
12
53
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."
13
-
14
-
# Check --ci flag for automatic confirmation in the ci
15
-
if [[ $1=="--ci" ]];then
16
-
echo"Running in a CI environment, continuing..."
17
-
SHOW_PROGRESS=""
18
-
else
19
-
# Ask the user if they want to continue and break if they don't
54
+
# If not running in CI, ask the user to confirm license agreement
55
+
if [[ "$CI"!=true ]];then
20
56
read -p "Do you want to continue? [y/N] " -n 1 -r
21
-
57
+
echo
22
58
if [[ !$REPLY=~ ^[Yy]$ ]];then
23
59
echo"Aborting..."
24
60
exit 1
25
61
fi
26
-
SHOW_PROGRESS="--show-progress"
27
62
fi
28
63
64
+
check_os_is_required_ubuntu_version () {
65
+
# Check if the OS is ubuntu
66
+
echo"Checking for compatible OS..."
67
+
if [[ "$(lsb_release -is)"!="Ubuntu" ]];then
68
+
echo"This driver package only supports Ubuntu (and some Debian derivatives)."
69
+
echo"Please install Ubuntu >= 18.04 and try again OR try it on a compatible Debian derivative with --skip-os-check."
70
+
exit 1
71
+
fi
72
+
}
73
+
29
74
check_internet_connection () {
30
75
# Check if we have an internet connection, except in the ci as azure does not support ping by design
echo"Pylon download url does not exist. Please check the url and update the 'PYLON_DOWNLOAD_URL' variable in the 'make_basler.sh' script. The website might have changed."
echo"Pylon download url does not exist. Please check the url and update the 'PYLON_DOWNLOAD_URL' variable in the 'make_basler.sh' script. The website might have changed."
if ask_question "Do you want to continue with an HTTPS clone instead of fixing SSH keys now?";then
43
+
echo"Cloning via HTTPS..."
44
+
git clone "$REPO_URL_HTTPS"
45
+
else
46
+
echo"Please set up your SSH keys and re-run this script. Exiting."
47
+
exit 1
48
+
fi
49
+
fi
34
50
git checkout "$BRANCH"
35
51
fi
36
52
37
-
meta_dir="$(realpath "$PWD/bitbots_main")"
38
-
cd"$meta_dir"||exit
53
+
main_dir="$(realpath "$PWD/bitbots_main")"
54
+
cd"$main_dir"||exit
39
55
fi
40
56
41
57
echo"Installing dependencies..."
42
-
$HOME/.pixi/bin/pixi install
58
+
install
43
59
}
44
60
45
61
setup_host() {
46
62
echo"Setting up system dependencies not covered by pixi. This may require sudo rights. For non-Ubuntu systems, please install the required packages manually."
47
63
if(( has_sudo ));then
48
-
$meta_dir/scripts/make_basler.sh
64
+
$main_dir/scripts/make_basler.sh
65
+
basler_installed=1
49
66
fi
50
67
}
51
68
52
69
build_repository() {
53
-
echo"Running full colcon build..."
70
+
echo"Running full build..."
54
71
set +u
55
-
$HOME/.pixi/bin/pixi run build
72
+
73
+
# Append "--packages-skip bitbots_basler_camera" to the build command if setup_host was skipped or failed
74
+
if(( basler_installed ));then
75
+
pixi run build
76
+
else
77
+
pixi run build --packages-skip bitbots_basler_camera
78
+
fi
56
79
}
57
80
58
81
has_sudo=0
@@ -63,13 +86,15 @@ if (( ! has_sudo )); then
63
86
echo"Because, you don't have sudo rights, no host dependencies will be installed."
0 commit comments