Skip to content

colcon build fails when creating a subscriber for sensor_msgs::msg::PointCloud2 due to yanked sensor_msgs crate. #535

@Santoi

Description

@Santoi

Description:

When I attempt to build a ROS 2 Rust node that subscribes to a topic using sensor_msgs::msg::PointCloud2 messages, the colcon build process fails. The error message indicates that the sensor_msgs crate is yanked from crates.io, preventing the build from completing successfully.

Any help on how to make correct use of this message is appreciated.

Here is the forked repo branch: https://github.com/Santoi/ros2_rust/tree/slopez/rclrs_demo.

Error Message:

$ colcon build
. . .
Starting >>> rclrs
--- stderr: rclrs
error: failed to select a version for the requirement `sensor_msgs = "*"`
  version 4.2.3 is yanked
location searched: crates.io index
required by package `rclrs_demo v0.1.0 (/workspace/src/ros2_rust/rclrs_demo)`
---
Failed <<< rclrs [2.44s, exited with code 1]
. . .

Steps to Reproduce:

  1. Create a new ROS2 Rust package within ros2_rust repository.
  2. Add a dependency on sensor_msgs to the Cargo.toml file.
  3. Create a subscriber for a topic using the sensor_msgs::msg::PointCloud2 message type.
  4. Attempt to build the package using colcon build.

Additional Context:

  • ros2_rust version: 0.5.1
  • ROS 2 distribution: Humble
  • Operating System: Ubuntu 22.04
  • Cargo.toml dependencies:

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