ros2 install_error ai_generated true

RMW_IMPLEMENTATION=rmw_fastrtps_cpp: Failed to find RMW implementation: 'rmw_fastrtps_cpp' not found in package list

ID: ros2/rmw-implementation-not-found

Also available as: JSON · Markdown · 中文
95%Fix Rate
90%Confidence
1Evidence
2023-04-20First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
Humble active
Iron active
Jazzy active
Rolling active

Root Cause

The specified RMW implementation package is not installed in the ROS2 environment, often due to incomplete installation or incorrect workspace sourcing.

generic

中文

指定的RMW实现包未安装在ROS2环境中,通常由安装不完整或工作空间源设置错误导致。

Official Documentation

https://docs.ros.org/en/rolling/Concepts/About-RMW-Implementations.html

Workarounds

  1. 95% success Install the missing RMW implementation package using apt.
    Install the missing RMW implementation package using apt.
  2. 90% success List available RMW implementations and choose an installed one.
    List available RMW implementations and choose an installed one.
  3. 85% success Ensure the ROS2 setup script is sourced before checking RMW availability.
    Ensure the ROS2 setup script is sourced before checking RMW availability.

中文步骤

  1. Install the missing RMW implementation package using apt.
  2. List available RMW implementations and choose an installed one.
  3. Ensure the ROS2 setup script is sourced before checking RMW availability.

Dead Ends

Common approaches that don't work:

  1. Setting RMW_IMPLEMENTATION to a random string like 'rmw_cyclonedds_cpp' without installing it 90% fail

    Only installed RMW implementations are available; setting an uninstalled one causes the same error.

  2. Rebuilding all packages with colcon build 50% fail

    The RMW implementation is a system package, not a workspace package; rebuilding doesn't install it.

  3. Setting RMW_IMPLEMENTATION in .bashrc without sourcing the ROS2 setup file 60% fail

    The environment variable is set but the ROS2 installation isn't sourced, so packages aren't found.