18template <
typename T,
typename T2>
24template <
typename T,
typename T2>
30template <
typename T,
int N>
31Eigen::Matrix<ceres::Jet<T, N>, N, 1>
buildJetVec(
const Eigen::Matrix<T, N, 1>& v) {
32 Eigen::Matrix<ceres::Jet<T, N>, N, 1> result;
33 for (
int k = 0; k < N; ++k) {
35 result(k).v.setZero();
42template <
typename T,
int Rows,
int Cols>
43Eigen::Matrix<ceres::Jet<T, Cols * Rows>, Rows, Cols>
buildJetMat(
44 const Eigen::Matrix<T, Rows, Cols>& m) {
45 Eigen::Matrix<ceres::Jet<T, Cols * Rows>, Rows, Cols> result;
46 for (
int iRow = 0; iRow < Rows; ++iRow) {
47 for (
int jCol = 0; jCol < Cols; ++jCol) {
48 result(iRow, jCol).a = m(iRow, jCol);
49 result(iRow, jCol).v.setZero();
50 result(iRow, jCol).v(iRow * Cols + jCol) = 1;
56template <
typename T,
typename T2>
59 const size_t jointParamIdx,
61 Eigen::Ref<
const Eigen::VectorX<T2>> v) {
63 for (
auto index = parameterTransform.
transform.outerIndexPtr()[jointParamIdx];
64 index < parameterTransform.
transform.outerIndexPtr()[jointParamIdx + 1];
66 result += value *
static_cast<T2
>(parameterTransform.
transform.valuePtr()[index]) *
67 v[parameterTransform.
transform.innerIndexPtr()[index]];
T times_parameterTransform_times_v(const T &value, const size_t jointParamIdx, const ParameterTransform ¶meterTransform, Eigen::Ref< const Eigen::VectorX< T2 > > v)
Eigen::Vector3< T > getScaleDerivative(const JointStateT< T2 > &js, const Eigen::Vector3< T > &ref)
constexpr T ln2() noexcept
Returns the natural logarithm of 2 (log_e 2).
Eigen::Matrix< ceres::Jet< T, N >, N, 1 > buildJetVec(const Eigen::Matrix< T, N, 1 > &v)
ParameterTransformT< float > ParameterTransform
Eigen::Matrix< ceres::Jet< T, Cols *Rows >, Rows, Cols > buildJetMat(const Eigen::Matrix< T, Rows, Cols > &m)
Eigen::Vector3< T > getRotationDerivative(const JointStateT< T2 > &js, const size_t index, const Eigen::Vector3< T > &ref)
Represents the state of a joint with local and global transformations.
Matrix3< T > rotationAxis
Rotation axes in global space.