Skip to content

Service introspection cpp #885

@Yadunund

Description

@Yadunund

Setup

  • DDS vendor: Cyclone
  • BuildType: Debian
  • Os: Ubuntu Jammy
  • Chip: Amd64

Links

Checks

  • Run the client and server

    details

    Try

    1. # User input in terminal 1
      ros2 launch demo_nodes_cpp introspect_services_launch.py
    2. # User input in terminal 2
      ros2 topic list --include-hidden-topics

    Expect

    1. # stdout in terminal 1
      [introspection_service-1] a: 2 b: 3
      [introspection_client-2] [INFO] [1680585324.964598437] [introspection_client]: Result of add_two_ints: 5
    2. # stdout in terminal 2
      /parameter_events
      /rosout
  • Configure service to send introspection metadata

    details

    Try

    1. # User input in terminal 1
      ros2 launch demo_nodes_cpp introspect_services_launch.py
    2. # User input in terminal 2
      ros2 param set /introspection_service service_configure_introspection metadata
    3. # User input in terminal 2
      ros2 topic echo /add_two_ints/_service_event

    Expect

    1. # stdout in terminal 1
      [introspection_service-1] a: 2 b: 3
      [introspection_client-2] [INFO] [1680585324.964598437] [introspection_client]: Result of add_two_ints: 5
    2. # stdout in terminal 2
      info:
        event_type: 1
        stamp:
          sec: 1680586531
          nanosec: 726539263
        client_gid:
        - 83
        - 143
        - 248
        - 38
        - 47
        - 231
        - 185
        - 230
        - 98
        - 17
        - 45
        - 187
        - 128
        - 124
        - 253
        - 156
        sequence_number: 46
      request: []
      response: []
      ---
      info:
        event_type: 2
        stamp:
          sec: 1680586531
          nanosec: 726695003
        client_gid:
        - 83
        - 143
        - 248
        - 38
        - 47
        - 231
        - 185
        - 230
        - 98
        - 17
        - 45
        - 187
        - 128
        - 124
        - 253
        - 156
        sequence_number: 46
      request: []
      response: []
  • Configure client to send introspection metadata

    details

    Try

    1. # User input in terminal 1
      ros2 launch demo_nodes_cpp introspect_services_launch.py
    2. # User input in terminal 2
      ros2 param set /introspection_client client_configure_introspection metadata
    3. # User input in terminal 2
      ros2 topic echo /add_two_ints/_service_event

    Expect

    1. # stdout in terminal 1
      [introspection_service-1] a: 2 b: 3
      [introspection_client-2] [INFO] [1680585324.964598437] [introspection_client]: Result of add_two_ints: 5
    2. # stdout in terminal 2
      info:
        event_type: 0
        stamp:
          sec: 1680586637
          nanosec: 158736272
        client_gid:
        - 1
        - 16
        - 34
        - 142
        - 114
        - 128
        - 207
        - 116
        - 98
        - 246
        - 204
        - 52
        - 0
        - 0
        - 0
        - 7
        sequence_number: 48
      request: []
      response: []
      ---
      info:
        event_type: 3
        stamp:
          sec: 1680586637
          nanosec: 159157853
        client_gid:
        - 1
        - 16
        - 34
        - 142
        - 114
        - 128
        - 207
        - 116
        - 98
        - 246
        - 204
        - 52
        - 0
        - 0
        - 0
        - 7
        sequence_number: 48
      request: []
      response: []

You can find the code used to generate this test case here

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions