Skip to content

[Humble] Cannot echo /statistics topic #1341

@EduPonz

Description

@EduPonz

Bug report

Required Info:

  • Operating System: Ubuntu 22.04
  • Installation type: Binaries (ros:humble docker image)
  • Version or commit hash: latest as of now (9bf1a5b14fd9)
  • DDS implementation: Fast DDS (rmw_fastrtps)
  • Client library (if applicable): I believe ros2 topic echo leverages rclpy

Steps to reproduce issue

FROM ros:humble

SHELL ["/bin/bash", "-c"]

WORKDIR /root/demos/src
RUN git clone https://github.com/ros2/demos.git

WORKDIR /root/demos/
RUN source /opt/ros/humble/setup.bash && \
    colcon build --event-handlers=console_direct+ --packages-select topic_statistics_demo

RUN echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc
RUN echo 'source /root/demos/install/setup.bash' >> ~/.bashrc
  1. Build the image with:

    docker build -f Dockerfile -t ros2_cli_statistics_bug .
  2. Run the image:

    docker run -it --rm ros2_cli_statistics_bug:latest /bin/bash
  3. From within the container, run the display_topic_statistics application from the topic_statistics_demo package. This will create a publisher and a subscriber on the /topic_statistics_chatter topic. The subscriber will publish statistics onto the /statistics every second. The demo also creates a subscriber to the /statistics topic and displays the statistics on the screen, all of which works alright.

    ros2 run topic_statistics_demo display_topic_statistics string
  4. Open another shell on the same container with:

    docker exec -it <container-id> /bin/bash
  5. Try to echo the /statistics topic from within the new shell. At this point, ros2 topic list shows all the topics correctly, and echoing /topic_statistics_chatter is working, but echoing /statistics does not work.

    source ~/.bashrc
    ros2 topic list # <------------------------------ OK
    ros2 topic echo /topic_statistics_chatter # <---- OK
    ros2 topic echo /statistics # <------------------ NOK

Expected behavior

I would expect ros2 topic echo /statistics to work, as I have not found documentation stating otherwise, please correct me if I'm wrong.

Actual behavior

ros2 topic echo /statistics fails with the following error:

Unable to convert call argument to Python object (compile in debug mode for details)

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