-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f15fd8
commit 64798c6
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,71 @@ | ||
#include "units/Vector2D.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, theta, which represents orientation. | ||
*/ | ||
class Pose : public V2Position { | ||
protected: | ||
Angle theta; | ||
Angle theta; /** Orientation */ | ||
public: | ||
/** | ||
* @brief Construct a new Pose object | ||
* | ||
* This constructor initializes x, y, and orientation to 0 | ||
*/ | ||
Pose(); | ||
|
||
/** | ||
* @brief Construct a new Pose object | ||
* | ||
* This constructor initializes x, y to the given values and orientation to 0 | ||
* | ||
* @param v position | ||
*/ | ||
Pose(V2Position v); | ||
|
||
/** | ||
* @brief Construct a new Pose object | ||
* | ||
* @param v position | ||
* @param h orientation | ||
*/ | ||
Pose(V2Position v, Angle h); | ||
|
||
/** | ||
* @brief Construct a new Pose object | ||
* | ||
* @param nx x position | ||
* @param ny y position | ||
*/ | ||
Pose(Length nx, Length ny); | ||
|
||
/** | ||
* @brief Construct a new Pose object | ||
* | ||
* @param nx x position | ||
* @param ny y position | ||
* @param nh orientation | ||
*/ | ||
Pose(Length nx, Length ny, Angle nh); | ||
|
||
/** | ||
* @brief Get the orientation | ||
* | ||
* @return Angle orientation | ||
*/ | ||
Angle getTheta(); | ||
|
||
/** | ||
* @brief Set the orientation | ||
* | ||
* @param h orientation | ||
*/ | ||
void setTheta(Angle h); | ||
}; | ||
} // namespace units |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters