Skip to content

Hard time installing ros2_rust with pixi #587

@Nicodaube

Description

@Nicodaube

Hi everyone !

I'm new to rclrs. I'm trying to create a project using both rclrs and pixi in kilted. I have an error saying :

error[E0277]: the trait bound `std_msgs::msg::String: MessageIDL` is not satisfied
    --> src/simple_subscriber.rs:7:17
     |
   7 |     subscriber: WorkerSubscription<StringMsg, Option<String>>,
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MessageIDL` is not implemented for `std_msgs::msg::String`
     |
note: there are multiple different versions of crate `rosidl_runtime_rs` in the dependency graph

Here is the steps I followed :

  • I created a ws and installed pixi
mkdir rclrs_install_ws
cd rclrs_install_ws
pixi install
  • I then installed stuff in my pixi.toml
[workspace]
authors = [
    "Nicodaube <nicolas.daube@xxx.be>"    
]
channels = ["robostack-kilted", "conda-forge"]
name = "rclrs_install_ws"
platforms = ["linux-64"]
version = "0.1.0"

[activation]
scripts = ["install/setup.sh"]

[tasks]
build = "colcon build --symlink-install"
clean = "rm -rf build/ install/ log/ .cargo/"

[dependencies]
ros-kilted-desktop = ">=0.12.0,<0.13"
colcon-common-extensions = ">=0.3.0,<0.4"
rust-src = ">=1.92.0,<2"
setuptools = ">=65.0.0,<70"
rust = ">=1.92.0,<1.93"
vcstool = ">=0.3.0,<0.4"
python = ">=3.12.12,<3.13"
cmake = ">=3.25"
compilers = "*"
make = "*"
pkg-config = "*"
ninja = "*"


[pypi-dependencies]
colcon-cargo = { git = "https://github.com/colcon/colcon-cargo.git" }
colcon-ros-cargo = { git = "https://github.com/colcon/colcon-ros-cargo.git" }
  • Then I tried to follow the steps in the docs/building.md file. I cloned ros2_rust in my pixi workspace, which contains the ros install, colcon cargo and colcon-ros-cargo. Then I imported the repos using vcs and the ros2_rust_kilted.repos file ros2_rust.

Then I tried to build everything with colcon build --symlink-install, and only got a failed plugin in rust_pubsub.

My main suspect is this warning : [0.252s] colcon.colcon_ros.prefix_path.ament WARNING The path '/home/$$$/rclrs_install_ws/install/std_msgs' in the environment variable AMENT_PREFIX_PATH doesn't exist.

I saw that the docs was outdated, but I don't know if this is related or if I did something wrong ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions