-
Notifications
You must be signed in to change notification settings - Fork 227
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
print history and depth via topic info -v #849
print history and depth via topic info -v #849
Conversation
How it displays. root@a6cfc30c581b:~/docker_ws/ros2_colcon# ros2 run demo_nodes_cpp talker
[INFO] [1636831476.771070892] [talker]: Publishing: 'Hello World: 1'
root@a6cfc30c581b:~/docker_ws/ros2_colcon# ros2 topic info -v /chatter
Type: std_msgs/msg/String
Publisher count: 1
Node name: talker
Node namespace: /
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: 01.10.5a.ea.44.3c.29.8e.ee.fa.4b.9a.00.00.15.03.00.00.00.00.00.00.00.00
QoS profile:
Reliability: RELIABLE
History (Depth): KEEP_LAST (7) !!! HERE !!!
Durability: VOLATILE
Lifespan: Infinite
Deadline: Infinite
Liveliness: AUTOMATIC
Liveliness lease duration: Infinite
Subscription count: 0
root@a6cfc30c581b:~/docker_ws/ros2_colcon# ros2 run demo_nodes_cpp listener
^C[INFO] [1636831516.595457482] [rclcpp]: signal_handler(signum=2)
root@a6cfc30c581b:~/docker_ws/ros2_colcon# ros2 topic info -v /chatter
Type: std_msgs/msg/String
Publisher count: 0
Subscription count: 1
Node name: listener
Node namespace: /
Topic type: std_msgs/msg/String
Endpoint type: SUBSCRIPTION
GID: 01.10.d3.2b.f9.d3.d8.b5.32.38.05.68.00.00.15.04.00.00.00.00.00.00.00.00
QoS profile:
Reliability: RELIABLE
History (Depth): KEEP_LAST (10) !!! HERE !!!
Durability: VOLATILE
Lifespan: Infinite
Deadline: Infinite
Liveliness: AUTOMATIC
Liveliness lease duration: Infinite
|
@clalancette @ivanpauno minor extension to print topic info verbose. could you help review when you got time? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but looks like you'll have to add the history information to the expected test output in test_topic_endpoint_info
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exactly what I was picturing. Agreed with other comment on checking test output. LGTM
I did not know #849 (comment), and it is clearly described that in rmw interface,
thinking about using different rmw implementation, i am not inclined to print i'd like to close this PR if there is no denial or suggestions. |
My suggestion is to fix rmw implementations so they return With that solved, history and history depth could be printed conditionally (if history != UNKNOWN: ...). |
This makes sense to me. Development of large systems with cyclone has been a real pain without being able to inspect the current state of the system. Our original drive from FastDDS to Cyclone under foxy was actually just to get diagnostic output when we had QOS mismatches |
@fujitatomoya @matthews-jca are you planning to contribute the missing pieces in the rmw implementations (see above comment) to make this PR possible? If there's no plan to do that in a near future, we can close this PR and reopen it when the underlying issue is solved. |
@ivanpauno i will try to address in next week! thanks for the ping 👍 |
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
b995525
to
c72b859
Compare
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Verification note,
# RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run demo_nodes_cpp talker
...
# RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 topic info -v /chatter --no-daemon
Type: std_msgs/msg/String
Publisher count: 1
Node name: talker
Node namespace: /
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: 01.10.2c.a6.c6.2e.e4.6e.be.dc.75.d6.00.00.15.03.00.00.00.00.00.00.00.00
QoS profile:
Reliability: RELIABLE
History (Depth): KEEP_LAST (7)
Durability: VOLATILE
Lifespan: Infinite
Deadline: Infinite
Liveliness: AUTOMATIC
Liveliness lease duration: Infinite
Subscription count: 0
it does not set QoS history nor depth during endpoint discovery. # RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run demo_nodes_cpp talker
...
# RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 topic info -v /chatter --no-daemon
Type: std_msgs/msg/String
Publisher count: 1
Node name: talker
Node namespace: /
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: 01.0f.64.e2.c3.73.a8.65.01.00.00.00.00.00.12.03.00.00.00.00.00.00.00.00
QoS profile:
Reliability: RELIABLE
History (Depth): UNKNOWN
Durability: VOLATILE
Lifespan: Infinite
Deadline: Infinite
Liveliness: AUTOMATIC
Liveliness lease duration: Infinite
Subscription count: 0
it tries to set history nor depth if available, but it seems that history is unavailable. # RMW_IMPLEMENTATION=rmw_connextdds ros2 run demo_nodes_cpp talker
...
# RMW_IMPLEMENTATION=rmw_connextdds ros2 topic info -v /chatter --no-daemon
RTI Data Distribution Service Non-commercial license is for academic, research, evaluation and personal use only. USE FOR COMMERCIAL PURPOSES IS PROHIBITED. See RTI_LICENSE.TXT for terms. Download free tools at rti.com/ncl. License issued to Non-Commercial User license@rti.com For non-production use only.
Expires on 00-jan-00 See www.rti.com for more information.
Type: std_msgs/msg/String
Publisher count: 1
Node name: talker
Node namespace: /
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: 01.01.9e.b8.ec.96.a9.9f.5f.a3.c2.8b.80.01.29.03.00.00.00.00.00.00.00.00
QoS profile:
Reliability: RELIABLE
History (Depth): UNKNOWN
Durability: VOLATILE
Lifespan: Infinite
Deadline: Infinite
Liveliness: AUTOMATIC
Liveliness lease duration: Infinite
Subscription count: 0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
address ros2/ros2cli#667
Signed-off-by: Tomoya.Fujita Tomoya.Fujita@sony.com