Lately, I haven’t been booting into my native Ubuntu OS very often, instead doing almost everything on Windows’ WSL (you can even connect to USB devices from WSL to control robots). When I want to use ROS in that environment, RoboStack is very handy, which allows you to install ROS in a virtual environment, even on macOS or Windows. For example, the native ROS installation procedure even has specific Ubuntu version constraints (e.g., ROS 2 Jazzy is only supported on Ubuntu 24.04). However, if you’re using a virtual environment, it doesn’t matter which OS or OS version you’re on. Also, by using a virtual environment, you could even install both ROS 1 and ROS 2 on the same machine. If you want to use ROS without contaminating your base environment, RoboStack is a very strong tool.

That said, there are some constraints, such as the fact that you can only install packages registered in RoboStack. If you want to heavily use ROS, the native installation methods might be better. Also note that this information is current as of October 2026, so if there are any discrepancies with the official tutorials, please adjust the commands accordingly.

Let’s go ahead and build our ROS2 environment. It mostly follows the RoboStack tutorial, but I’ll point out where I ran into trouble, so please read it alongside the original article.

1. Set up Robostack

Just follow the instructions in the Getting Started page. I use ROS 2 Jazzy for my projects, change the release names in the commands accordingly:

curl -fsSL https://pixi.sh/install.sh | bash
# And restart the terminal to be able to use the pixi commands.

# go to the home directory, where you will set up the environment's workspace:
cd
# initialize a new project and its directory
pixi init ros_ws --channel https://prefix.dev/robostack-jazzy

make sure you’re in the ros_ws directory when you run the pixi commands.

cd ros_ws
# add the ROS 2 packages
pixi add ros-jazzy-desktop

That’s it! Now, if you run pixi run rviz2, the magic happens:

Rviz running on Windows! (If you’re on the latest WSL2, you can display GUIs without even setting up an X Server.)

Before installing Python packages: check for pip conflicts

You can install Python packages with pixi run pip install <package>, but make sure you are using the pip binary inside the pixi environment. Install pip first if it is not already available:

cd ~/ros_ws
pixi add pip
# Check that the correct pip is used:
pixi run which pip

The output of which should point to ~/ros_ws/.pixi/envs/default/bin/pip or a similar path (with ~ expanded to your home directory). In my case, the mamba / conda initialization scripts in ~/.bashrc or ~/.zshrc seemed to interfere, so the pip binary from my mamba environment showed up instead. If this happens, comment out those initialization blocks, restart the terminal, and run pixi run which pip again to make sure it points to the correct binary.

2. Add and build your ROS 2 projects

Make a src directory to which you will add the project source repositories into:

cd ~/ros_ws
mkdir src
cd src

and clone whatever ROS 2 repositories you need to ros_ws/src. Return to the workspace root and install the ROS development tools (which let you use build tools like colcon):

cd ~/ros_ws
pixi add ros-dev-tools

Now, you can build with

pixi run colcon build --symlink-install

To be able to run the custom programs built from the source files, usually you would run source install/setup.bash. For pixi, add this to ~/ros_ws/pixi.toml instead:

[target.unix.activation]
scripts = ["install/setup.bash"]

3. Run ROS 2 programs

Whenever you need to run a command in the pixi environment, don’t forget to:

So:

cd ~/ros_ws
# to install numpy to the environment
pixi run pip install numpy
# to run a python program inside the environment
pixi run python my_program.py
# and of course, for ROS 2 commands too
pixi run ros2 run demo_nodes_cpp talker

4. About Installing ROS Packages

Typically, if a ROS package provides binaries, we would install it with something like sudo apt install ros-jazzy-joint-state-publisher, but since we’re running in a robostack environment, we have to install it inside that environment using pixi. (If you try to install via apt, it should fail because the underlying ROS2 is not installed in the base system.)

Check that the package you want is listed on https://robostack.github.io/jazzy.html, and then install it like this:

pixi add ros-jazzy-joint-state-publisher-gui ros-jazzy-xacro

If it’s not on that list, unfortunately, you’ll need to build it from source. This is one of the downsides of the RoboStack version of ROS.

That’s it! Enjoy your ROS 2 life!