I want to capture an image from the camera of Pepper, so first I subscribe to a camera using subscribeCamera
method. I have seen the documentation.
So the function needs some parameters:
std::string ALVideoDeviceProxy::subscribeCamera(
const std::string& Name,
const int& CameraIndex,
const int& Resolution,
const int& ColorSpace,
const int& Fps)
Parameters:
- Name – Name of the subscribing module.
- CameraIndex – Index of the camera in the video system (see Camera Indexes).
- Resolution – Resolution requested (see Supported resolutions).
- ColorSpace – Colorspace requested (see Supported colorspaces).
- Fps – Fps (frames per second) requested to the video source (see Supported framerates).
My question is about the first parameter: name, because the documentation says:
Warning
The same Name could be used only six time.
Why the name can be used only 6 times? after the six times the function stops to return a value. So I have to change the name every 6 times?
I think the point is more something like "you couldn't use more than 6 times, without unsusbscribing first".
The subscribe process return you a name to refer to. If this name exists already it will give you another one. like: subscribe( "toto") => toto subscribe( "toto") => toto_2 subscribe( "toto") => toto_3 ... But only 6 times (lazy programmer, but not only, you should have a design problem in this case, eg: forget to unsubscribe).
So I think the "normal way" is to unsubscribe, and then it should do that: subscribe( "toto") => "toto" unsubscribe( "toto") ( "toto" is not used anymore, so the system can use it later) subscribe( "toto") => "toto"