-
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.
Merge pull request #7 from LemLib/pose-derivatives
✨ Pose Derivatives
- Loading branch information
Showing
2 changed files
with
188 additions
and
22 deletions.
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
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,15 +1,39 @@ | ||
#include "units/Pose.hpp" | ||
|
||
namespace units { | ||
Pose::Pose() : V2Position(), theta(0.0) {} | ||
Pose::Pose() : V2Position(), orientation(0.0) {} | ||
|
||
Pose::Pose(V2Position v) : V2Position(v), theta(0.0) {} | ||
Pose::Pose(V2Position v) : V2Position(v), orientation(0.0) {} | ||
|
||
Pose::Pose(V2Position v, Angle h) : V2Position(v), theta(0.0) {} | ||
Pose::Pose(V2Position v, Angle orientation) : V2Position(v), orientation(orientation) {} | ||
|
||
Pose::Pose(Length nx, Length ny, Angle nh) : V2Position(nx, ny), theta(nh) {} | ||
Pose::Pose(Length x, Length y, Angle orientation) : V2Position(x, y), orientation(orientation) {} | ||
|
||
Angle Pose::getTheta() { return theta; } | ||
Angle Pose::getOrientation() { return orientation; } | ||
|
||
void Pose::setTheta(Angle h) { theta = h; } | ||
void Pose::setOrientation(Angle orientation) { this->orientation = orientation; } | ||
|
||
VelocityPose::VelocityPose() : V2Velocity(), angularVelocity(0.0) {} | ||
|
||
VelocityPose::VelocityPose(V2Velocity v) : V2Velocity(v), angularVelocity(0.0) {} | ||
|
||
VelocityPose::VelocityPose(V2Velocity v, AngularVelocity angularVelocity) | ||
: V2Velocity(v), angularVelocity(angularVelocity) {} | ||
|
||
AngularVelocity VelocityPose::getAngularVelocity() { return angularVelocity; } | ||
|
||
void VelocityPose::setAngularVelocity(AngularVelocity angularVelocity) { this->angularVelocity = angularVelocity; } | ||
|
||
AccelerationPose::AccelerationPose() : V2Acceleration(), angularAcceleration(0.0) {} | ||
|
||
AccelerationPose::AccelerationPose(V2Acceleration v) : V2Acceleration(v), angularAcceleration(0.0) {} | ||
|
||
AccelerationPose::AccelerationPose(V2Acceleration v, AngularAcceleration angularAcceleration) | ||
: V2Acceleration(v), angularAcceleration(angularAcceleration) {} | ||
|
||
AngularAcceleration AccelerationPose::getAngularAcceleration() { return angularAcceleration; } | ||
|
||
void AccelerationPose::setAngularAcceleration(AngularAcceleration angularAcceleration) { | ||
this->angularAcceleration = angularAcceleration; | ||
} | ||
} // namespace units |