[wpimath] Add Pose3d(Pose2d) constructor (#4485)

This commit is contained in:
Tyler Veness
2022-10-20 17:23:00 -07:00
committed by GitHub
parent 9d5055176d
commit 16cdc741cf
3 changed files with 21 additions and 0 deletions

View File

@@ -43,6 +43,13 @@ class WPILIB_DLLEXPORT Pose3d {
Pose3d(units::meter_t x, units::meter_t y, units::meter_t z,
Rotation3d rotation);
/**
* Constructs a 3D pose from a 2D pose in the X-Y plane.
*
* @param pose The 2D pose.
*/
explicit Pose3d(const Pose2d& pose);
/**
* Transforms the pose by the given transformation and returns the new
* transformed pose.