From 3d5c2b2c5fc270b0d3aa57ca8a133e410f496e5c Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 30 Jun 2020 10:24:19 -0700 Subject: [PATCH] Remove deprecated Pose(), PoseFrame() functions from sdf10 (#308) * Remove all deprecated *PoseFrame() APIs * Remove deprecated Pose(), SetPose() APIs * Migration guide: update per #244, #276 * Changelog for #308. Signed-off-by: Steve Peters --- Changelog.md | 7 +++++-- Migration.md | 14 ++++++++++++++ include/sdf/Actor.hh | 32 -------------------------------- include/sdf/Camera.hh | 30 ------------------------------ include/sdf/Collision.hh | 31 ------------------------------- include/sdf/Joint.hh | 32 -------------------------------- include/sdf/Light.hh | 32 -------------------------------- include/sdf/Link.hh | 30 ------------------------------ include/sdf/Model.hh | 32 -------------------------------- include/sdf/Sensor.hh | 32 -------------------------------- include/sdf/Visual.hh | 31 ------------------------------- src/Actor.cc | 24 ------------------------ src/Camera.cc | 24 ------------------------ src/Collision.cc | 24 ------------------------ src/Joint.cc | 24 ------------------------ src/Light.cc | 24 ------------------------ src/Link.cc | 24 ------------------------ src/Model.cc | 24 ------------------------ src/Sensor.cc | 24 ------------------------ src/Visual.cc | 24 ------------------------ 20 files changed, 19 insertions(+), 500 deletions(-) diff --git a/Changelog.md b/Changelog.md index 4a38f3231..9052ba625 100644 --- a/Changelog.md +++ b/Changelog.md @@ -16,15 +16,18 @@ ### libsdformat 10.0.0 (202X-XX-XX) -1. Enforce minimum/maximum values specified in SDFormat description files +1. Enforce minimum/maximum values specified in SDFormat description files. * [Pull request 303](https://github.com/osrf/sdformat/pull/303) -1. Make parsing of values syntactically more strict with bad values generating an error +1. Make parsing of values syntactically more strict with bad values generating an error. * [Pull request 244](https://github.com/osrf/sdformat/pull/244) 1. Don't install deprecated parser_urdf.hh header file, fix cmake warning about newline file, fix cmake warning about newlines. * [Pull request 276](https://github.com/osrf/sdformat/pull/276) +1. Remove deprecated Pose(), PoseFrame() functions from DOM objects. + * [Pull request 308](https://github.com/osrf/sdformat/pull/308) + 1. Changed the default radius of a Cylinder from 1.0 to 0.5 meters. * [BitBucket pull request 643](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/643) diff --git a/Migration.md b/Migration.md index 5e7c651d8..0029c6f84 100644 --- a/Migration.md +++ b/Migration.md @@ -19,6 +19,20 @@ but with improved human-readability.. 1. + Minimum/maximum values specified in SDFormat description files are now enforced + [Pull request 303](https://github.com/osrf/sdformat/pull/303) +1. + Parsing of bad values generates an error + + [Pull request 244](https://github.com/osrf/sdformat/pull/244) + +### Deletions + +1. + Removed the `parser_urdf.hh` header file and its `URDF2SDF` class + + [Pull request 276](https://github.com/osrf/sdformat/pull/276) + +1. + Removed the deprecated `Pose()`, `SetPose(), and `*PoseFrame()` API's in all DOM classes: + + const ignition::math::Pose3d &Pose() + + void SetPose(const ignition::math::Pose3d &) + + const std::string &PoseFrame() + + void SetPoseFrame(const std::string &) + ### Additions 1. **sdf/Element.hh** diff --git a/include/sdf/Actor.hh b/include/sdf/Actor.hh index c36ed9ae0..630d64e7b 100644 --- a/include/sdf/Actor.hh +++ b/include/sdf/Actor.hh @@ -320,22 +320,6 @@ namespace sdf /// \param[in] _name Name of the actor. public: void SetName(const std::string &_name); - /// \brief Get the pose of the actor. This is the pose of the actor - /// as specified in SDF ( ... ), and is - /// typically used to express the position and rotation of an actor in a - /// global coordinate frame. - /// \return The pose of the actor. - /// \deprecated See RawPose. - public: const ignition::math::Pose3d &Pose() const - SDF_DEPRECATED(9.0); - - /// \brief Set the pose of the actor. - /// \sa const ignition::math::Pose3d &Pose() const - /// \param[in] _pose The new actor pose. - /// \deprecated See SetRawPose. - public: void SetPose(const ignition::math::Pose3d &_pose) - SDF_DEPRECATED(9.0); - /// \brief Get the pose of the actor. This is the pose of the actor /// as specified in SDF ( ... ), and is /// typically used to express the position and rotation of an actor in a @@ -360,22 +344,6 @@ namespace sdf /// \param[in] _frame The name of the pose relative-to frame. public: void SetPoseRelativeTo(const std::string &_frame); - /// \brief Get the name of the coordinate frame in which this actor's - /// pose is expressed. A empty value indicates that the frame is the - /// global/world coordinate frame. - /// \return The name of the pose frame. - /// \deprecated See PoseRelativeTo. - public: const std::string &PoseFrame() const - SDF_DEPRECATED(9.0); - - /// \brief Set the name of the coordinate frame in which this actor's - /// pose is expressed. A empty value indicates that the frame is the - /// global/world coordinate frame. - /// \param[in] _frame The name of the pose frame. - /// \deprecated See SetPoseRelativeTo. - public: void SetPoseFrame(const std::string &_frame) - SDF_DEPRECATED(9.0); - /// \brief The path to the file where this element was loaded from. /// \return Full path to the file on disk. public: const std::string &FilePath() const; diff --git a/include/sdf/Camera.hh b/include/sdf/Camera.hh index cbcfcbe9f..76c8dab07 100644 --- a/include/sdf/Camera.hh +++ b/include/sdf/Camera.hh @@ -293,20 +293,6 @@ namespace sdf public: void SetDistortionCenter( const ignition::math::Vector2d &_center) const; - /// \brief Get the pose of the camer. This is the pose of the camera - /// as specified in SDF ( ... ). - /// \return The pose of the link. - /// \deprecated See RawPose. - public: const ignition::math::Pose3d &Pose() const - SDF_DEPRECATED(9.0); - - /// \brief Set the pose of the camera. - /// \sa const ignition::math::Pose3d &Pose() const - /// \param[in] _pose The new camera pose. - /// \deprecated See SetRawPose. - public: void SetPose(const ignition::math::Pose3d &_pose) - SDF_DEPRECATED(9.0); - /// \brief Get the pose of the camer. This is the pose of the camera /// as specified in SDF ( ... ). /// \return The pose of the link. @@ -329,22 +315,6 @@ namespace sdf /// \param[in] _frame The name of the pose relative-to frame. public: void SetPoseRelativeTo(const std::string &_frame); - /// \brief Get the name of the coordinate frame in which this camera's - /// pose is expressed. A empty value indicates that the frame is the - /// parent link. - /// \return The name of the pose frame. - /// \deprecated See PoseRelativeTo. - public: const std::string &PoseFrame() const - SDF_DEPRECATED(9.0); - - /// \brief Set the name of the coordinate frame in which this camera's - /// pose is expressed. A empty value indicates that the frame is the - /// parent link. - /// \param[in] _frame The name of the pose frame. - /// \deprecated See SetPoseRelativeTo. - public: void SetPoseFrame(const std::string &_frame) - SDF_DEPRECATED(9.0); - /// \brief Get the lens type. This is the type of the lens mapping. /// Supported values are gnomonical, stereographic, equidistant, /// equisolid_angle, orthographic, custom. For gnomonical (perspective) diff --git a/include/sdf/Collision.hh b/include/sdf/Collision.hh index a61d723a9..275f97164 100644 --- a/include/sdf/Collision.hh +++ b/include/sdf/Collision.hh @@ -101,21 +101,6 @@ namespace sdf /// \param[in] _surface The surface parameters of the collision object public: void SetSurface(const sdf::Surface &_surface); - /// \brief Get the pose of the collision object. This is the pose of the - /// collision as specified in SDF - /// ( ... ). - /// \return The pose of the collision object. - /// \deprecated See RawPose. - public: const ignition::math::Pose3d &Pose() const - SDF_DEPRECATED(9.0); - - /// \brief Set the pose of the collision object. - /// \sa const ignition::math::Pose3d &Pose() const - /// \param[in] _pose The pose of the collision object. - /// \deprecated See SetRawPose. - public: void SetPose(const ignition::math::Pose3d &_pose) - SDF_DEPRECATED(9.0); - /// \brief Get the pose of the collision object. This is the pose of the /// collison as specified in SDF /// ( ... ). @@ -139,22 +124,6 @@ namespace sdf /// \param[in] _frame The name of the pose relative-to frame. public: void SetPoseRelativeTo(const std::string &_frame); - /// \brief Get the name of the coordinate frame in which this collision - /// object's pose is expressed. A empty value indicates that the frame is - /// the parent link. - /// \return The name of the pose frame. - /// \deprecated See PoseRelativeTo. - public: const std::string &PoseFrame() const - SDF_DEPRECATED(9.0); - - /// \brief Set the name of the coordinate frame in which this collision - /// object's pose is expressed. A empty value indicates that the frame is - /// the parent link. - /// \param[in] _frame The name of the pose frame. - /// \deprecated See SetPoseRelativeTo. - public: void SetPoseFrame(const std::string &_frame) - SDF_DEPRECATED(9.0); - /// \brief Get SemanticPose object of this object to aid in resolving /// poses. /// \return SemanticPose object for this link. diff --git a/include/sdf/Joint.hh b/include/sdf/Joint.hh index a9fd3bb3f..395977926 100644 --- a/include/sdf/Joint.hh +++ b/include/sdf/Joint.hh @@ -165,22 +165,6 @@ namespace sdf /// \param[in] _axis The JointAxis of the joint public: void SetAxis(const unsigned int _index, const JointAxis &_axis); - /// \brief Get the pose of the joint. This is the pose of the joint - /// as specified in SDF ( ... ). - /// Transformations have not been applied to the return value. - /// \return The pose of the joint. This is the raw pose value, as set in - /// the SDF file. - /// \deprecated See RawPose. - public: const ignition::math::Pose3d &Pose() const - SDF_DEPRECATED(9.0); - - /// \brief Set the pose of the joint. - /// \sa const ignition::math::Pose3d &Pose() const; - /// \param[in] _pose The pose of the joint. - /// \deprecated See SetRawPose. - public: void SetPose(const ignition::math::Pose3d &_pose) - SDF_DEPRECATED(9.0); - /// \brief Get the pose of the joint. This is the pose of the joint /// as specified in SDF ( ... ). /// Transformations have not been applied to the return value. @@ -205,22 +189,6 @@ namespace sdf /// \param[in] _frame The name of the pose relative-to frame. public: void SetPoseRelativeTo(const std::string &_frame); - /// \brief Get the name of the coordinate frame in which this joint's - /// pose is expressed. A empty value indicates that the frame is the - /// child link frame. - /// \return The name of the pose frame. - /// \deprecated See PoseRelativeTo. - public: const std::string &PoseFrame() const - SDF_DEPRECATED(9.0); - - /// \brief Set the name of the coordinate frame in which this joint's - /// pose is expressed. A empty value indicates that the frame is the - /// child link frame. - /// \param[in] _frame The name of the pose frame. - /// \deprecated See SetPoseRelativeTo. - public: void SetPoseFrame(const std::string &_frame) - SDF_DEPRECATED(9.0); - /// \brief Get the thread pitch (only valid for screw joints) /// \return The thread pitch public: double ThreadPitch() const; diff --git a/include/sdf/Light.hh b/include/sdf/Light.hh index 96bb9ebf3..c34f33979 100644 --- a/include/sdf/Light.hh +++ b/include/sdf/Light.hh @@ -109,22 +109,6 @@ namespace sdf /// \param[in] _name Name of the light. public: void SetName(const std::string &_name) const; - /// \brief Get the pose of the light. This is the pose of the light - /// as specified in SDF ( ... ), and is - /// typically used to express the position and rotation of a light in a - /// global coordinate frame. - /// \return The pose of the light. - /// \deprecated See RawPose. - public: const ignition::math::Pose3d &Pose() const - SDF_DEPRECATED(9.0); - - /// \brief Set the pose of the light. - /// \sa const ignition::math::Pose3d &Pose() const - /// \param[in] _pose The new light pose. - /// \deprecated See SetRawPose. - public: void SetPose(const ignition::math::Pose3d &_pose) - SDF_DEPRECATED(9.0); - /// \brief Get the pose of the light. This is the pose of the light /// as specified in SDF ( ... ), and is /// typically used to express the position and rotation of a light in a @@ -149,22 +133,6 @@ namespace sdf /// \param[in] _frame The name of the pose relative-to frame. public: void SetPoseRelativeTo(const std::string &_frame); - /// \brief Get the name of the coordinate frame in which this light's - /// pose is expressed. A empty value indicates that the frame is the - /// global/world coordinate frame. - /// \return The name of the pose frame. - /// \deprecated See PoseRelativeTo. - public: const std::string &PoseFrame() const - SDF_DEPRECATED(9.0); - - /// \brief Set the name of the coordinate frame in which this light's - /// pose is expressed. A empty value indicates that the frame is the - /// global/world coordinate frame. - /// \param[in] _frame The name of the pose frame. - /// \deprecated See SetPoseRelativeTo. - public: void SetPoseFrame(const std::string &_frame) - SDF_DEPRECATED(9.0); - /// \brief Get SemanticPose object of this object to aid in resolving /// poses. /// \return SemanticPose object for this link. diff --git a/include/sdf/Link.hh b/include/sdf/Link.hh index cb198416f..7b8532ac5 100644 --- a/include/sdf/Link.hh +++ b/include/sdf/Link.hh @@ -192,20 +192,6 @@ namespace sdf /// \sa const ignition::math::Inertiald &Inertial() const public: bool SetInertial(const ignition::math::Inertiald &_inertial); - /// \brief Get the pose of the link. This is the pose of the link - /// as specified in SDF ( ... ). - /// \return The pose of the link. - /// \deprecated See RawPose. - public: const ignition::math::Pose3d &Pose() const - SDF_DEPRECATED(9.0); - - /// \brief Set the pose of the link. - /// \sa const ignition::math::Pose3d &Pose() const - /// \param[in] _pose The new link pose. - /// \deprecated See SetRawPose. - public: void SetPose(const ignition::math::Pose3d &_pose) - SDF_DEPRECATED(9.0); - /// \brief Get the pose of the link. This is the pose of the link /// as specified in SDF ( ... ). /// \return The pose of the link. @@ -228,22 +214,6 @@ namespace sdf /// \param[in] _frame The name of the pose relative-to frame. public: void SetPoseRelativeTo(const std::string &_frame); - /// \brief Get the name of the coordinate frame in which this link's - /// pose is expressed. A empty value indicates that the frame is the - /// parent model. - /// \return The name of the pose frame. - /// \deprecated See PoseRelativeTo. - public: const std::string &PoseFrame() const - SDF_DEPRECATED(9.0); - - /// \brief Set the name of the coordinate frame in which this link's - /// pose is expressed. A empty value indicates that the frame is the - /// parent model. - /// \param[in] _frame The name of the pose frame. - /// \deprecated See SetPoseRelativeTo. - public: void SetPoseFrame(const std::string &_frame) - SDF_DEPRECATED(9.0); - /// \brief Get a pointer to the SDF element that was used during /// load. /// \return SDF element pointer. The value will be nullptr if Load has diff --git a/include/sdf/Model.hh b/include/sdf/Model.hh index 018801982..81d7a474d 100644 --- a/include/sdf/Model.hh +++ b/include/sdf/Model.hh @@ -198,22 +198,6 @@ namespace sdf /// \return True if there exists an explicit frame with the given name. public: bool FrameNameExists(const std::string &_name) const; - /// \brief Get the pose of the model. This is the pose of the model - /// as specified in SDF ( ... ), and is - /// typically used to express the position and rotation of a model in a - /// global coordinate frame. - /// \return The pose of the model. - /// \deprecated See RawPose. - public: const ignition::math::Pose3d &Pose() const - SDF_DEPRECATED(9.0); - - /// \brief Set the pose of the model. - /// \sa const ignition::math::Pose3d &Pose() const - /// \param[in] _pose The new model pose. - /// \deprecated See SetRawPose. - public: void SetPose(const ignition::math::Pose3d &_pose) - SDF_DEPRECATED(9.0); - /// \brief Get the pose of the model. This is the pose of the model /// as specified in SDF ( ... ), and is /// typically used to express the position and rotation of a model in a @@ -252,22 +236,6 @@ namespace sdf /// \param[in] _frame The name of the pose relative-to frame. public: void SetPoseRelativeTo(const std::string &_frame); - /// \brief Get the name of the coordinate frame in which this model's - /// pose is expressed. A empty value indicates that the frame is the - /// global/world coordinate frame. - /// \return The name of the pose frame. - /// \deprecated See PoseRelativeTo. - public: const std::string &PoseFrame() const - SDF_DEPRECATED(9.0); - - /// \brief Set the name of the coordinate frame in which this model's - /// pose is expressed. A empty value indicates that the frame is the - /// global/world coordinate frame. - /// \param[in] _frame The name of the pose frame. - /// \deprecated See SetPoseRelativeTo. - public: void SetPoseFrame(const std::string &_frame) - SDF_DEPRECATED(9.0); - /// \brief Get a pointer to the SDF element that was used during /// load. /// \return SDF element pointer. The value will be nullptr if Load has diff --git a/include/sdf/Sensor.hh b/include/sdf/Sensor.hh index 6b0e75508..33a07fa16 100644 --- a/include/sdf/Sensor.hh +++ b/include/sdf/Sensor.hh @@ -155,22 +155,6 @@ namespace sdf /// \param[in] _topic Topic for this sensor's data. public: void SetTopic(const std::string &_topic); - /// \brief Get the pose of the sensor. This is the pose of the sensor - /// as specified in SDF ( ... ), and is - /// typically used to express the position and rotation of a sensor in a - /// global coordinate frame. - /// \return The pose of the sensor. - /// \deprecated See RawPose. - public: const ignition::math::Pose3d &Pose() const - SDF_DEPRECATED(9.0); - - /// \brief Set the pose of the sensor. - /// \sa const ignition::math::Pose3d &Pose() const - /// \param[in] _pose The new sensor pose. - /// \deprecated See SetRawPose. - public: void SetPose(const ignition::math::Pose3d &_pose) - SDF_DEPRECATED(9.0); - /// \brief Get the pose of the sensor. This is the pose of the sensor /// as specified in SDF ( ... ), and is /// typically used to express the position and rotation of a sensor in a @@ -195,22 +179,6 @@ namespace sdf /// \param[in] _frame The name of the pose relative-to frame. public: void SetPoseRelativeTo(const std::string &_frame); - /// \brief Get the name of the coordinate frame in which this sensor's - /// pose is expressed. A empty value indicates that the frame is the - /// global/world coordinate frame. - /// \return The name of the pose frame. - /// \deprecated See PoseRelativeTo. - public: const std::string &PoseFrame() const - SDF_DEPRECATED(9.0); - - /// \brief Set the name of the coordinate frame in which this sensor's - /// pose is expressed. A empty value indicates that the frame is the - /// global/world coordinate frame. - /// \param[in] _frame The name of the pose frame. - /// \deprecated See SetPoseRelativeTo. - public: void SetPoseFrame(const std::string &_frame) - SDF_DEPRECATED(9.0); - /// \brief Get SemanticPose object of this object to aid in resolving /// poses. /// \return SemanticPose object for this link. diff --git a/include/sdf/Visual.hh b/include/sdf/Visual.hh index 065083971..deff10053 100644 --- a/include/sdf/Visual.hh +++ b/include/sdf/Visual.hh @@ -110,21 +110,6 @@ namespace sdf /// \param[in] _geom The geometry of the visual object public: void SetGeom(const Geometry &_geom); - /// \brief Get the pose of the visual object. This is the pose of the - /// visual as specified in SDF - /// ( ... ). - /// \return The pose of the visual object. - /// \deprecated See SetRawPose. - public: const ignition::math::Pose3d &Pose() const - SDF_DEPRECATED(9.0); - - /// \brief Set the pose of the visual object. - /// \sa const ignition::math::Pose3d &Pose() const - /// \param[in] _pose The pose of the visual object. - /// \deprecated See SetRawPose. - public: void SetPose(const ignition::math::Pose3d &_pose) - SDF_DEPRECATED(9.0); - /// \brief Get the pose of the visual object. This is the pose of the /// visual as specified in SDF /// ( ... ). @@ -148,22 +133,6 @@ namespace sdf /// \param[in] _frame The name of the pose relative-to frame. public: void SetPoseRelativeTo(const std::string &_frame); - /// \brief Get the name of the coordinate frame in which this visual - /// object's pose is expressed. A empty value indicates that the frame is - /// the parent link. - /// \return The name of the pose frame. - /// \deprecated See PoseRelativeTo. - public: const std::string &PoseFrame() const - SDF_DEPRECATED(9.0); - - /// \brief Set the name of the coordinate frame in which this visual - /// object's pose is expressed. A empty value indicates that the frame is - /// the parent link. - /// \return The name of the pose frame. - /// \deprecated See SetPoseRelativeTo. - public: void SetPoseFrame(const std::string &_frame) - SDF_DEPRECATED(9.0); - /// \brief Get SemanticPose object of this object to aid in resolving /// poses. /// \return SemanticPose object for this link. diff --git a/src/Actor.cc b/src/Actor.cc index e075c8d15..e2744cb21 100644 --- a/src/Actor.cc +++ b/src/Actor.cc @@ -642,48 +642,24 @@ void Actor::SetName(const std::string &_name) this->dataPtr->name = _name; } -///////////////////////////////////////////////// -const ignition::math::Pose3d &Actor::Pose() const -{ - return this->RawPose(); -} - ///////////////////////////////////////////////// const ignition::math::Pose3d &Actor::RawPose() const { return this->dataPtr->pose; } -///////////////////////////////////////////////// -const std::string &Actor::PoseFrame() const -{ - return this->PoseRelativeTo(); -} - ///////////////////////////////////////////////// const std::string &Actor::PoseRelativeTo() const { return this->dataPtr->poseRelativeTo; } -///////////////////////////////////////////////// -void Actor::SetPose(const ignition::math::Pose3d &_pose) -{ - this->SetRawPose(_pose); -} - ///////////////////////////////////////////////// void Actor::SetRawPose(const ignition::math::Pose3d &_pose) { this->dataPtr->pose = _pose; } -///////////////////////////////////////////////// -void Actor::SetPoseFrame(const std::string &_frame) -{ - this->SetPoseRelativeTo(_frame); -} - ///////////////////////////////////////////////// void Actor::SetPoseRelativeTo(const std::string &_frame) { diff --git a/src/Camera.cc b/src/Camera.cc index bd35f78d7..0c42e63cb 100644 --- a/src/Camera.cc +++ b/src/Camera.cc @@ -684,48 +684,24 @@ void Camera::SetDistortionCenter( this->dataPtr->distortionCenter = _center; } -///////////////////////////////////////////////// -const ignition::math::Pose3d &Camera::Pose() const -{ - return this->RawPose(); -} - ///////////////////////////////////////////////// const ignition::math::Pose3d &Camera::RawPose() const { return this->dataPtr->pose; } -///////////////////////////////////////////////// -const std::string &Camera::PoseFrame() const -{ - return this->PoseRelativeTo(); -} - ///////////////////////////////////////////////// const std::string &Camera::PoseRelativeTo() const { return this->dataPtr->poseRelativeTo; } -///////////////////////////////////////////////// -void Camera::SetPose(const ignition::math::Pose3d &_pose) -{ - this->SetRawPose(_pose); -} - ///////////////////////////////////////////////// void Camera::SetRawPose(const ignition::math::Pose3d &_pose) { this->dataPtr->pose = _pose; } -///////////////////////////////////////////////// -void Camera::SetPoseFrame(const std::string &_frame) -{ - this->SetPoseRelativeTo(_frame); -} - ///////////////////////////////////////////////// void Camera::SetPoseRelativeTo(const std::string &_frame) { diff --git a/src/Collision.cc b/src/Collision.cc index 47f4c33e5..ee98baca8 100644 --- a/src/Collision.cc +++ b/src/Collision.cc @@ -175,48 +175,24 @@ void Collision::SetSurface(const sdf::Surface &_surface) this->dataPtr->surface = _surface; } -///////////////////////////////////////////////// -const ignition::math::Pose3d &Collision::Pose() const -{ - return this->RawPose(); -} - ///////////////////////////////////////////////// const ignition::math::Pose3d &Collision::RawPose() const { return this->dataPtr->pose; } -///////////////////////////////////////////////// -const std::string &Collision::PoseFrame() const -{ - return this->PoseRelativeTo(); -} - ///////////////////////////////////////////////// const std::string &Collision::PoseRelativeTo() const { return this->dataPtr->poseRelativeTo; } -///////////////////////////////////////////////// -void Collision::SetPose(const ignition::math::Pose3d &_pose) -{ - this->SetRawPose(_pose); -} - ///////////////////////////////////////////////// void Collision::SetRawPose(const ignition::math::Pose3d &_pose) { this->dataPtr->pose = _pose; } -///////////////////////////////////////////////// -void Collision::SetPoseFrame(const std::string &_frame) -{ - this->SetPoseRelativeTo(_frame); -} - ///////////////////////////////////////////////// void Collision::SetPoseRelativeTo(const std::string &_frame) { diff --git a/src/Joint.cc b/src/Joint.cc index 55c79d98b..51018fff3 100644 --- a/src/Joint.cc +++ b/src/Joint.cc @@ -330,48 +330,24 @@ void Joint::SetAxis(const unsigned int _index, const JointAxis &_axis) std::make_unique(_axis); } -///////////////////////////////////////////////// -const ignition::math::Pose3d &Joint::Pose() const -{ - return this->RawPose(); -} - ///////////////////////////////////////////////// const ignition::math::Pose3d &Joint::RawPose() const { return this->dataPtr->pose; } -///////////////////////////////////////////////// -const std::string &Joint::PoseFrame() const -{ - return this->PoseRelativeTo(); -} - ///////////////////////////////////////////////// const std::string &Joint::PoseRelativeTo() const { return this->dataPtr->poseRelativeTo; } -///////////////////////////////////////////////// -void Joint::SetPose(const ignition::math::Pose3d &_pose) -{ - this->SetRawPose(_pose); -} - ///////////////////////////////////////////////// void Joint::SetRawPose(const ignition::math::Pose3d &_pose) { this->dataPtr->pose = _pose; } -///////////////////////////////////////////////// -void Joint::SetPoseFrame(const std::string &_frame) -{ - this->SetPoseRelativeTo(_frame); -} - ///////////////////////////////////////////////// void Joint::SetPoseRelativeTo(const std::string &_frame) { diff --git a/src/Light.cc b/src/Light.cc index fed94919c..1c65922fd 100644 --- a/src/Light.cc +++ b/src/Light.cc @@ -285,48 +285,24 @@ void Light::SetName(const std::string &_name) const this->dataPtr->name = _name; } -///////////////////////////////////////////////// -const ignition::math::Pose3d &Light::Pose() const -{ - return this->RawPose(); -} - ///////////////////////////////////////////////// const ignition::math::Pose3d &Light::RawPose() const { return this->dataPtr->pose; } -///////////////////////////////////////////////// -const std::string &Light::PoseFrame() const -{ - return this->PoseRelativeTo(); -} - ///////////////////////////////////////////////// const std::string &Light::PoseRelativeTo() const { return this->dataPtr->poseRelativeTo; } -///////////////////////////////////////////////// -void Light::SetPose(const ignition::math::Pose3d &_pose) -{ - this->SetRawPose(_pose); -} - ///////////////////////////////////////////////// void Light::SetRawPose(const ignition::math::Pose3d &_pose) { this->dataPtr->pose = _pose; } -///////////////////////////////////////////////// -void Light::SetPoseFrame(const std::string &_frame) -{ - this->SetPoseRelativeTo(_frame); -} - ///////////////////////////////////////////////// void Light::SetPoseRelativeTo(const std::string &_frame) { diff --git a/src/Link.cc b/src/Link.cc index 93532bdc8..9ec72fc60 100644 --- a/src/Link.cc +++ b/src/Link.cc @@ -349,48 +349,24 @@ bool Link::SetInertial(const ignition::math::Inertiald &_inertial) return _inertial.MassMatrix().IsValid(); } -///////////////////////////////////////////////// -const ignition::math::Pose3d &Link::Pose() const -{ - return this->RawPose(); -} - ///////////////////////////////////////////////// const ignition::math::Pose3d &Link::RawPose() const { return this->dataPtr->pose; } -///////////////////////////////////////////////// -const std::string &Link::PoseFrame() const -{ - return this->PoseRelativeTo(); -} - ///////////////////////////////////////////////// const std::string &Link::PoseRelativeTo() const { return this->dataPtr->poseRelativeTo; } -///////////////////////////////////////////////// -void Link::SetPose(const ignition::math::Pose3d &_pose) -{ - this->SetRawPose(_pose); -} - ///////////////////////////////////////////////// void Link::SetRawPose(const ignition::math::Pose3d &_pose) { this->dataPtr->pose = _pose; } -///////////////////////////////////////////////// -void Link::SetPoseFrame(const std::string &_frame) -{ - this->SetPoseRelativeTo(_frame); -} - ///////////////////////////////////////////////// void Link::SetPoseRelativeTo(const std::string &_frame) { diff --git a/src/Model.cc b/src/Model.cc index fe8be53ee..f60593a0e 100644 --- a/src/Model.cc +++ b/src/Model.cc @@ -552,48 +552,24 @@ void Model::SetCanonicalLinkName(const std::string &_canonicalLink) this->dataPtr->canonicalLink = _canonicalLink; } -///////////////////////////////////////////////// -const ignition::math::Pose3d &Model::Pose() const -{ - return this->RawPose(); -} - ///////////////////////////////////////////////// const ignition::math::Pose3d &Model::RawPose() const { return this->dataPtr->pose; } -///////////////////////////////////////////////// -const std::string &Model::PoseFrame() const -{ - return this->PoseRelativeTo(); -} - ///////////////////////////////////////////////// const std::string &Model::PoseRelativeTo() const { return this->dataPtr->poseRelativeTo; } -///////////////////////////////////////////////// -void Model::SetPose(const ignition::math::Pose3d &_pose) -{ - this->SetRawPose(_pose); -} - ///////////////////////////////////////////////// void Model::SetRawPose(const ignition::math::Pose3d &_pose) { this->dataPtr->pose = _pose; } -///////////////////////////////////////////////// -void Model::SetPoseFrame(const std::string &_frame) -{ - this->SetPoseRelativeTo(_frame); -} - ///////////////////////////////////////////////// void Model::SetPoseRelativeTo(const std::string &_frame) { diff --git a/src/Sensor.cc b/src/Sensor.cc index fdd4e96e2..1d3c467f3 100644 --- a/src/Sensor.cc +++ b/src/Sensor.cc @@ -442,48 +442,24 @@ void Sensor::SetTopic(const std::string &_topic) this->dataPtr->topic = _topic; } -///////////////////////////////////////////////// -const ignition::math::Pose3d &Sensor::Pose() const -{ - return this->RawPose(); -} - ///////////////////////////////////////////////// const ignition::math::Pose3d &Sensor::RawPose() const { return this->dataPtr->pose; } -///////////////////////////////////////////////// -const std::string &Sensor::PoseFrame() const -{ - return this->PoseRelativeTo(); -} - ///////////////////////////////////////////////// const std::string &Sensor::PoseRelativeTo() const { return this->dataPtr->poseRelativeTo; } -///////////////////////////////////////////////// -void Sensor::SetPose(const ignition::math::Pose3d &_pose) -{ - this->SetRawPose(_pose); -} - ///////////////////////////////////////////////// void Sensor::SetRawPose(const ignition::math::Pose3d &_pose) { this->dataPtr->pose = _pose; } -///////////////////////////////////////////////// -void Sensor::SetPoseFrame(const std::string &_frame) -{ - this->SetPoseRelativeTo(_frame); -} - ///////////////////////////////////////////////// void Sensor::SetPoseRelativeTo(const std::string &_frame) { diff --git a/src/Visual.cc b/src/Visual.cc index 066b01e65..8d99b5f68 100644 --- a/src/Visual.cc +++ b/src/Visual.cc @@ -232,48 +232,24 @@ void Visual::SetTransparency(float _transparency) this->dataPtr->transparency = _transparency; } -///////////////////////////////////////////////// -const ignition::math::Pose3d &Visual::Pose() const -{ - return this->RawPose(); -} - ///////////////////////////////////////////////// const ignition::math::Pose3d &Visual::RawPose() const { return this->dataPtr->pose; } -///////////////////////////////////////////////// -const std::string &Visual::PoseFrame() const -{ - return this->PoseRelativeTo(); -} - ///////////////////////////////////////////////// const std::string &Visual::PoseRelativeTo() const { return this->dataPtr->poseRelativeTo; } -///////////////////////////////////////////////// -void Visual::SetPose(const ignition::math::Pose3d &_pose) -{ - this->SetRawPose(_pose); -} - ///////////////////////////////////////////////// void Visual::SetRawPose(const ignition::math::Pose3d &_pose) { this->dataPtr->pose = _pose; } -///////////////////////////////////////////////// -void Visual::SetPoseFrame(const std::string &_frame) -{ - this->SetPoseRelativeTo(_frame); -} - ///////////////////////////////////////////////// void Visual::SetPoseRelativeTo(const std::string &_frame) {