-
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
Implement functions to get publisher and subcription informations like QoS policies from topic name #454
Implement functions to get publisher and subcription informations like QoS policies from topic name #454
Conversation
08075e4
to
982a88e
Compare
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
a89e0a9
to
c17c401
Compare
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. Two minor comments
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 for the last nit standing
f205f2a
to
140e9d3
Compare
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.
Left a minimal comment, otherwise LGTM!
a3272a5
to
50018e8
Compare
Signed-off-by: Miaofei <miaofei@amazon.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
Sorry for the delay. I haven't been able to get around to finishing the |
cc07683
to
3a0c105
Compare
I have added topic name remapping to |
Signed-off-by: Miaofei <miaofei@amazon.com>
3a0c105
to
b34b127
Compare
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, setting aside some small comments.
rclpy/rclpy/node.py
Outdated
return infos | ||
|
||
def get_publishers_info_by_topic( | ||
self, topic_name: str, no_mangle: bool = False) -> List[TopicEndpointInfo]: |
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 style doesn't look correct to me, I'd expect:
def get_publishers_info_by_topic(
self, topic_name: str, no_mangle: bool = False
) -> List[TopicEndpointInfo]:
"""
...
"""
# ...
Or
def get_publishers_info_by_topic(
self,
topic_name: str,
no_mangle: bool = False
) -> List[TopicEndpointInfo]:
"""
...
"""
# ...
There are a few other places this applies in this pull request.
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.
Done.
rclpy/rclpy/node.py
Outdated
def get_publishers_info_by_topic( | ||
self, topic_name: str, no_mangle: bool = False) -> List[TopicEndpointInfo]: | ||
""" | ||
Return a list of publishers publishing to a given topic. |
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.
nitpick: a publisher doesn't need to be "publishing" on the topic to be seen here, technically I'd say "list of publishers on a given topic" or "list of publishers that have advertised on a given topic"
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.
Done.
Signed-off-by: Miaofei <miaofei@amazon.com>
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!
@mm318 can you check the build failures? |
Hi @ivanpauno, did you include the changes in ros2/rcl#558? |
Thanks! I didn't remember about that PR. Another run: |
@mm318 The errors seem to be due to the following:
|
Signed-off-by: Miaofei <miaofei@amazon.com>
The issues found on Linux and Windows should be fixed now. |
Once the fastrtps issue is fixed, can you re-run these @ivanpauno? |
I think the test failures in the Windows build are unrelated. What do you think? |
Yes, I'm wating the macOS job. |
NOTE: DO NOT MERGE until rmw #186, rmw_implementation #72 and rcl #511 are merged.
This PR makes the necessary changes to implement this feature request. The
RCLPY
layer needs to expose functions to theros2cli
layer such thatros2 topic info <topic_name>
can display publisher and subscriptions information for the giventopic_name
.Summary of changes:
common.h/c
to convertrmw_topic_info_array_t
to a Python list of dictionaries.get_publishers_info_by_topic
andget_subscriptions_info_by_topic
innode.py
rclpy_get_publishers_info_by_topic
andrclpy_get_subscriptions_information_by_topic
in_rclpy.c
node.get_publishers_info_by_topic
andnode.get_subscriptions_info_by_topic
Related to issues in aws-roadmap #85