WPILibC++
2027.0.0-alpha-4
Loading...
Searching...
No Matches
RotationVectorToMatrix.hpp
Go to the documentation of this file.
1
// Copyright (c) FIRST and other WPILib contributors.
2
// Open Source Software; you can modify and/or share it under the terms of
3
// the WPILib BSD license file in the root directory of this project.
4
5
#pragma once
6
7
#include <Eigen/Core>
8
9
#include "
wpi/math/linalg/ct_matrix.hpp
"
10
11
namespace
wpi::math::detail
{
12
13
constexpr
ct_matrix3d
RotationVectorToMatrix
(
const
ct_vector3d
& rotation) {
14
return
ct_matrix3d
{{0.0, -rotation(2), rotation(1)},
15
{rotation(2), 0.0, -rotation(0)},
16
{-rotation(1), rotation(0), 0.0}};
17
}
18
19
constexpr
Eigen::Matrix3d
RotationVectorToMatrix
(
20
const
Eigen::Vector3d& rotation) {
21
return
Eigen::Matrix3d{{0.0, -rotation(2), rotation(1)},
22
{rotation(2), 0.0, -rotation(0)},
23
{-rotation(1), rotation(0), 0.0}};
24
}
25
26
}
// namespace wpi::math::detail
ct_matrix.hpp
wpi::math::detail
Definition
ProfiledPIDController.hpp:20
wpi::math::detail::RotationVectorToMatrix
constexpr ct_matrix3d RotationVectorToMatrix(const ct_vector3d &rotation)
Definition
RotationVectorToMatrix.hpp:13
wpi::math::ct_vector3d
ct_vector< double, 3 > ct_vector3d
Definition
ct_matrix.hpp:387
wpi::math::ct_matrix3d
ct_matrix< double, 3, 3 > ct_matrix3d
Definition
ct_matrix.hpp:385
wpi
math
geometry
detail
RotationVectorToMatrix.hpp
Generated on
for WPILibC++ by
1.15.0