diff --git a/cmake/gazebo-config.cmake.in b/cmake/gazebo-config.cmake.in index 9d7b544c67..cadf839770 100644 --- a/cmake/gazebo-config.cmake.in +++ b/cmake/gazebo-config.cmake.in @@ -171,7 +171,7 @@ list(APPEND @PKG_NAME@_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS}) list(APPEND @PKG_NAME@_LIBRARIES ${PROTOBUF_LIBRARIES}) # Find SDFormat -find_package(sdformat9 REQUIRED) +find_package(sdformat9 REQUIRED VERSION 9.8) list(APPEND @PKG_NAME@_INCLUDE_DIRS ${SDFormat_INCLUDE_DIRS}) list(APPEND @PKG_NAME@_LIBRARIES ${SDFormat_LIBRARIES}) diff --git a/gazebo/rendering/Camera.cc b/gazebo/rendering/Camera.cc index 502f122a13..a97e425234 100644 --- a/gazebo/rendering/Camera.cc +++ b/gazebo/rendering/Camera.cc @@ -118,6 +118,8 @@ Camera::Camera(const std::string &_name, ScenePtr _scene, this->dataPtr->node = transport::NodePtr(new transport::Node()); this->dataPtr->node->Init(); + + this->dataPtr->antiAliasingValue = 4; } ////////////////////////////////////////////////// @@ -143,6 +145,8 @@ void Camera::Load() this->imageHeight = imgElem->Get("height"); this->imageFormat = this->OgrePixelFormat( imgElem->Get("format")); + + this->dataPtr->antiAliasingValue = imgElem->Get("anti_aliasing"); } else gzthrow("Camera has no tag."); @@ -1480,7 +1484,7 @@ void Camera::CreateRenderTexture(const std::string &_textureName) RenderEngine::Instance()->FSAALevels(); // check if target fsaa is supported - unsigned int targetFSAA = 4; + unsigned int targetFSAA = this->dataPtr->antiAliasingValue; auto const it = std::find(fsaaLevels.begin(), fsaaLevels.end(), targetFSAA); if (it != fsaaLevels.end()) fsaa = targetFSAA; diff --git a/gazebo/rendering/CameraPrivate.hh b/gazebo/rendering/CameraPrivate.hh index 686333c742..ac8b24e20f 100644 --- a/gazebo/rendering/CameraPrivate.hh +++ b/gazebo/rendering/CameraPrivate.hh @@ -117,6 +117,9 @@ namespace gazebo /// \brief Fixed axis to yaw around. public: ignition::math::Vector3d yawFixedAxis; + + /// \brief Anti-aliasing value + public: uint32_t antiAliasingValue; }; } }