Skip to content

Commit

Permalink
Merge branch 'sdf12' into scpeters/merge_12_13
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters committed Dec 1, 2022
2 parents b1a3334 + 0642939 commit a8b3f44
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,12 @@

## libsdformat 9.X

### libsdformat 9.10.0 (2022-11-17)

1. Added camera info topic to Camera
* [Pull request #1198](https://github.com/gazebosim/sdformat/pull/1198)
* [Pull request #1201](https://github.com/gazebosim/sdformat/pull/1201)

### libsdformat 9.9.1 (2022-11-08)

1. Fix static URDF models with fixed joints
Expand Down
2 changes: 1 addition & 1 deletion sdf/1.7/camera.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>An optional name for the camera.</description>
</attribute>

<element name="camera_info_topic" type="string" default="camera_info" required="0">
<element name="camera_info_topic" type="string" default="__default__" required="0">
<description>Name of the camera info</description>
</element> <!-- End camera Info topic -->

Expand Down
8 changes: 5 additions & 3 deletions src/Camera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ class sdf::Camera::Implementation
/// \brief lens instrinsics s.
public: double lensIntrinsicsS{1.0};

/// \brief True if this camera has custom projection values
public: bool hasProjection = false;

/// \brief True if this camera has custom intrinsics values
public: bool hasIntrinsics = false;

/// \brief True if this camera has custom projection values
public: bool hasProjection = false;

/// \brief Visibility mask of a camera. Defaults to 0xFFFFFFFF
public: uint32_t visibilityMask{UINT32_MAX};
};
Expand Down Expand Up @@ -260,6 +260,8 @@ Errors Camera::Load(ElementPtr _sdf)

this->dataPtr->cameraInfoTopic = _sdf->Get<std::string>("camera_info_topic",
this->dataPtr->cameraInfoTopic).first;
if (this->dataPtr->cameraInfoTopic == "__default__")
this->dataPtr->cameraInfoTopic = "";

this->dataPtr->hfov = _sdf->Get<gz::math::Angle>("horizontal_fov",
this->dataPtr->hfov).first;
Expand Down

0 comments on commit a8b3f44

Please sign in to comment.