Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API documentation common Set* features #165

Merged
merged 7 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/ignition/physics/CylinderShape.hh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ namespace ignition
};
};

/////////////////////////////////////////////////
/// \brief This feature sets the CylinderShape properties such as
/// the cylinder radius and height.
class IGNITION_PHYSICS_VISIBLE SetCylinderShapeProperties
: public virtual FeatureWithRequirements<CylinderShapeCast>
{
Expand Down
24 changes: 20 additions & 4 deletions include/ignition/physics/FreeGroup.hh
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,28 @@ namespace ignition
};

/////////////////////////////////////////////////
/// While a physics engine with maximal coordinates can provide
/// \brief This features sets the FreeGroup pose in world frame. However,
/// while a physics engine with maximal coordinates can provide
/// Link::SetWorldPose and similar functions for setting velocity
/// regardless of the kinematic constraints on that link, this behavior
/// is not well defined and difficult to implement with generalized
/// coordinates. The FreeGroup::SetWorldPose function provides an
/// analog to both `Link::SetWorldPose` and `Model::SetWorldPose`.
/// for FreeGroup is not well defined and difficult to implement
/// with generalized coordinates. The FreeGroup::SetWorldPose function should
/// provide an analog to both `Link::SetWorldPose` and `Model::SetWorldPose`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the back ticks here since the previous Link::SetWorldPose didn't use them

class IGNITION_PHYSICS_VISIBLE SetFreeGroupWorldPose
: public virtual FeatureWithRequirements<FindFreeGroupFeature>
{
/// \brief This class defines the FreeGroup concept, which represents a
/// group of links that are not connected to the world with any kinematic
/// constraints. This class also provides a rough definition of this
/// FreeGroup pose in world frame. See FindFreeGroupFeature class
/// documentation for more detail.
public: template <typename PolicyT, typename FeaturesT>
class FreeGroup : public virtual Entity<PolicyT, FeaturesT>
{
public: using PoseType =
typename FromPolicy<PolicyT>::template Use<Pose>;

/// \brief Set this FreeGroup pose in world frame.
public: void SetWorldPose(const PoseType &_pose);
};

Expand All @@ -141,9 +148,16 @@ namespace ignition
};

/////////////////////////////////////////////////
/// \brief This features sets the FreeGroup linear and angular velocity in
/// world frame.
class IGNITION_PHYSICS_VISIBLE SetFreeGroupWorldVelocity
: public virtual FeatureWithRequirements<FindFreeGroupFeature>
{
/// \brief This class defines the FreeGroup concept, which represents a
/// group of links that are not connected to the world with any kinematic
/// constraints. This class also provides a rough definition of this
/// FreeGroup linear and angular velocity in world frame. See
/// FindFreeGroupFeature class documentation for more detail.
public: template <typename PolicyT, typename FeaturesT>
class FreeGroup : public virtual Entity<PolicyT, FeaturesT>
{
Expand All @@ -153,9 +167,11 @@ namespace ignition
public: using AngularVelocity =
typename FromPolicy<PolicyT>::template Use<AngularVector>;

/// \brief Set this FreeGroup linear velocity in world frame.
public: void SetWorldLinearVelocity(
const LinearVelocity &_linearVelocity);

/// \brief Set this FreeGroup angular velocity in world frame.
public: void SetWorldAngularVelocity(
const AngularVelocity &_angularVelocity);
};
Expand Down
5 changes: 5 additions & 0 deletions include/ignition/physics/Joint.hh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ namespace ignition
};

/////////////////////////////////////////////////
/// \brief This feature sets the generalized Joint states such as
/// Position, Velocity, Acceleration of the Joint and the applied Force to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment about capitalization here

/// the Joint.
class IGNITION_PHYSICS_VISIBLE SetBasicJointState : public virtual Feature
{
/// \brief The Joint API for setting basic joint state
Expand Down Expand Up @@ -316,6 +319,8 @@ namespace ignition
};

/////////////////////////////////////////////////
/// \brief This feature sets the commanded value of generalized velocity of
/// this Joint.
class IGNITION_PHYSICS_VISIBLE SetJointVelocityCommandFeature
: public virtual Feature
{
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/physics/RemoveEntities.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ namespace ignition
{
namespace physics
{
/////////////////////////////////////////////////
/// \brief This feature removes a Model entity from the index-specified
/// World.
class IGNITION_PHYSICS_VISIBLE RemoveModelFromWorld : public virtual Feature
{
public: template <typename PolicyT, typename FeaturesT>
Expand Down
4 changes: 4 additions & 0 deletions include/ignition/physics/Shape.hh
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ namespace ignition
};

/////////////////////////////////////////////////
/// \brief This feature sets the Shape collision properties such as
/// the Shape surface friction coefficient and restitution coefficient.
class IGNITION_PHYSICS_VISIBLE SetShapeCollisionProperties
: public virtual Feature
{
Expand Down Expand Up @@ -284,6 +286,8 @@ namespace ignition
};

/////////////////////////////////////////////////
/// \brief This feature sets the Shape's slip compliance of the first
/// and second friction direction in the friction pyramid model.
class IGNITION_PHYSICS_VISIBLE SetShapeFrictionPyramidSlipCompliance
: public virtual Feature
{
Expand Down