Skip to content

Commit

Permalink
adress review
Browse files Browse the repository at this point in the history
  • Loading branch information
artivis committed Mar 21, 2024
1 parent 0298938 commit d9f2652
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
16 changes: 2 additions & 14 deletions include/manif/impl/sgal3/SGal3Tangent_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ struct SGal3TangentBase : TangentBase<_Derived> {

// SGal3Tangent specific API

//! @brief Get the linear velocity part.
//! @brief Get the linear translation part.
LinBlock lin();
const ConstLinBlock lin() const;

//! @brief Get the angular part.
AngBlock ang();
const ConstAngBlock ang() const;

//! @brief Get the linear acceleration part
//! @brief Get the linear velocity part
LinBlock lin2();
const ConstLinBlock lin2() const;

Expand All @@ -118,18 +118,6 @@ struct SGal3TangentBase : TangentBase<_Derived> {
Eigen::Ref<Eigen::Matrix<Scalar, 3, 3>> E,
const Eigen::Map<const SO3Tangent<Scalar>>& so3
);

// static void fillL(
// Eigen::Ref<Eigen::Matrix<Scalar, 3, 3>> E,
// const Eigen::Map<const SO3Tangent<Scalar>>& so3
// );

// static void fillS(
// Eigen::Ref<Eigen::Matrix<Scalar, 3, 3>> S,
// const Eigen::Map<const SO3Tangent<Scalar>>& so3,
// linearVel,
// t
// );
};

template <typename _Derived>
Expand Down
12 changes: 6 additions & 6 deletions include/manif/impl/sgal3/SGal3_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ struct SGal3Base : LieGroupBase<_Derived> {

/**
* @brief Get the action
* @param[in] v A 3D point.
* @param[in] p A 3D point.
* @param[out] -optional- J_vout_m The Jacobian of the new object wrt this.
* @param[out] -optional- J_vout_v The Jacobian of the new object wrt input object.
*/
template <typename _EigenDerived>
Eigen::Matrix<Scalar, 3, 1>
act(
const Eigen::MatrixBase<_EigenDerived> &v,
const Eigen::MatrixBase<_EigenDerived> &p,
tl::optional<Eigen::Ref<Eigen::Matrix<Scalar, 3, 10>>> J_vout_m = {},
tl::optional<Eigen::Ref<Eigen::Matrix<Scalar, 3, 3>>> J_vout_v = {}
) const;
Expand Down Expand Up @@ -324,26 +324,26 @@ template <typename _Derived>
template <typename _EigenDerived>
Eigen::Matrix<typename SGal3Base<_Derived>::Scalar, 3, 1>
SGal3Base<_Derived>::act(
const Eigen::MatrixBase<_EigenDerived> &v,
const Eigen::MatrixBase<_EigenDerived> &p,
tl::optional<Eigen::Ref<Eigen::Matrix<Scalar, 3, 10>>> J_vout_m,
tl::optional<Eigen::Ref<Eigen::Matrix<Scalar, 3, 3>>> J_vout_v
) const {
assert_vector_dim(v, 3);
assert_vector_dim(p, 3);

Check warning on line 331 in include/manif/impl/sgal3/SGal3_base.h

View check run for this annotation

Codecov / codecov/patch

include/manif/impl/sgal3/SGal3_base.h#L331

Added line #L331 was not covered by tests

const Rotation R(rotation());

if (J_vout_m) {
J_vout_m->template topLeftCorner<3, 3>() = R;
J_vout_m->template block<3, 3>(0, 3).setZero();
J_vout_m->template block<3, 3>(0, 6).noalias() = -R * skew(v);
J_vout_m->template block<3, 3>(0, 6).noalias() = -R * skew(p);
J_vout_m->template topRightCorner<3, 1>() = linearVelocity();
}

if (J_vout_v) {
(*J_vout_v) = R;
}

return translation() + R * v;
return translation() + R * p;
}


Expand Down

0 comments on commit d9f2652

Please sign in to comment.