ros-industrial / robotiq

Robotiq packages (http://wiki.ros.org/robotiq)
BSD 2-Clause "Simplified" License
232 stars 382 forks source link

Moved publishers and service for force_torque_sensor to private namespace #91

Closed NikolasE closed 7 years ago

NikolasE commented 7 years ago

So far, the publishers and the service have been in the global namespace. This does not work for multiple sensors and also make configuring interfaces harder as you have to pass the name of the publishers and the service if the node should be able to use both. With the current version, an interface node only gets the node name and can either add the names or use topictools to find the correct topic names.

shaun-edwards commented 7 years ago

@NikolasE, thanks for the contribution. Is there a reason that node namespacing with the ns argument in a launch file cannot be used to enable multiple sensors? See here.

NikolasE commented 7 years ago

This would be a workaround and would lead to long names. The names "robotiq_force_torque_sensor" and "robotiq_force_torque_wrench" look like the author already had some kind of namespace in mind. I think it's better if the default behaviour would already provide the namespace instead of having to add a parameter.

Using multiple sensors is a different issue, currently, the driver just tries all /dev/* so that there is no way to select a specific sensor.

shaun-edwards commented 7 years ago

The default behavior in ROS is to list services and topics in the node's namespace. If the number of topics/services is large, then I have seen some namespace hierarchy utilized. I've also seen "utility" topics and services put in the private node namespace. I'm not sure the robotiq package falls into either of these categories, so we shouldn't divert from the default behavior (IMHO).

My other hesitation would be backwards compatibility. Changing topic/service names can cause pain for others.