Skip to content

Failed cross-machine communication between ROS2 (Humble) and ROS1 (Kinetic) - ROS2 topic visible but no data when subscribing #466

@Xiaomi0707

Description

@Xiaomi0707

Generated by Generative AI

No response

Operating System:

ubuntu 22.04

ROS version or commit hash:

humble

RMW implementation (if applicable):

No response

RMW Configuration (if applicable):

No response

Client library (if applicable):

No response

'ros2 doctor --report' output

ros2 doctor --report
<COPY OUTPUT HERE>

Steps to reproduce issue

ROS 2 distro: Humble
OS:
- Warthog PC: Ubuntu 20.04
- Client PC: Ubuntu 22.04
Network: Ethernet (direct connection)

Steps to reproduce the issue

  1. Connect client PC(ROS2) to Robot PC(ROS1) via Ethernet
  2. Ensure both machines are on same subnet and can ping each other
  3. On client PC, create a docker with ROS1 Noetic and ROS2 Humble environment, and install ros1bridge.
  4. Run the docker, inside the docker container
    5. source ROS1 and ROS2 environment.
    6. run ros2 run ros1_bridge dynamic_bridge→ see "crated 1to2 bridge for topic '/imu/data' "
  5. Open a new commander on ROS2 pc, source the ROS2 environment, run ros2 topic list→ Topics are visible
  6. Try to subscribe: ros2 topic echo /imu/data
    → No output (hangs indefinitely)

Expected behavior

ros2 topic echo should print incoming messages from the topic.

Actual behavior

Topic is visible. No messages are received when subscribing.

Additional information

Any guidance on debugging why messages are not delivered despite successful topic discovery would be greatly appreciated!

For additional information,

  • The Dockerfile we used to create the docker container that runs rosbridge.
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-c"]
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
# Base system + build deps
RUN apt-get update && apt-get install -y --no-install-recommends \
    locales \
    tzdata \
    curl \
    gnupg2 \
    lsb-release \
    ca-certificates \
    build-essential \
    cmake \
    git \
    wget \
    vim \
    nano \
    python3 \
    python3-pip \
    python3-dev \
    python3-setuptools \
    python3-wheel \
    python3-venv \
    python3-yaml \
    python3-nose \
    python3-pytest \
    pkg-config \
    libboost-all-dev \
    libconsole-bridge-dev \
    libtinyxml2-dev \
    libasio-dev \
    libeigen3-dev \
    libssl-dev \
    libyaml-cpp-dev \
    libcurl4-openssl-dev \
    libpython3-dev && \
    locale-gen en_US en_US.UTF-8 && \
    update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
    rm -rf /var/lib/apt/lists/*
# Python tools needed for ROS 2 source build
RUN python3 -m pip install --no-cache-dir -U \
    pip \
    vcstool \
    colcon-common-extensions \
    rosdep \
    rosdistro \
    catkin-pkg \
    empy
# ROS 1 Noetic repo
RUN echo "deb http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros1.list && \
    curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -
# ROS 1 Noetic
RUN apt-get update && apt-get install -y --no-install-recommends \
    ros-noetic-ros-base \
    ros-noetic-rosbash \
    ros-noetic-roscpp-tutorials \
    ros-noetic-rospy-tutorials \
    ros-noetic-rostopic \
    ros-noetic-rqt-image-view && \
    rm -rf /var/lib/apt/lists/*
# ROS 2 Humble source workspace
RUN mkdir -p /opt/ros2_humble/src
WORKDIR /opt/ros2_humble
RUN vcs import src < <(curl -s https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos)
RUN rosdep init || true && rosdep update
RUN apt-get update && rosdep install --from-paths src --ignore-src -r -y
RUN python3 -m pip install --no-cache-dir --ignore-installed empy==3.3.4
RUN source /opt/ros/noetic/setup.bash && \
    colcon build --symlink-install
# ros1_bridge
RUN mkdir -p /opt/ros1_bridge/src
WORKDIR /opt/ros1_bridge/src
RUN git clone https://github.com/ros2/ros1_bridge
WORKDIR /opt/ros1_bridge
RUN source /opt/ros/noetic/setup.bash && \
    source /opt/ros2_humble/install/setup.bash && \
    colcon build --symlink-install
# Environment setup
RUN echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc && \
    echo "source /opt/ros2_humble/install/setup.bash" >> /root/.bashrc && \
    echo "source /opt/ros1_bridge/install/setup.bash" >> /root/.bashrc
WORKDIR /root
CMD ["bash"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions