Skip to content

Commit

Permalink
math: Deprecate expmap.h (RobotLocomotion#14099)
Browse files Browse the repository at this point in the history
* math: Deprecate expmap.h
  • Loading branch information
jwnimmer-tri authored Sep 21, 2020
1 parent 19a15cd commit da323a9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions math/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ drake_cc_googletest(

drake_cc_googletest(
name = "expmap_test",
copts = [
"-Wno-deprecated-declarations",
],
deps = [
":expmap",
"//common/test_utilities:eigen_matrix_compare",
Expand Down
17 changes: 17 additions & 0 deletions math/expmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "drake/common/autodiff.h"
#include "drake/common/drake_assert.h"
#include "drake/common/drake_deprecated.h"
#include "drake/math/autodiff.h"
#include "drake/math/autodiff_gradient.h"

Expand Down Expand Up @@ -60,6 +61,10 @@ Eigen::Matrix<typename Derived::Scalar, 4, 1> expmap2quatDegenerate(
} // namespace internal

template <typename Derived>
DRAKE_DEPRECATED("2021-01-01",
"All functions in drake/math/expmap.h are unused within Drake and will be "
"removed. Users may copy the functions into their own project per Drake's "
"license terms.")
Eigen::Matrix<typename Derived::Scalar, 4, 1> expmap2quat(
const Eigen::MatrixBase<Derived>& v) {
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Eigen::MatrixBase<Derived>, 3);
Expand All @@ -73,6 +78,10 @@ Eigen::Matrix<typename Derived::Scalar, 4, 1> expmap2quat(
}

template <typename DerivedQ>
DRAKE_DEPRECATED("2021-01-01",
"All functions in drake/math/expmap.h are unused within Drake and will be "
"removed. Users may copy the functions into their own project per Drake's "
"license terms.")
Eigen::Matrix<typename DerivedQ::Scalar, 3, 1> quat2expmap(
const Eigen::MatrixBase<DerivedQ>& q) {
typedef typename DerivedQ::Scalar Scalar;
Expand All @@ -91,6 +100,10 @@ Eigen::Matrix<typename DerivedQ::Scalar, 3, 1> quat2expmap(
}

template <typename Derived1, typename Derived2>
DRAKE_DEPRECATED("2021-01-01",
"All functions in drake/math/expmap.h are unused within Drake and will be "
"removed. Users may copy the functions into their own project per Drake's "
"license terms.")
Eigen::Matrix<typename Derived1::Scalar, 3, 1> closestExpmap(
const Eigen::MatrixBase<Derived1>& expmap1,
const Eigen::MatrixBase<Derived2>& expmap2) {
Expand Down Expand Up @@ -140,6 +153,10 @@ Eigen::Matrix<typename Derived1::Scalar, 3, 1> closestExpmap(
}

template <typename DerivedQ, typename DerivedE>
DRAKE_DEPRECATED("2021-01-01",
"All functions in drake/math/expmap.h are unused within Drake and will be "
"removed. Users may copy the functions into their own project per Drake's "
"license terms.")
void quat2expmapSequence(const Eigen::MatrixBase<DerivedQ>& quat,
const Eigen::MatrixBase<DerivedQ>& quat_dot,
// TODO(#2274) Fix NOLINTNEXTLINE(runtime/references).
Expand Down

0 comments on commit da323a9

Please sign in to comment.