Skip to content

Commit

Permalink
πŸ“ Update Pose docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Aang099 committed Jun 28, 2024
1 parent 21236da commit c5d27ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/units/Pose.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

#include "Angle.hpp"
#include "units/Vector2D.hpp"
#include "units/units.hpp"

namespace units {
/**
* @class Pose
*
* @brief A class that represents a position and orientation in 2D space
*
* This class inherits from V2Position, which is identical to Vector2D<Length>. The only difference here
* is that Pose has an additional member variable, orientation.
* This class inherits from Vector2D<Length / derivatives>, and has an additional Orientation component of type <Angle /
* derivatives>, where derivatives is a power of time.
*/
template <typename derivatives> class AbstractPose
: public Vector2D<Divided<Length, Exponentiated<Time, derivatives>>> {
Expand Down Expand Up @@ -81,8 +82,11 @@ template <typename derivatives> class AbstractPose
Divided<Angle, Exponentiated<Time, derivatives>> orientation; /** Orientation */
};

// Position Pose (Length, Angle)
using Pose = AbstractPose<std::ratio<0>>;
// Velocity Pose (Length / Time, Angle / Time)
using VelocityPose = AbstractPose<std::ratio<1>>;
// AccelerationPose (Length / Time^2, Angle / Time^2)
using AccelerationPose = AbstractPose<std::ratio<2>>;

} // namespace units

0 comments on commit c5d27ab

Please sign in to comment.