Go to the documentation of this file.
17 #ifndef SDF_CAMERA_HH_
18 #define SDF_CAMERA_HH_
21 #include <ignition/math/Pose3.hh>
26 #include <sdf/sdf_config.h>
31 inline namespace SDF_VERSION_NAMESPACE {
116 public: std::string
Name()
const;
120 public:
void SetName(
const std::string &_name);
294 const ignition::math::Vector2d &_center)
const;
300 public:
const ignition::math::Pose3d &
Pose() const
307 public:
void SetPose(const ignition::math::Pose3d &_pose)
313 public: const ignition::math::Pose3d &RawPose() const;
318 public:
void SetRawPose(const ignition::math::Pose3d &_pose);
324 public: const std::
string &PoseRelativeTo() const;
330 public:
void SetPoseRelativeTo(const std::
string &_frame);
337 public: const std::
string &PoseFrame() const
345 public:
void SetPoseFrame(const std::
string &_frame)
354 public: std::
string LensType() const;
359 public:
void SetLensType(const std::
string &_type);
364 public:
bool LensScaleToHfov() const;
369 public:
void SetLensScaleToHfov(
bool _scale);
373 public:
double LensC1() const;
377 public:
void SetLensC1(
double _c1);
381 public:
double LensC2() const;
385 public:
void SetLensC2(
double _c2);
389 public:
double LensC3() const;
393 public:
void SetLensC3(
double _c3);
397 public:
double LensFocalLength() const;
401 public:
void SetLensFocalLength(
double _f);
406 public: const std::
string &LensFunction() const;
411 public:
void SetLensFunction(const std::
string &_fun);
416 public: ignition::math::Angle LensCutoffAngle() const;
421 public:
void SetLensCutoffAngle(const ignition::math::Angle &_angle);
426 public:
int LensEnvironmentTextureSize() const;
431 public:
void SetLensEnvironmentTextureSize(
int _size);
435 public:
double LensIntrinsicsFx() const;
439 public:
void SetLensIntrinsicsFx(
double _fx);
443 public:
double LensIntrinsicsFy() const;
447 public:
void SetLensIntrinsicsFy(
double _fy);
451 public:
double LensIntrinsicsCx() const;
455 public:
void SetLensIntrinsicsCx(
double _cx);
459 public:
double LensIntrinsicsCy() const;
463 public:
void SetLensIntrinsicsCy(
double _cy);
467 public:
double LensIntrinsicsSkew() const;
471 public:
void SetLensIntrinsicsSkew(
double _s);
477 const std::
string &_format);
486 public: uint32_t VisibilityMask() const;
490 public:
void SetVisibilityMask(uint32_t _mask);
493 private: CameraPrivate *dataPtr =
nullptr;
bool SaveFrames() const
Get whether frames should be saved.
void SetDistortionK2(double _k2)
Set the radial distortion coefficient k2.
double DistortionK3() const
Get the radial distortion coefficient k3.
double DistortionK2() const
Get the radial distortion coefficient k2.
Errors Load(ElementPtr _sdf)
Load the camera sensor based on an element pointer.
double DistortionK1() const
Get the radial distortion coefficient k1.
uint32_t ImageHeight() const
Get the image height in pixels.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
namespace for Simulation Description Format parser
Definition: Actor.hh:33
Camera(Camera &&_camera) noexcept
Move constructor.
void SetSaveFrames(bool _save)
Set whether frames should be saved.
PixelFormatType PixelFormat() const
Get the pixel format.
PixelFormatType
Definition: Camera.hh:40
void SetDistortionP2(double _p2)
Set the tangential distortion coefficient p2.
Camera & operator=(const Camera &_camera)
Assignment operator.
const std::string & SaveFramesPath() const
Get the path in which to save frames.
void SetDistortionK1(double _k1)
Set the radial distortion coefficient k1.
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:89
void SetHasDepthNearClip(bool _near)
Set whether the depth camera near clip distance has been specified.
void SetNearClip(double _near)
Set the near clip distance.
Camera(const Camera &_camera)
Copy constructor.
#define SDFORMAT_VISIBLE
Definition: system_util.hh:48
void SetFarClip(double _far)
Set the far clip distance.
void SetPixelFormat(PixelFormatType _format)
Set the pixel format type.
const ignition::math::Pose3d & Pose() const SDF_DEPRECATED(9.0)
Get the pose of the camer.
The Noise class contains information about a noise model, such as a Gaussian distribution.
Definition: Noise.hh:50
void SetImageWidth(uint32_t _width)
Set the image width in pixels.
class SDFORMAT_VISIBLE SDF_DEPRECATED(9.2) URDF2SDF
URDF to SDF converter.
Definition: parser_urdf.hh:40
std::string Name() const
Get the name of the camera.
void SetDepthFarClip(double _far)
Set the far clip distance for the depth camera.
const ignition::math::Vector2d & DistortionCenter() const
Get the distortion center or principal point.
virtual ~Camera()
Destructor.
double DepthNearClip() const
Get the near clip distance for the depth camera.
Information about a monocular camera sensor.
Definition: Camera.hh:64
bool operator==(const Camera &_alt) const
Return true if both Camera objects contain the same values.
const Noise & ImageNoise() const
Get the image noise values.
void SetPixelFormatStr(const std::string &_fmt)
Set the pixel format from a string.
double DistortionP2() const
Get the tangential distortion coefficient p2.
bool HasDepthCamera() const
Get whether the depth camera was set.
double NearClip() const
Get the near clip distance.
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:53
void SetImageHeight(uint32_t _height)
Set the image height in pixels.
void SetHasDepthCamera(bool _camera)
Set whether the depth camera has been specified.
double DistortionP1() const
Get the tangential distortion coefficient p1.
void SetSaveFramesPath(const std::string &_path)
Set the path in which to save frames.
void SetName(const std::string &_name)
Set the name of the camera.
bool operator!=(const Camera &_alt) const
Return true this Camera object does not contain the same values as the passed in parameter.
ignition::math::Angle HorizontalFov() const
Get the horizontal field of view in radians.
void SetImageNoise(const Noise &_noise)
Set the noise values related to the image.
bool HasDepthNearClip() const
Get whether the depth camera near clip distance was set.
void SetHasDepthFarClip(bool _far)
Set whether the depth camera far clip distance has been specified.
void SetHorizontalFov(const ignition::math::Angle &_hfov)
Set the horizontal field of view in radians.
double DepthFarClip() const
Get the far clip distance for the depth camera.
uint32_t ImageWidth() const
Get the image width in pixels.
double FarClip() const
Get the far clip distance.
void SetDistortionCenter(const ignition::math::Vector2d &_center) const
Set the distortion center or principal point.
bool HasDepthFarClip() const
Get whether the depth camera far clip distance was set.
void SetDepthNearClip(double _near)
Set the near clip distance for the depth camera.
void SetDistortionK3(double _k3)
Set the radial distortion coefficient k3.
void SetDistortionP1(double _p1)
Set the tangential distortion coefficient p1.
Camera & operator=(Camera &&_camera) noexcept
Move assignment operator.
std::string PixelFormatStr() const
Get the pixel format as a string.