Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dds-sniffer with --topics, topic-info #13661

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

maloel
Copy link
Collaborator

@maloel maloel commented Jan 7, 2025

When doing some ROS work I needed to see topic information but the dds-sniffer output was insufficient. I added so we can now see:

$ ./Release/rs-dds-sniffer -d 0 --participants --topics
5898d32b8091.0  rs-dds-adapter
    R  realsense/D455_214623065416/control                               [ realdds::topics::raw::flexible reliable ]
     W realsense/D455_214623065416/metadata                              [ realdds::topics::raw::flexible best-effort ]
     W realsense/D455_214623065416/notification                          [ realdds::topics::raw::flexible reliable ]
     W realsense/device-info                                             [ realdds::topics::raw::flexible reliable ]
    R  rq/realsense/D455_214623065416/describe_parametersRequest         [ rcl_interfaces::srv::dds_::DescribeParameters_Request_ reliable ]
    R  rq/realsense/D455_214623065416/get_parametersRequest              [ rcl_interfaces::srv::dds_::GetParameters_Request_ reliable ]
    R  rq/realsense/D455_214623065416/list_parametersRequest             [ rcl_interfaces::srv::dds_::ListParameters_Request_ reliable ]
    R  rq/realsense/D455_214623065416/set_parametersRequest              [ rcl_interfaces::srv::dds_::SetParameters_Request_ reliable ]
     W rr/realsense/D455_214623065416/describe_parametersReply           [ rcl_interfaces::srv::dds_::DescribeParameters_Response_ reliable ]
     W rr/realsense/D455_214623065416/get_parametersReply                [ rcl_interfaces::srv::dds_::GetParameters_Response_ reliable ]
     W rr/realsense/D455_214623065416/list_parametersReply               [ rcl_interfaces::srv::dds_::ListParameters_Response_ reliable ]
     W rr/realsense/D455_214623065416/set_parametersReply                [ rcl_interfaces::srv::dds_::SetParameters_Response_ reliable ]
     W rt/realsense/D455_214623065416_Color                              [ sensor_msgs::msg::dds_::Image_ best-effort ]
     W rt/realsense/D455_214623065416_Depth                              [ sensor_msgs::msg::dds_::Image_ best-effort ]
     W rt/realsense/D455_214623065416_Infrared_1                         [ sensor_msgs::msg::dds_::Image_ best-effort ]
     W rt/realsense/D455_214623065416_Infrared_2                         [ sensor_msgs::msg::dds_::Image_ best-effort ]
     W rt/realsense/D455_214623065416_Motion                             [ sensor_msgs::msg::dds_::Imu_ best-effort ]
011040e9be1ec39ac5f91813
    RW ros_discovery_info                                                [ rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_ reliable transient-local ]
    R  rq/camera/camera/describe_parametersRequest                       [ rcl_interfaces::srv::dds_::DescribeParameters_Request_ reliable ]
    R  rq/camera/camera/get_parameter_typesRequest                       [ rcl_interfaces::srv::dds_::GetParameterTypes_Request_ reliable ]
    R  rq/camera/camera/get_parametersRequest                            [ rcl_interfaces::srv::dds_::GetParameters_Request_ reliable ]
    R  rq/camera/camera/list_parametersRequest                           [ rcl_interfaces::srv::dds_::ListParameters_Request_ reliable ]
    R  rq/camera/camera/set_parametersRequest                            [ rcl_interfaces::srv::dds_::SetParameters_Request_ reliable ]
    R  rq/camera/camera/set_parameters_atomicallyRequest                 [ rcl_interfaces::srv::dds_::SetParametersAtomically_Request_ reliable ]
     W rr/camera/camera/describe_parametersReply                         [ rcl_interfaces::srv::dds_::DescribeParameters_Response_ reliable ]
     W rr/camera/camera/get_parameter_typesReply                         [ rcl_interfaces::srv::dds_::GetParameterTypes_Response_ reliable ]
     W rr/camera/camera/get_parametersReply                              [ rcl_interfaces::srv::dds_::GetParameters_Response_ reliable ]
     W rr/camera/camera/list_parametersReply                             [ rcl_interfaces::srv::dds_::ListParameters_Response_ reliable ]
     W rr/camera/camera/set_parametersReply                              [ rcl_interfaces::srv::dds_::SetParameters_Response_ reliable ]
     W rr/camera/camera/set_parameters_atomicallyReply                   [ rcl_interfaces::srv::dds_::SetParametersAtomically_Response_ reliable ]
    RW rt/parameter_events                                               [ rcl_interfaces::msg::dds_::ParameterEvent_ reliable ]
     W rt/rosout                                                         [ rcl_interfaces::msg::dds_::Log_ reliable transient-local ]
  • Had to change on_writer_added and on_reader_added listener callbacks in dds-participant so they can provide actual QoS
  • Then take that QoS and easily stream as a string
  • Added --topics to rs-dds-sniffer

I actually prefer the output of --participants --topics to the default output of --snapshot...

@@ -607,28 +637,69 @@ void dds_sniffer::print_topics() const
}
}

void dds_sniffer::print_participants( bool with_guids ) const
void dds_sniffer::print_participants( bool with_topics, bool with_guids ) const
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we neen with_guids as a parameter?
Currently always true, plus some participants might don't have a name or multiple participants have the same name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but left as-is since it was there...

Copy link
Contributor

@OhadMeir OhadMeir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a minor comment

@maloel maloel merged commit 485acf1 into IntelRealSense:development Jan 8, 2025
23 checks passed
@maloel maloel deleted the dds-sniffer branch January 8, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants