Skip to content

Getting started with Pixi

Pixi makes cross-platform ROS 2 development easy. You can build and run both capture and playback nodes on Linux and Windowsβ€”with no system-wide ROS install.


πŸ“¦ Install Pixi

Linux:

curl -fsSL https://pixi.sh/install.sh | bash

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm -useb https://pixi.sh/install.ps1 | iex"

πŸš€ Clone & Build Project

git clone https://github.com/CLFML/ROS2_Package_Template.git
cd ROS2_Package_Template
pixi install
pixi run build

Or launch VSCode with the environment:

pixi run vscode

βœ… Note (Windows): Always build in Release or RelWithDebInfo, not Debug!
(Ctrl+Shift+P β†’ "CMake: Select Variant")


⚑ Using as a Pixi Dependency

Want to use custom_pkg from another Pixi-based project?

1. Init a new project

mkdir my_project && cd my_project
pixi init

2. Edit pixi.toml

Add these:

[project]
channels = [
  "https://fast.prefix.dev/conda-forge",
  "https://prefix.dev/robostack-jazzy",
  "https://clfml.github.io/conda_ros2_jazzy_channel/"
]

[dependencies]
ros-jazzy-ros-base = "*"
ros-jazzy-custom_pkg = "*"
colcon-common-extensions = "*"
rosdep = "*"

🧠 Optional: VSCode Support

Add to your pixi.toml:

[target.linux-64.dependencies]
python-devtools = "*"
pybind11 = "*"
numpy = "*"

[target.win-64.dependencies]
python-devtools = "*"

[target.linux-64.tasks]
vscode = 'env -u LD_LIBRARY_PATH code .'

[target.win-64.tasks]
vscode = "code ."

3. Run the nodes

pixi install
pixi run ros2 run custom_pkg custom_node