Skip to content

chore: Adding a pixi file and associated CI#23

Draft
arjo129 wants to merge 9 commits into
epic/next-gen-basefrom
arjoc/chore/ci-pixi
Draft

chore: Adding a pixi file and associated CI#23
arjo129 wants to merge 9 commits into
epic/next-gen-basefrom
arjoc/chore/ci-pixi

Conversation

@arjo129

@arjo129 arjo129 commented Jun 25, 2026

Copy link
Copy Markdown
Member

New feature implementation

Implemented feature

I added a pixi workspace for folks who prefer using pixi to docker.

Implementation description

This makes installing colcon-ros-cargo a little less painful as we don't need to --break-system-dependencies

GenAI Use

We follow OSRA's policy on GenAI tools

  • I used a GenAI tool in this PR.
  • I did not use GenAI

Generated-by: Gemini Pro 3.1

@Briancbn

Briancbn commented Jun 26, 2026

Copy link
Copy Markdown

I agree pixi support will be really helpful!

This makes installing colcon-ros-cargo a little less painful as we don't need to --break-system-dependencies

This might be worth opening a new ticket rather than discuss in-depth here, but how about in the README, simply build colcon-ros-cargo in a separate workspace first and source it into the main workspace? Since it's a build from source instruction, I don't think it is too much to ask for developer to do.

@mxgrey

mxgrey commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

simply build colcon-ros-cargo in a separate workspace first and source it into the main workspace?

I believe I've tried this in the past and found that it doesn't work because colcon can only see extensions that are installed at the same level as colcon itself, so it would only work if the separate workspace contains colcon itself as well as all colcon extensions that you intend to use, which in my opinion becomes too much to manage and too situational between different users.

@arjo129

arjo129 commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

Theres a lot of hacks people can do to get colcon working. Personally, I use a venv and alias that venv when I need it. However, expecting beginners to build workspaces and venvs is a bit too much. That being said I havent yet dived into why pixi is broken in this draft PR. It seems to have something to do with ros-env. I'll debug it next week.

For now the docker instructions work just fine. Docker is now available across most major platforms and in any case when we actually deploy things in the cloud docker is the default tool of choice.

@mxgrey mxgrey moved this from Inbox to In Review in PMC Board Jun 30, 2026
@mxgrey mxgrey moved this from In Review to In Progress in PMC Board Jun 30, 2026
@arjo129
arjo129 force-pushed the arjoc/chore/ci-pixi branch from 7800bf2 to 6fe02ae Compare June 30, 2026 08:35
arjo129 added 5 commits June 30, 2026 08:41
For folks who like pixi and want to test things out using pixi.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
@arjo129
arjo129 force-pushed the arjoc/chore/ci-pixi branch from 6fe02ae to df7a04f Compare June 30, 2026 08:41
Comment thread pixi.toml
# Install cargo-ament-build into the pixi environment's bin folder
setup-cargo = "test -f $CONDA_PREFIX/bin/cargo-ament-build || cargo install cargo-ament-build --root $CONDA_PREFIX"
# Build messages first
build-msgs = { cmd = "colcon build --packages-select rmf_prototype_msgs", depends-on = ["setup-cargo"], env = { LIBCLANG_PATH = "$CONDA_PREFIX/lib" } }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I seem to have needed to do this hack otherwise for whatever reason the ament_prefix_path was not being updated correctly. Ironically this works just fine on the docker image so Im not exactly sure whats going wrong.

@arjo129
arjo129 requested review from Copilot and mxgrey June 30, 2026 08:45
@arjo129
arjo129 marked this pull request as ready for review June 30, 2026 08:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds Pixi-based developer workflow and CI to build/test the ROS 2 + Rust workspace without relying on Docker, and aligns rmf_path_visualizer with the existing ros-env dependency pattern used elsewhere in the repo.

Changes:

  • Introduce a pixi.toml workspace with build/test tasks for colcon + Rust tooling.
  • Add a dedicated GitHub Actions workflow to run pixi run test on pushes/PRs targeting epic/next-gen-base.
  • Update rmf_path_visualizer to use ros-env for ROS message types and simplify its Cargo dependencies.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pixi.toml Defines Pixi environment + tasks to set up Rust tooling, build message package first, then build & test the workspace.
path_server/rmf_path_visualizer/src/main.rs Switches message imports to ros_env::* and applies small formatting cleanup.
path_server/rmf_path_visualizer/Cargo.toml Replaces per-message crate deps with ros-env = "0.2.0".
.gitignore Stops ignoring some previously listed paths; adds ignores for Pixi and Cargo local dirs.
.github/workflows/pixi.yml Adds CI job that installs Pixi env and runs the Pixi test task.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pixi.toml
build = { cmd = "colcon build --packages-skip rmf_prototype_msgs", depends-on = ["build-msgs"], env = { LIBCLANG_PATH = "$CONDA_PREFIX/lib", AMENT_PREFIX_PATH = "$PIXI_PROJECT_ROOT/install/rmf_prototype_msgs:$CONDA_PREFIX" } }

# Run tests
test = { cmd = "colcon test --packages-select rmf_path_server_test --python-testing pytest --event-handlers console_direct+", depends-on = ["build"], env = { LIBCLANG_PATH = "$CONDA_PREFIX/lib" } }
Comment thread pixi.toml

[tasks]
# Install cargo-ament-build into the pixi environment's bin folder
setup-cargo = "test -f $CONDA_PREFIX/bin/cargo-ament-build || cargo install cargo-ament-build --root $CONDA_PREFIX"
Comment on lines +20 to +22
with:
run-install: true
cache-key: pixi-env-cache
@arjo129
arjo129 force-pushed the arjoc/chore/ci-pixi branch 2 times, most recently from d9e777f to df7a04f Compare June 30, 2026 09:08
@arjo129
arjo129 marked this pull request as draft June 30, 2026 09:15
arjo129 added 3 commits June 30, 2026 09:22
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants