Skip to content

Not getting service responses reliably when using CycloneDDS #74

@hidmic

Description

@hidmic

Bug report

Required Info:

  • Operating System:
    • Ubuntu 18.04, both AMD64 and ARM64
  • Installation type:
    • Binaries and from source
  • Version or commit hash:
  • DDS implementation:
    • CycloneDDS
  • Client library (if applicable):
    • rclcpp only

Steps to reproduce issue

  1. On one terminal, run:
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run demo_nodes_cpp add_two_ints_server
  1. On another terminal, run:
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run demo_nodes_cpp add_two_ints_client_async

Expected behavior

A single service call takes place and succeeds i.e. you get logs on each terminal:

[INFO] [add_two_ints_server]: Incoming request
a: 2 b: 3
[INFO] [add_two_ints_client]: Result of add_two_ints: 5

Actual behavior

The client hangs with no output though the server does log so it appears to have received the request.

Additional information

It does not happen on rclpy. It also does not happen if bringing up both nodes via launch e.g.:

from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description():
    return LaunchDescription([
        Node(
            package='demo_nodes_cpp',
            node_executable='add_two_ints_server',
            output='screen'
        ),
        Node(
            package='demo_nodes_cpp',
            node_executable='add_two_ints_client_async',
            output='screen'
        )
    ])

So it's likely a race.

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