-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Service Introspection] Support deserializing bytes type data for echoing #17
base: rolling
Are you sure you want to change the base?
Conversation
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.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.
This adds a new dependency on rclpy. I guess this doesn't create a dependency cycle, but IMO, it seems a bit strange to add a dependency on a client library to a rosidl package (it is usually the other way around).
I'm not sure I understand the point about deserializing values in ros2 topic echo
. All values being echo'd are already deserialized, and the user can opt-in to echoing serialized data with the --raw
option. Note, we decided to handle that case separately from the utility functions in rosidl_runtime_py
:
I think the case where a message field has a serialized message as the value is a pretty niche case and not worth the added complexity of handling here (or in ros2topic). For service introspection, I would just do the deserialization directly in ros2service.
I see, make sense and adding a dependency on a client library to a rosidl package is indeed strange I guess, didn't thought about it. I will close this PR and iterate on the service echo PR to do deserialisation their itself. I think one of the main reasons for using the existing conversion pipeline was that Thanks for the review! |
That's a good point. After looking at ros2/ros2cli#732, I see why you chose this solution. Maybe we can still use the utilities in |
From the name of this package I'm surprised it didn't create a dependency cycle, but I'm not super familiar with where this is used. How about moving Line 6 in 092b6ed
|
yeah, we can do that makes sense. I checked further and seems like One thing to note maybe is that a corresponding @jacobperron any thoughts on this one |
I'd recommend leaving the API's in |
I see, makes sense. Thanks! |
Related to the proposed service introspection REP (ros-infrastructure/rep#360).
This PR modifies the existing converter utility functions to support deserializing of bytes/bytesarray data type. This is useful for deserializing the service contents and echoing service contents to the user. Depends on ros2/ros2cli#732
Connects to: ros2/ros2#1285
Unrelated to Service Introspection REP:
The proposed changes can also be used to support deserializing of contents in
ros2 topic echo
by supporting an optional argument for--deserialize_msg_type
, the utility can then be used to deserialize the bytes type to the user specified msg type.Signed-off-by: deepanshu deepanshubansal01@gmail.com