Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated code 2020-12 #14398

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions math/quaternion.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,62 +110,6 @@ typename Derived1::Scalar quatDiffAxisInvar(
2 * pow(u(0) * r(1) + u(1) * r(2) + u(2) * r(3), 2);
}

/**
* Q = Slerp(q1, q2, f) Spherical linear interpolation between two quaternions
* This function uses the implementation given in Algorithm 8 of [1].
*
* @param q1 Initial quaternion (w, x, y, z)
* @param q2 Final quaternion (w, x, y, z)
* @param interpolation_parameter between 0 and 1 (inclusive)
* @retval Q Interpolated quaternion(s). 4-by-1 vector.
*
* [1] Kuffner, J.J., "Effective sampling and distance metrics for 3D rigid
* body path planning," Robotics and Automation, 2004. Proceedings. ICRA '04.
* 2004 IEEE International Conference on , vol.4, no., pp.3993, 3998 Vol.4,
* April 26-May 1, 2004
* doi: 10.1109/ROBOT.2004.1308895
*/
template <typename Derived1, typename Derived2, typename Scalar>
DRAKE_DEPRECATED("2020-12-01", "Use Eigen::Quaternion<T>::slerp() instead")
Vector4<Scalar> Slerp(const Eigen::MatrixBase<Derived1>& q1,
const Eigen::MatrixBase<Derived2>& q2,
const Scalar& interpolation_parameter) {
// TODO(hongkai.dai@tri.global): Switch to Eigen's Quaternion when we fix
// the range problem in Eigen
using std::acos;
using std::sin;

// Compute the quaternion inner product
auto lambda = (q1.transpose() * q2).value();
int q2_sign;
if (lambda < Scalar(0)) {
// The quaternions are pointing in opposite directions, so use the
// equivalent alternative representation for q2
lambda = -lambda;
q2_sign = -1;
} else {
q2_sign = 1;
}

// Calculate interpolation factors
// TODO(tkoolen): do we really want an epsilon so small?
Scalar r, s;
if (std::abs(1.0 - lambda) < Eigen::NumTraits<Scalar>::epsilon()) {
// The quaternions are nearly parallel, so use linear interpolation
r = 1.0 - interpolation_parameter;
s = interpolation_parameter;
} else {
Scalar alpha = acos(lambda);
Scalar gamma = 1.0 / sin(alpha);
r = std::sin((1.0 - interpolation_parameter) * alpha) * gamma;
s = std::sin(interpolation_parameter * alpha) * gamma;
}

auto ret = (q1 * r).eval();
ret += q2 * (q2_sign * s);
return ret;
}

/**
* This function tests whether a quaternion is in "canonical form" meaning that
* it tests whether the quaternion [w, x, y, z] has a non-negative w value.
Expand Down
5 changes: 2 additions & 3 deletions systems/analysis/simulator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,9 @@ SimulatorStatus Simulator<T>::AdvanceTo(const T& boundary_time) {

DRAKE_DEMAND(!std::isnan(last_known_simtime_));
if (last_known_simtime_ != context_->get_time()) {
static const logging::Warn log_once(
throw std::logic_error(
"Simulation time has changed since last Initialize() or AdvanceTo()."
" Resetting simulation time requires a call to Initialize()."
" This warning will become a hard error on or after 2020-12-01.");
" Resetting simulation time requires a call to Initialize().");
}

DRAKE_THROW_UNLESS(boundary_time >= context_->get_time());
Expand Down
5 changes: 2 additions & 3 deletions systems/analysis/simulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,8 @@ class Simulator {
///
/// @note In particular, if you changed the time you must call Initialize().
/// The time-triggered events must be recalculated in case one is due at the
/// new starting time. Currently, the AdvanceTo() call will print a warning
/// for the first violation; after 2020-12-01 the warning will become a hard
/// error.
/// new starting time. The AdvanceTo() call will throw an exception if the
/// Initialize() call is missing.
///
/// @note The only way to suppress initialization events is by calling
/// Initialize() explicitly. The most common scenario for this is when
Expand Down
6 changes: 0 additions & 6 deletions systems/framework/framework_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ typedef enum {
kAbstractValued = 1,
} PortDataType;

/** Port type indicating a vector value whose size is not prespecified but
rather depends on what it is connected to (not yet implemented). */
DRAKE_DEPRECATED("2020-12-01",
"AutoSize was never implemented; the putative support is being removed.")
constexpr int kAutoSize = -1;

/** (Advanced.) Tag type that indicates a system or port should use a default
name, instead of a user-provided name. Most users will use the kUseDefaultName
constant, without ever having to mention this type. */
Expand Down
7 changes: 0 additions & 7 deletions systems/framework/port_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ PortBase::PortBase(
DRAKE_DEMAND(kind_string != nullptr);
DRAKE_DEMAND(owning_system != nullptr);
DRAKE_DEMAND(!name_.empty());
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
if (size_ == kAutoSize) {
throw std::domain_error(
"Auto-size ports are deprecated and unimplemented.");
}
#pragma GCC diagnostic pop
}

PortBase::~PortBase() = default;
Expand Down
8 changes: 0 additions & 8 deletions systems/framework/subvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ class Subvector final : public VectorBase<T> {
}
}

/// Constructs an empty subvector.
/// @param vector The vector to slice. Must not be nullptr. Must remain
/// valid for the lifetime of this object.
DRAKE_DEPRECATED("2020-12-01",
"The slice specification now must always be provided, even if zero.")
explicit Subvector(VectorBase<T>* vector)
: Subvector(vector, 0, 0) {}

int size() const final { return num_elements_; }

private:
Expand Down
9 changes: 0 additions & 9 deletions systems/framework/test/subvector_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ TEST_F(SubvectorTest, NullptrVector) {
EXPECT_THROW(Subvector<double> subvec(nullptr, 0, 0), std::exception);
}

TEST_F(SubvectorTest, EmptySubvectorDeprecated) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
Subvector<double> subvec(vector_.get());
#pragma GCC diagnostic pop
EXPECT_EQ(0, subvec.size());
EXPECT_THROW(subvec.GetAtIndex(0), std::exception);
}

TEST_F(SubvectorTest, OutOfBoundsSubvector) {
EXPECT_THROW(Subvector<double>(vector_.get(), 1, 4), std::exception);
}
Expand Down
15 changes: 0 additions & 15 deletions tools/workspace/bullet/BUILD.bazel

This file was deleted.

39 changes: 0 additions & 39 deletions tools/workspace/bullet/package.BUILD.bazel

This file was deleted.

15 changes: 0 additions & 15 deletions tools/workspace/bullet/repository.bzl

This file was deleted.

6 changes: 0 additions & 6 deletions tools/workspace/bullet/stub.cc

This file was deleted.

6 changes: 0 additions & 6 deletions tools/workspace/default.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ load("@drake//tools/workspace/bazel_skylib:repository.bzl", "bazel_skylib_reposi
load("@drake//tools/workspace/blas:repository.bzl", "blas_repository")
load("@drake//tools/workspace/boost:repository.bzl", "boost_repository")
load("@drake//tools/workspace/buildifier:repository.bzl", "buildifier_repository") # noqa
load("@drake//tools/workspace/bullet:repository.bzl", "bullet_repository")
load("@drake//tools/workspace/cc:repository.bzl", "cc_repository")
load("@drake//tools/workspace/ccd:repository.bzl", "ccd_repository")
load("@drake//tools/workspace/cds:repository.bzl", "cds_repository")
Expand All @@ -21,7 +20,6 @@ load("@drake//tools/workspace/eigen:repository.bzl", "eigen_repository")
load("@drake//tools/workspace/expat:repository.bzl", "expat_repository")
load("@drake//tools/workspace/fcl:repository.bzl", "fcl_repository")
load("@drake//tools/workspace/fmt:repository.bzl", "fmt_repository")
load("@drake//tools/workspace/freetype2:repository.bzl", "freetype2_repository") # noqa
load("@drake//tools/workspace/gflags:repository.bzl", "gflags_repository")
load("@drake//tools/workspace/gfortran:repository.bzl", "gfortran_repository")
load("@drake//tools/workspace/ghc_filesystem:repository.bzl", "ghc_filesystem_repository") # noqa
Expand Down Expand Up @@ -104,8 +102,6 @@ def add_default_repositories(excludes = [], mirrors = DEFAULT_MIRRORS):
boost_repository(name = "boost")
if "buildifier" not in excludes:
buildifier_repository(name = "buildifier", mirrors = mirrors)
if "bullet" not in excludes:
bullet_repository(name = "bullet", mirrors = mirrors)
if "cc" not in excludes:
cc_repository(name = "cc")
if "ccd" not in excludes:
Expand Down Expand Up @@ -136,8 +132,6 @@ def add_default_repositories(excludes = [], mirrors = DEFAULT_MIRRORS):
fcl_repository(name = "fcl", mirrors = mirrors)
if "fmt" not in excludes:
fmt_repository(name = "fmt", mirrors = mirrors)
if "freetype2" not in excludes:
freetype2_repository(name = "freetype2")
if "gflags" not in excludes:
gflags_repository(name = "gflags")
if "gfortran" not in excludes:
Expand Down
8 changes: 0 additions & 8 deletions tools/workspace/freetype2/BUILD.bazel

This file was deleted.

22 changes: 0 additions & 22 deletions tools/workspace/freetype2/repository.bzl

This file was deleted.