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

[Question] Custom vs Standard service types #624

Open
bjsowa opened this issue Sep 7, 2020 · 4 comments
Open

[Question] Custom vs Standard service types #624

bjsowa opened this issue Sep 7, 2020 · 4 comments

Comments

@bjsowa
Copy link
Contributor

bjsowa commented Sep 7, 2020

I noticed that you define a custom service type for each service in the zed_interfaces package. Why not just use a standard service types like std_srvs/SetBool and std_srvs/Trigger for most of the services?
This way, other clients in the ROS network won't need to build the zed_interfaces package to, for example, reset the odometry.

I know that changing the ROS API can break some applications that use the current one, but I would like you to at least consider this in the future.

@Myzhar
Copy link
Member

Myzhar commented Sep 7, 2020

Hi @bjsowa
can you explain better what you mean and how you'd make such a feature?
SetBool and Trigger do not have extended information, how can the node understand what service must be enabled/disabled/triggered?

@bjsowa
Copy link
Contributor Author

bjsowa commented Sep 7, 2020

To give you an example:

You define zed_interfaces/reset_odometry type for the reset_odometry service. Instead, you could use the std_srvs/Trigger type and return the bool value in the success variable.

@Myzhar
Copy link
Member

Myzhar commented Sep 7, 2020

Ah ok, that's clear. Yes, you are right. They are defined in the same way.
However you cannot avoid using the zed_interfaces package because there are custom messages for the Object Detection module and the ZED2 sensors.
But it could be useful to call ZED services from other nodes without adding the zed_interfaces dependency

@Myzhar
Copy link
Member

Myzhar commented Sep 30, 2020

Tested this suggestion writing the new ROS2 wrapper for ROS2 Eloquent (stereolabs/zed-ros2-wrapper@61ff87e , stereolabs/zed-ros2-wrapper@7dd5970), it's a good suggestion and it will be replicated here with the new version that will be released with the new ZED SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants