Francesco Grandis <[EMAIL PROTECTED]> writes:
> So: i have to manipulate the mirror images to create panoramic images, more
> "readable" to the user. I thought to give the model two camera interfaces,
> each one with its image size, data and so on, so the user could decide to see
> only the mirror image, or the panoramic or both by the simulation control.
> Also, to minimize trouble probability, i made a great copy&paste-work from
> existing code :) but the problem is that gazebo seems to consider only the
> second iface created (code below). Looking at other models that use two
> ifaces, i noticed that they use 2 DIFFERENT ifaces (SickLMS200 uses laser and
> fiducial, SonyVID30 uses camera and ptz), so i wonder, is there any problem or
> consideration to be aware of using two ifaces of the same type?
> // OmniCamera mirror interface
> assert(this->mirrorIface);
> if (gz_camera_create(this->mirrorIface, this->world->gz_server,
> this->GetId(), "OmniCam01-mirror", (int) this, (int) this->parent) !=0)
> return -1;
>
> // OmniCamera panoramic interface
> assert(this->panIface);
> if (gz_camera_create(this->panIface, this->world->gz_server, this->GetId(),
> "OmniCam01-panoramic", (int) this, (int) this->parent) !=0)
> return -1;
Solved. The problem was the equal identifier of the interface, i suppose. Using
this code:
assert(this->mirrorIface);
if (gz_camera_create(this->mirrorIface, this->world->gz_server,
"mirror", "OmniCam01", (int) this, (int) this->parent) !=0)
return -1;
assert(this->panIface);
if (gz_camera_create(this->panIface, this->world->gz_server,
"panoramic","OmniCam01", (int) this, (int) this->parent) !=0)
return -1;
it works fine, don't know if it can generate problems elsewhere.
I'm still willing to contribute the plugin, if anyone's interested.
Bye
Francesco
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo