Skip to content

Commit

Permalink
Merged in hide_frame_semantics_1 (pull request gazebosim#622)
Browse files Browse the repository at this point in the history
[Citadel] Hide frame semantics implementation part 1

Approved-by: Louise Poubel <lupoubel@hotmail.com>
  • Loading branch information
scpeters committed Dec 5, 2019
2 parents 3c3f858 + 624c68e commit 77e15bb
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 36 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
1. DOM API: deprecate `(Set)?Pose` API and replace with `(Set)?RawPose`
* [Pull request 599](https://bitbucket.org/osrf/sdformat/pull-requests/599)

1. Hide FrameSemantics implementation.
* [Pull request 622](https://bitbucket.org/osrf/sdformat/pull-requests/622)

## SDFormat 8.0

### SDFormat 8.X.X (201X-XX-XX)
Expand Down
13 changes: 0 additions & 13 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@ but with improved human-readability..
+ Errors ResolveAttachedToBody(std::string&) const
+ sdf::SemanticPose SemanticPose() const

1. **sdf/FrameSemantics.hh**
+ struct FrameAttachedToGraph
+ Errors buildFrameAttachedToGraph(FrameAttachedToGraph&, const Model\*)
+ Errors buildFrameAttachedToGraph(FrameAttachedToGraph&, const World\*)
+ Errors validateFrameAttachedToGraph(const FrameAttachedToGraph\*)
+ Errors resolveFrameAttachedToBody(std::string&, const FrameAttachedToGraph\*, const std::string&)
+ struct PoseRelativeToGraph
+ Errors buildPoseRelativeToGraph(PoseRelativeToGraph&, const Model\*)
+ Errors buildPoseRelativeToGraph(PoseRelativeToGraph&, const World\*)
+ Errors validatePoseRelativeToGraph(const PoseRelativeToGraph\*)
+ Errors resolvePoseRelativeToRoot(ignition::math::Pose3d&, const PoseRelativeToGraph\*, const std::string&)
+ Errors resolvePose(ignition::math::Pose3d&, const PoseRelativeToGraph\*, const std::string&, const std::string&)

1. **sdf/Joint.hh**
+ sdf::SemanticPose SemanticPose() const

Expand Down
1 change: 0 additions & 1 deletion include/sdf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ set (headers
Exception.hh
Filesystem.hh
Frame.hh
FrameSemantics.hh
Geometry.hh
Gui.hh
Imu.hh
Expand Down
2 changes: 1 addition & 1 deletion include/sdf/Collision.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <string>
#include <ignition/math/Pose3.hh>
#include "sdf/Element.hh"
#include "sdf/FrameSemantics.hh"
#include "sdf/SemanticPose.hh"
#include "sdf/Types.hh"
#include "sdf/sdf_config.h"
Expand All @@ -35,6 +34,7 @@ namespace sdf
// Forward declaration.
class CollisionPrivate;
class Geometry;
struct PoseRelativeToGraph;

/// \brief A collision element descibes the collision properties associated
/// with a link. This can be different from the visual properties of a link.
Expand Down
3 changes: 2 additions & 1 deletion include/sdf/Frame.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <string>
#include <ignition/math/Pose3.hh>
#include "sdf/Element.hh"
#include "sdf/FrameSemantics.hh"
#include "sdf/SemanticPose.hh"
#include "sdf/Types.hh"
#include "sdf/sdf_config.h"
Expand All @@ -34,6 +33,8 @@ namespace sdf
//
// Forward declaration.
class FramePrivate;
struct FrameAttachedToGraph;
struct PoseRelativeToGraph;

/// \brief A Frame element descibes the properties associated with an
/// explicit frame defined in a Model or World.
Expand Down
14 changes: 2 additions & 12 deletions include/sdf/FrameSemantics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include "sdf/Error.hh"
#include "sdf/Types.hh"
#include "sdf/system_util.hh"

/// \ingroup sdf_frame_semantics
/// \brief namespace for Simulation Description Format Frame Semantics Utilities
Expand Down Expand Up @@ -64,7 +63,7 @@ namespace sdf
};

/// \brief Data structure for frame attached_to graphs for Model or World.
struct SDFORMAT_VISIBLE FrameAttachedToGraph
struct FrameAttachedToGraph
{
/// \brief A DirectedGraph with a vertex for each frame and edges pointing
/// to the frame to which another frame is attached. Each vertex stores
Expand All @@ -81,7 +80,7 @@ namespace sdf
};

/// \brief Data structure for pose relative_to graphs for Model or World.
struct SDFORMAT_VISIBLE PoseRelativeToGraph
struct PoseRelativeToGraph
{
/// \brief A DirectedGraph with a vertex for each explicit or implicit
/// frame and edges pointing to a given frame from its relative-to frame.
Expand All @@ -104,31 +103,27 @@ namespace sdf
/// \param[out] _out Graph object to write.
/// \param[in] _model Model from which to build attached_to graph.
/// \return Errors.
SDFORMAT_VISIBLE
Errors buildFrameAttachedToGraph(
FrameAttachedToGraph &_out, const Model *_model);

/// \brief Build a FrameAttachedToGraph for a world.
/// \param[out] _out Graph object to write.
/// \param[in] _world World from which to build attached_to graph.
/// \return Errors.
SDFORMAT_VISIBLE
Errors buildFrameAttachedToGraph(
FrameAttachedToGraph &_out, const World *_world);

/// \brief Build a PoseRelativeToGraph for a model.
/// \param[out] _out Graph object to write.
/// \param[in] _model Model from which to build attached_to graph.
/// \return Errors.
SDFORMAT_VISIBLE
Errors buildPoseRelativeToGraph(
PoseRelativeToGraph &_out, const Model *_model);

/// \brief Build a PoseRelativeToGraph for a world.
/// \param[out] _out Graph object to write.
/// \param[in] _world World from which to build attached_to graph.
/// \return Errors.
SDFORMAT_VISIBLE
Errors buildPoseRelativeToGraph(
PoseRelativeToGraph &_out, const World *_world);

Expand All @@ -137,14 +132,12 @@ namespace sdf
/// of outbound edges for each vertex and checking for graph cycles.
/// \param[in] _in Graph object to validate.
/// \return Errors.
SDFORMAT_VISIBLE
Errors validateFrameAttachedToGraph(const FrameAttachedToGraph &_in);

/// \brief Confirm that PoseRelativeToGraph is valid by checking the number
/// of outbound edges for each vertex and checking for graph cycles.
/// \param[in] _in Graph object to validate.
/// \return Errors.
SDFORMAT_VISIBLE
Errors validatePoseRelativeToGraph(const PoseRelativeToGraph &_in);

/// \brief Resolve the attached-to body for a given frame. Following the
Expand All @@ -157,7 +150,6 @@ namespace sdf
/// vertex with this name.
/// \return Errors if the graph is invalid or the frame does not lead to
/// a link or world frame.
SDFORMAT_VISIBLE
Errors resolveFrameAttachedToBody(
std::string &_attachedToBody,
const FrameAttachedToGraph &_in,
Expand All @@ -169,7 +161,6 @@ namespace sdf
/// \param[in] _graph PoseRelativeToGraph to read from.
/// \param[in] _vertexName Name of vertex whose pose is to be computed.
/// \return Errors.
SDFORMAT_VISIBLE
Errors resolvePoseRelativeToRoot(
ignition::math::Pose3d &_pose,
const PoseRelativeToGraph &_graph,
Expand All @@ -182,7 +173,6 @@ namespace sdf
/// \param[in] _resolveTo Name of frame relative to which the pose is
/// to be resolved.
/// \return Errors.
SDFORMAT_VISIBLE
Errors resolvePose(
ignition::math::Pose3d &_pose,
const PoseRelativeToGraph &_graph,
Expand Down
2 changes: 1 addition & 1 deletion include/sdf/Joint.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <string>
#include <ignition/math/Pose3.hh>
#include "sdf/Element.hh"
#include "sdf/FrameSemantics.hh"
#include "sdf/SemanticPose.hh"
#include "sdf/Types.hh"
#include "sdf/sdf_config.h"
Expand All @@ -36,6 +35,7 @@ namespace sdf
// Forward declarations.
class JointAxis;
class JointPrivate;
struct PoseRelativeToGraph;

/// \enum JointType
/// \brief The set of joint types. INVALID indicates that joint type has
Expand Down
2 changes: 1 addition & 1 deletion include/sdf/JointAxis.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <string>
#include <ignition/math/Vector3.hh>
#include "sdf/Element.hh"
#include "sdf/FrameSemantics.hh"
#include "sdf/Types.hh"
#include "sdf/sdf_config.h"
#include "sdf/system_util.hh"
Expand All @@ -34,6 +33,7 @@ namespace sdf

// Forward declare private data class.
class JointAxisPrivate;
struct PoseRelativeToGraph;

/// \brief Parameters related to the axis of rotation for rotational joints,
/// and the axis of translation for prismatic joints.
Expand Down
2 changes: 1 addition & 1 deletion include/sdf/Light.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <ignition/math/Angle.hh>

#include "sdf/Element.hh"
#include "sdf/FrameSemantics.hh"
#include "sdf/SemanticPose.hh"
#include "sdf/Types.hh"
#include "sdf/sdf_config.h"
Expand All @@ -37,6 +36,7 @@ namespace sdf

// Forward declare private data class.
class LightPrivate;
struct PoseRelativeToGraph;

/// \enum LightType
/// \brief The set of light types. INVALID indicates that light type has
Expand Down
2 changes: 1 addition & 1 deletion include/sdf/Link.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <string>
#include <ignition/math/Pose3.hh>
#include "sdf/Element.hh"
#include "sdf/FrameSemantics.hh"
#include "sdf/SemanticPose.hh"
#include "sdf/Types.hh"
#include "sdf/sdf_config.h"
Expand All @@ -40,6 +39,7 @@ namespace sdf
class Sensor;
class Visual;
class LinkPrivate;
struct PoseRelativeToGraph;

class SDFORMAT_VISIBLE Link
{
Expand Down
2 changes: 1 addition & 1 deletion include/sdf/Model.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <string>
#include <ignition/math/Pose3.hh>
#include "sdf/Element.hh"
#include "sdf/FrameSemantics.hh"
#include "sdf/SemanticPose.hh"
#include "sdf/Types.hh"
#include "sdf/sdf_config.h"
Expand All @@ -38,6 +37,7 @@ namespace sdf
class Joint;
class Link;
class ModelPrivate;
struct PoseRelativeToGraph;

class SDFORMAT_VISIBLE Model
{
Expand Down
1 change: 1 addition & 0 deletions include/sdf/SemanticPose.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace sdf

// Forward declare private data class.
class SemanticPosePrivate;
struct PoseRelativeToGraph;

/// \brief SemanticPose is a data structure that can be used by different
/// DOM objects to resolve poses on a PoseRelativeToGraph. This object holds
Expand Down
2 changes: 1 addition & 1 deletion include/sdf/Sensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <string>
#include <ignition/math/Pose3.hh>
#include "sdf/Element.hh"
#include "sdf/FrameSemantics.hh"
#include "sdf/SemanticPose.hh"
#include "sdf/Types.hh"
#include "sdf/system_util.hh"
Expand All @@ -40,6 +39,7 @@ namespace sdf
class Lidar;
class Magnetometer;
class SensorPrivate;
struct PoseRelativeToGraph;

/// \enum SensorType
/// \brief The set of sensor types.
Expand Down
2 changes: 1 addition & 1 deletion include/sdf/Visual.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "sdf/Box.hh"
#include "sdf/Cylinder.hh"
#include "sdf/Element.hh"
#include "sdf/FrameSemantics.hh"
#include "sdf/Material.hh"
#include "sdf/Plane.hh"
#include "sdf/SemanticPose.hh"
Expand All @@ -41,6 +40,7 @@ namespace sdf
// Forward declarations.
class VisualPrivate;
class Geometry;
struct PoseRelativeToGraph;

class SDFORMAT_VISIBLE Visual
{
Expand Down
1 change: 1 addition & 0 deletions src/Frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "sdf/Frame.hh"
#include "sdf/Error.hh"
#include "sdf/Types.hh"
#include "sdf/FrameSemantics.hh"
#include "Utils.hh"

using namespace sdf;
Expand Down
1 change: 1 addition & 0 deletions src/JointAxis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <ignition/math/Vector3.hh>
#include "sdf/Error.hh"
#include "sdf/JointAxis.hh"
#include "sdf/FrameSemantics.hh"

using namespace sdf;

Expand Down
1 change: 0 additions & 1 deletion test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ set(tests
fixed_joint_reduction.cc
force_torque_sensor.cc
frame.cc
frame_semantics.cc
geometry_dom.cc
include.cc
includes.cc
Expand Down

0 comments on commit 77e15bb

Please sign in to comment.