-
Notifications
You must be signed in to change notification settings - Fork 7
/
pixi.toml
148 lines (119 loc) · 5.11 KB
/
pixi.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Pixi is a package management tool for developers.
# Before running a task, pixi ensures that all listed dependencies are installed first.echop
#
# Pixi is not required for rerun, but it is a convenient way to install the
# dependencies required for this example.
#
# https://prefix.dev/docs/pixi/overview
#
# Use `pixi task list` to list the available tasks,
# and `pixi run TASK` to run it (e.g. `pixi run example`).
[project]
name = "rerun_bridge2"
authors = ["rerun.io <[email protected]>"]
channels = ["robostack-staging", "conda-forge"]
description = "rerun_bridge2"
homepage = "https://rerun.io"
license = "MIT OR Apache-2.0"
platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64", "win-64"]
readme = "README.md"
repository = "https://github.com/rerun-io/cpp-example-ros2-bridge"
version = "0.1.0"
[tasks]
# ------------------------------------------------------------------------------------------
# C++ stuff:
# Note: extra CLI argument after `pixi run TASK` are passed to the task cmd.
# Clean C++ build artifacts
clean = { cmd = "rm -rf build bin CMakeFiles/" }
print-env = { cmd = "echo $PATH" }
# Format C++ code
cpp-fmt = { cmd = "clang-format -i rerun_bridge/**/*.[hc]pp" }
# Check formatting of C++ code
cpp-fmt-check = { cmd = "clang-format --dry-run --Werror -i rerun_bridge/**/*.[hc]pp" }
# Check for typos
lint-typos = "typos"
# ------------------------------------------------------------------------------------------
# ROS2 stuff:
[tasks.ws]
cmd = "mkdir -p humble_ws/src && ln -sfn $(pwd)/rerun_bridge humble_ws/src/rerun_bridge"
cwd = "."
[tasks.build]
cmd = "colcon build --packages-select rerun_bridge --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
depends_on = ["ws"]
cwd = "humble_ws"
# Get mcap support from source since its not available in robostack channel
#
# We first check if the src directory already exists to avoid repeating the clone.
[tasks.rosbag2_storage_mcap]
cmd = """
(test -d src/rosbag2_storage_mcap || git clone https://github.com/ros-tooling/rosbag2_storage_mcap.git src/rosbag2_storage_mcap)
&& colcon build --packages-select mcap_vendor rosbag2_storage_mcap_testdata rosbag2_storage_mcap --cmake-args -DCMAKE_BUILD_TYPE=Release
"""
depends_on = ["ws"]
cwd = "humble_ws"
# ------------------------------------------------------------------------------------------
# CARLA example:
[tasks.carla_example_data]
cmd = "curl -L -C - -O https://storage.googleapis.com/rerun-example-datasets/carla_ros2.zip && unzip carla_ros2.zip"
cwd = "humble_ws/install/rerun_bridge/share/rerun_bridge"
outputs = ["humble_ws/install/rerun_bridge/share/rerun_bridge/carla_ros2"]
depends_on = ["build"]
[tasks.carla_example]
cmd = "bash -c 'source ./install/local_setup.bash && ros2 launch rerun_bridge carla_example.launch'"
depends_on = ["build", "rerun_viewer", "carla_example_data"]
cwd = "humble_ws"
# ------------------------------------------------------------------------------------------
# Go2 example:
[tasks.go2_example_data]
cmd = "curl -L -C - -O https://storage.googleapis.com/rerun-example-datasets/go2_ros2.zip && unzip go2_ros2.zip"
cwd = "humble_ws/install/rerun_bridge/share/rerun_bridge"
outputs = ["humble_ws/install/rerun_bridge/share/rerun_bridge/go2_ros2"]
depends_on = ["build"]
# Get the go2_ros2_sdk package
#
# We first check if the src directory already exists to avoid repeating the clone.
[tasks.go2_ros2_sdk]
cmd = """
(test -d src/go2_ros2_sdk || git clone --recurse-submodules https://github.com/abizovnuralem/go2_ros2_sdk.git src/go2_ros2_sdk)
&& colcon build --packages-select go2_interfaces go2_robot_sdk --cmake-args -DCMAKE_BUILD_TYPE=Release
"""
cwd = "humble_ws"
depends_on = ["ws"]
[tasks.go2_example]
cmd = "bash -c 'source ./install/local_setup.bash && ros2 launch rerun_bridge go2_example.launch'"
depends_on = [
"build",
"go2_example_data",
"go2_ros2_sdk",
"rosbag2_storage_mcap",
"rerun_viewer",
"rerun_urdf_loader",
]
cwd = "humble_ws"
# Install Rerun and URDF loader manually via pip3, this should be replaced with direct pypi dependencies in the future.
[tasks.rerun_viewer]
cmd = "pip install rerun-sdk==0.18.2"
[tasks.rerun_urdf_loader]
cmd = "pip install git+https://github.com/rerun-io/rerun-loader-python-example-urdf.git"
[dependencies]
pip = ">=24.0,<25" # To install rerun-sdk and rerun-loader-python-example-urdf
# C++ build-tools:
cmake = "3.27.6"
clang-tools = ">=15,<16" # clang-format
cxx-compiler = "1.6.0.*"
ninja = "1.11.1"
# ROS 2 build-tools:
colcon-core = ">=0.16.0,<0.17"
colcon-common-extensions = ">=0.3.0,<0.4"
# Misc linting:
typos = ">=1.20.9,<1.21"
# Rerun bridge dependencies:
ros-humble-desktop = ">=0.10.0,<0.11"
yaml-cpp = ">=0.8.0,<0.9"
opencv = ">=4.9.0,<4.10"
# Additional dependencies for mcap support
ros-humble-rosbag2-test-common = ">=0.15.9,<0.16"
[target.linux-64.dependencies]
sysroot_linux-64 = ">=2.17,<3" # rustc 1.64+ requires glibc 2.17+, see https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html
[target.linux-aarch64.dependencies]
sysroot_linux-aarch64 = ">=2.17,<3" # rustc 1.64+ requires glibc 2.17+, see https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html