WPILibC++
2027.0.0-alpha-3
Loading...
Searching...
No Matches
RotationVectorToMatrix.h
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 "
frc/ct_matrix.h
"
10
11
namespace
frc::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 frc::detail
frc::ct_matrix
Compile-time wrapper for Eigen::Matrix.
Definition
ct_matrix.h:26
ct_matrix.h
frc::detail
Definition
ListenerExecutor.h:12
frc::detail::RotationVectorToMatrix
constexpr ct_matrix3d RotationVectorToMatrix(const ct_vector3d &rotation)
Definition
RotationVectorToMatrix.h:13
frc
geometry
detail
RotationVectorToMatrix.h
Generated on Fri Oct 24 2025 05:38:27 for WPILibC++ by
1.12.0