21#include <gz/math/Pose3.hh>
22#include <gz/utils/ImplPtr.hh>
32 inline namespace SDF_VERSION_NAMESPACE {
100 public: std::string
Name()
const;
104 public:
void SetName(
const std::string &_name);
340 public:
const gz::math::Pose3d &
RawPose()
const;
550 const std::string &_format);
581 GZ_UTILS_IMPL_PTR(dataPtr)
Information about a monocular camera sensor.
Definition: Camera.hh:61
bool HasDepthFarClip() const
Get whether the depth camera far clip distance was set.
double DistortionK1() const
Get the radial distortion coefficient k1.
double LensC1() const
Get lens custom function linear scaling constant.
double DepthFarClip() const
Get the far clip distance for the depth camera.
const gz::math::Vector2d & DistortionCenter() const
Get the distortion center or principal point.
void SetTriggered(bool _triggered)
Set whether the camera should be triggered by a topic.
void SetBoundingBoxType(const std::string &_type)
Set the boundingbox type.
void SetHasDepthCamera(bool _camera)
Set whether the depth camera has been specified.
uint32_t VisibilityMask() const
Get the visibility mask of a camera.
uint32_t ImageHeight() const
Get the image height in pixels.
void SetDistortionP1(double _p1)
Set the tangential distortion coefficient p1.
void SetSaveFrames(bool _save)
Set whether frames should be saved.
void SetHasDepthFarClip(bool _far)
Set whether the depth camera far clip distance has been specified.
static std::string ConvertPixelFormat(PixelFormatType _type)
Convert a PixelFormatType to a string.
void SetLensC3(double _c3)
Set lens custom function angle offset constant.
const gz::math::Pose3d & RawPose() const
Get the pose of the camer.
void SetFarClip(double _far)
Set the far clip distance.
bool SaveFrames() const
Get whether frames should be saved.
void SetLensProjectionFx(double _fx_p)
Set the lens projection matrix X focal length in pixels.
void SetDepthNearClip(double _near)
Set the near clip distance for the depth camera.
void SetImageWidth(uint32_t _width)
Set the image width in pixels.
void SetLensFocalLength(double _f)
Set lens custom function focal length.
void SetDepthFarClip(double _far)
Set the far clip distance for the depth camera.
PixelFormatType PixelFormat() const
Get the pixel format.
void SetLensEnvironmentTextureSize(int _size)
Set environment texture size.
void SetAntiAliasingValue(uint32_t _antiAliasingValue)
Set the anti-aliasing value.
gz::math::Angle HorizontalFov() const
Get the horizontal field of view in radians.
const std::string & PoseRelativeTo() const
Get the name of the coordinate frame relative to which this object's pose is expressed.
double DistortionP2() const
Get the tangential distortion coefficient p2.
void SetHasSegmentationType(bool _type)
Set whether the segmentation type has been specified.
double LensFocalLength() const
Get lens custom function focal length.
void SetSegmentationType(const std::string &_type)
Set the segmentation type.
void SetName(const std::string &_name)
Set the name of the camera.
static PixelFormatType ConvertPixelFormat(const std::string &_format)
Convert a string to a PixelFormatType.
void SetLensProjectionFy(double _fy_p)
Set the lens projection matrix Y focal length in pixels.
void SetLensProjectionTx(double _tx)
Set the lens projection matrix X translation in pixels.
void SetDistortionK1(double _k1)
Set the radial distortion coefficient k1.
double LensProjectionFx() const
Get the lens projection matrix X focal length in pixels.
double DistortionK3() const
Get the radial distortion coefficient k3.
double LensProjectionFy() const
Get the lens projection matrix Y focal length in pixels.
std::string PixelFormatStr() const
Get the pixel format as a string.
bool HasDepthCamera() const
Get whether the depth camera was set.
void SetLensIntrinsicsFx(double _fx)
Set the lens intrinsic matrix X focal length in pixels.
const std::string OpticalFrameId() const
Get the name of the coordinate frame relative to which this object's camera_info message header is ex...
void SetLensIntrinsicsSkew(double _s)
Set the lens XY axis skew.
int LensEnvironmentTextureSize() const
Get environment texture size.
double DistortionK2() const
Get the radial distortion coefficient k2.
void SetLensScaleToHfov(bool _scale)
Set lens scale to horizontal field of field.
void SetPixelFormat(PixelFormatType _format)
Set the pixel format type.
void SetSaveFramesPath(const std::string &_path)
Set the path in which to save frames.
void SetOpticalFrameId(const std::string &_frame)
Set the name of the coordinate frame relative to which this object's camera_info is expressed.
void SetDistortionP2(double _p2)
Set the tangential distortion coefficient p2.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
double LensIntrinsicsFy() const
Get the lens intrinsic matrix Y focal length in pixels.
const std::string & SegmentationType() const
Get the segmentation type.
void SetImageNoise(const Noise &_noise)
Set the noise values related to the image.
double FarClip() const
Get the far clip distance.
void SetImageHeight(uint32_t _height)
Set the image height in pixels.
bool Triggered() const
Get whether the camera is triggered by a topic.
void SetRawPose(const gz::math::Pose3d &_pose)
Set the pose of the camera.
double LensIntrinsicsFx() const
Get the lens intrinsic matrix X focal length in pixels.
double LensProjectionTx() const
Get the lens projection matrix X translation in pixels.
bool HasBoundingBoxType() const
Get whether the boundingbox type was set.
double NearClip() const
Get the near clip distance.
void SetDistortionK2(double _k2)
Set the radial distortion coefficient k2.
uint32_t ImageWidth() const
Get the image width in pixels.
void SetPixelFormatStr(const std::string &_fmt)
Set the pixel format from a string.
bool HasLensProjection() const
Get whether or not the camera has projection values set.
bool LensScaleToHfov() const
Get lens scale to horizontal field of field.
const std::string & SaveFramesPath() const
Get the path in which to save frames.
double LensIntrinsicsCx() const
Get the lens intrinsic matrix X principal point in pixels.
double LensC3() const
Get lens custom function angle offset constant.
const std::string & BoundingBoxType() const
Get the boundingbox type.
double DepthNearClip() const
Get the near clip distance for the depth camera.
std::string Name() const
Get the name of the camera.
bool HasLensIntrinsics() const
Get whether or not the camera has instrinsics values set.
bool HasDepthNearClip() const
Get whether the depth camera near clip distance was set.
void SetLensCutoffAngle(const gz::math::Angle &_angle)
Set lens cutoff angle.
std::string TriggerTopic() const
Get the topic that will trigger the camera.
void SetLensProjectionTy(double _ty)
Set the lens projection matrix Y translation in pixels.
double LensProjectionCy() const
Get the lens projection matrix Y principal point in pixels.
void SetPoseRelativeTo(const std::string &_frame)
Set the name of the coordinate frame relative to which this object's pose is expressed.
void SetLensIntrinsicsFy(double _fy)
Set the lens intrinsic matrix Y focal length in pixels.
bool operator!=(const Camera &_alt) const
Return true this Camera object does not contain the same values as the passed in parameter.
uint32_t AntiAliasingValue() const
Get the anti-aliasing value.
const Noise & ImageNoise() const
Get the image noise values.
void SetLensIntrinsicsCy(double _cy)
Set the lens intrinsic matrix Y principal point in pixels.
void SetLensC1(double _c1)
Set lens custom function linear scaling constant.
Errors Load(ElementPtr _sdf)
Load the camera sensor based on an element pointer.
void SetLensIntrinsicsCx(double _cx)
Set the lens intrinsic matrix X principal point in pixels.
void SetLensType(const std::string &_type)
Set the lens type.
double LensIntrinsicsCy() const
Get the lens intrinsic matrix Y principal point in pixels.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this camera.
double LensIntrinsicsSkew() const
Get the lens XY axis skew.
void SetDistortionK3(double _k3)
Set the radial distortion coefficient k3.
std::string LensType() const
Get the lens type.
void SetHasDepthNearClip(bool _near)
Set whether the depth camera near clip distance has been specified.
void SetDistortionCenter(const gz::math::Vector2d &_center)
Set the distortion center or principal point.
std::string CameraInfoTopic() const
Get the camera info topic.
void SetNearClip(double _near)
Set the near clip distance.
void SetLensC2(double _c2)
Set lens custom function angular scaling constant.
void SetLensProjectionCx(double _cx_p)
Set the lens projection matrix X principal point in pixels.
gz::math::Angle LensCutoffAngle() const
Get lens cutoff angle.
bool HasSegmentationType() const
Get whether the segmentation type was set.
void SetLensProjectionCy(double _cy_p)
Set the lens projection matrix Y principal point in pixels.
double LensProjectionCx() const
Get the lens projection matrix X principal point in pixels.
void SetCameraInfoTopic(const std::string &_cameraInfoTopic)
Set the camera info topic.
void SetHorizontalFov(const gz::math::Angle &_hfov)
Set the horizontal field of view in radians.
double LensC2() const
Get lens custom function angular scaling constant.
void SetLensFunction(const std::string &_fun)
Set lens custom function.
void SetHasBoundingBoxType(bool _type)
Set whether the boundingbox type has been specified.
double DistortionP1() const
Get the tangential distortion coefficient p1.
const std::string & LensFunction() const
Get lens custom function.
void SetVisibilityMask(uint32_t _mask)
Set the visibility mask of a camera.
bool operator==(const Camera &_alt) const
Return true if both Camera objects contain the same values.
double LensProjectionTy() const
Get the lens projection matrix Y translation in pixels.
void SetTriggerTopic(const std::string &_triggerTopic)
Set the topic that will trigger the camera.
The Noise class contains information about a noise model, such as a Gaussian distribution.
Definition: Noise.hh:48
PixelFormatType
The set of pixel formats.
Definition: Camera.hh:37
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:95
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:55
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25