ensenso / ros_driver

Official ROS driver for Ensenso stereo cameras.
http://wiki.ros.org/ensenso_driver
BSD 3-Clause "New" or "Revised" License
29 stars 25 forks source link

Starting cameranode takes longer than wait_for_server #6

Closed mklomp closed 6 years ago

mklomp commented 6 years ago

When staring the camera-node it consistently takes about 22 seconds for the camera to be opened.

[ INFO] [**1518085380.386794234**]: Initializing nodelet with 4 worker threads. [ INFO] [**1518085402.302794783**]: Opened camera with serial number 'xxxxxx'.

The wait_for_server in e.g. imagestream and request_data is set to 10 seconds. Therefore I get a timeout error when starting the camera-node and request_data from one launchfile (same holds for texture_pointcloud.launch)

saierd commented 6 years ago

This is true. Some camera models can take quite long to open, so I increased the timeout. Thank you for reporting this.

gavanderhoorn commented 6 years ago

Would it be nice to make this a configuration parameter?

That way the timeout could be configurable by the user. I can imagine that for some cameras, it's either 10 seconds in which it should come up, or not at all (for example). Having to wait 60 seconds for things to time out would introduce a lot of waiting.

saierd commented 6 years ago

That makes sense, I added a parameter for changing the timeout.

I kept the long timeout by default, though. When the script is launched together with a camera node, it should wait. If something went wrong while opening the camera, the user will still get an error from the camera node before the timeout passed.