22 #ifndef _RENDERING_CAMERA_HH_
23 #define _RENDERING_CAMERA_HH_
25 #include <boost/enable_shared_from_this.hpp>
42 #include "gazebo/msgs/MessageTypes.hh"
54 class CompositorInstance;
66 class GaussianNoiseCompositorListener;
76 class Camera :
public boost::enable_shared_from_this<Camera>
83 bool _autoRender =
true);
93 public:
virtual void Load();
96 public:
virtual void Init();
122 public:
virtual void Update();
127 public:
virtual void Fini();
206 public:
void SetImageSize(
unsigned int _w,
unsigned int _h);
250 unsigned int _height,
251 const std::string &_format);
258 public:
double GetZValue(
int _x,
int _y);
279 public:
bool SaveFrame(
const std::string &_filename);
338 public:
virtual const unsigned char *
GetImageData(
unsigned int i = 0);
342 public: std::string
GetName()
const;
346 public:
void SetName(
const std::string &_name);
403 bool _inheritOrientation,
404 double _minDist = 0.0,
double _maxDist = 0.0);
408 public:
void TrackVisual(
const std::string &_visualName);
422 public:
template<
typename T>
439 public:
static bool SaveFrame(
const unsigned char *_image,
440 unsigned int _width,
unsigned int _height,
int _depth,
441 const std::string &_format,
442 const std::string &_filename);
459 public:
bool IsVisible(
const std::string &_visualName);
480 boost::function<
void()> _onComplete =
NULL);
512 bool _inheritOrientation,
513 double _minDist = 0,
double _maxDist = 0);
525 bool _inheritOrientation,
526 double _minDist = 0,
double _maxDist = 0);
543 private:
void ConvertRGBToBAYER(
unsigned char *_dst,
unsigned char *_src,
544 std::string _format,
int _width,
int _height);
547 private:
void SetClipDist();
552 private:
static int GetOgrePixelFormat(
const std::string &_format);
556 private:
void CreateCamera();
629 unsigned int,
unsigned int,
unsigned int,
657 private:
static unsigned int cameraCounter;
660 private: Ogre::CompositorInstance *dsGBufferInstance;
663 private: Ogre::CompositorInstance *dsMergeInstance;
666 private: Ogre::CompositorInstance *dlGBufferInstance;
669 private: Ogre::CompositorInstance *dlMergeInstance;
672 private: Ogre::CompositorInstance *ssaoInstance;
675 private: Ogre::CompositorInstance *gaussianNoiseInstance;
678 private: boost::shared_ptr<GaussianNoiseCompositorListener>
679 gaussianNoiseCompositorListener;
682 private: std::deque<std::pair<math::Pose, double> > moveToPositionQueue;
697 private:
enum NoiseModelType
705 private:
bool noiseActive;
708 private:
enum NoiseModelType noiseType;
712 private:
double noiseMean;
716 private:
double noiseStdDev;