17 #include <gazebo/sensors/DepthCameraSensor.hh>
18 #include <gazebo/sensors/CameraSensor.hh>
31 MultiCameraPlugin::~MultiCameraPlugin()
42 gzerr <<
"Invalid sensor pointer.\n";
46 dynamic_pointer_cast<sensors::MultiCameraSensor>(_sensor);
50 gzerr <<
"MultiCameraPlugin requires a CameraSensor.\n";
51 if (dynamic_pointer_cast<sensors::DepthCameraSensor>(_sensor))
52 gzmsg <<
"It is a depth camera sensor\n";
53 if (dynamic_pointer_cast<sensors::CameraSensor>(_sensor))
54 gzmsg <<
"It is a camera sensor\n";
59 gzerr <<
"MultiCameraPlugin not attached to a camera sensor\n";
63 for (
unsigned int i = 0; i < this->
parentSensor->CameraCount(); ++i)
68 this->
width.push_back(this->
camera[i]->ImageWidth());
70 this->
depth.push_back(this->
camera[i]->ImageDepth());
73 std::string cameraName = this->
parentSensor->Camera(i)->Name();
77 if (cameraName.find(
"left") != std::string::npos)
81 this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4, boost::placeholders::_5)));
83 else if (cameraName.find(
"right") != std::string::npos)
87 this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4, boost::placeholders::_5)));