Skip to content

Commit

Permalink
Upgrade to Drake suggested 1.37.0
Browse files Browse the repository at this point in the history
Toward #373 and
#376.
  • Loading branch information
IanTheEngineer committed Jan 27, 2025
1 parent 85d5ec0 commit f208880
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .lint/.bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# When bazelisk in use, this dotfile specifies which version of Bazel should be
# used to build and test.
USE_BAZEL_VERSION=7.1.2
USE_BAZEL_VERSION=7.4.1
2 changes: 1 addition & 1 deletion bazel_ros2_rules/.bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# When bazelisk in use, this dotfile specifies which version of Bazel should be
# used to build and test.
USE_BAZEL_VERSION=7.1.2
USE_BAZEL_VERSION=7.4.1
8 changes: 3 additions & 5 deletions bazel_ros2_rules/setup/install_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ function dpkg_install_from_curl() {

apt install g++ unzip zlib1g-dev

# TODO(eric.cousineau) Once there's a bazelisk 1.20 that incorporates pr563, we
# should switch to using that here.
dpkg_install_from_curl \
bazelisk 1.19.0 \
https://drake-mirror.csail.mit.edu/github/bazelbuild/bazelisk/pr563/bazelisk_1.19.0-9-g58a850f_amd64.deb \
c2bfd15d6c3422ae540cda9facc0ac395005e2701c09dbb15d40447b53e831d4
bazelisk 1.25.0 \
https://github.com/bazelbuild/bazelisk/releases/download/v1.25.0/bazelisk-amd64.deb \
f16dc348190990eb2e8950e773bc91dcdc7632517e5b63bdc4dd58f90062920c

# Install Python dependencies
apt install python3 python3-toposort python3-dev python-is-python3
5 changes: 3 additions & 2 deletions default.bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Don't use bzlmod (yet); eventually we'll want to enable this.
common --enable_bzlmod=false
# Don't use bzlmod (yet); eventually we'll want to enable this and turn off
# the enable_workspace flag.
common --enable_bzlmod=false --enable_workspace

# Use C++20.
build --cxxopt=-std=c++20
Expand Down
2 changes: 1 addition & 1 deletion drake_ros/.bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# When bazelisk in use, this dotfile specifies which version of Bazel should be
# used to build and test.
USE_BAZEL_VERSION=7.1.2
USE_BAZEL_VERSION=7.4.1
6 changes: 3 additions & 3 deletions drake_ros/drake.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DRAKE_SUGGESTED_VERSION = struct(
url = "https://github.com/RobotLocomotion/drake/archive/refs/tags/v1.34.0.tar.gz", # noqa
sha256 = "0b57df077192a9480b799320c1edee3cc524d5e9b97aaa6861de09681542175f", # noqa,
strip_prefix = "drake-1.34.0",
url = "https://github.com/RobotLocomotion/drake/archive/refs/tags/v1.37.0.tar.gz", # noqa
sha256 = "6bee6762f74c3ec7933b47de601ac3a1d1790f8cae20aa1aba1f78e2c0817a68", # noqa,
strip_prefix = "drake-1.37.0",
)
4 changes: 2 additions & 2 deletions drake_ros/drake_ros/core/cc_pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class PySerializerInterface : public SerializerInterface {
// PYBIND11_OVERLOAD_PURE macro embeds a `return ...;` statement, we must
// wrap it in lambda so that we can post-process the return value.
py::object default_value = [this]() -> py::object {
PYBIND11_OVERLOAD_PURE(
py::object, SerializerInterface, CreateDefaultValue);
PYBIND11_OVERLOAD_PURE(py::object, SerializerInterface,
CreateDefaultValue);
}();
DRAKE_THROW_UNLESS(!default_value.is_none());
return default_value.template cast<const drake::AbstractValue*>()->Clone();
Expand Down
2 changes: 1 addition & 1 deletion drake_ros_examples/.bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# When bazelisk in use, this dotfile specifies which version of Bazel should be
# used to build and test.
USE_BAZEL_VERSION=7.1.2
USE_BAZEL_VERSION=7.4.1
1 change: 0 additions & 1 deletion drake_ros_examples/examples/multirobot/multirobot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ int main(int argc, char** argv) {
// Add a multibody plant and a scene graph to hold the robots
drake::multibody::MultibodyPlantConfig plant_config;
plant_config.time_step = 0.001;
plant_config.discrete_contact_solver = "sap";
auto [plant, scene_graph] =
drake::multibody::AddMultibodyPlant(plant_config, &builder);

Expand Down
2 changes: 1 addition & 1 deletion drake_ros_examples/examples/multirobot/multirobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def main():

# Add a multibody plant and a scene graph to hold the robots
plant, scene_graph = AddMultibodyPlant(
MultibodyPlantConfig(time_step=0.001, discrete_contact_solver="sap"),
MultibodyPlantConfig(time_step=0.001),
builder,
)

Expand Down
2 changes: 1 addition & 1 deletion ros2_example_bazel_installed/.bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# When bazelisk in use, this dotfile specifies which version of Bazel should be
# used to build and test.
USE_BAZEL_VERSION=7.1.2
USE_BAZEL_VERSION=7.4.1
2 changes: 1 addition & 1 deletion ros2_example_bazel_installed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bazel build //...
To run examples binaries directly:

```sh
bazel run //ros2_example_apps:oracle_cc
bazel run //ros2_example_apps:oracle_py
```

```sh
Expand Down
8 changes: 3 additions & 5 deletions ros2_example_bazel_installed/setup/install_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ function dpkg_install_from_curl() {

apt install g++ unzip zlib1g-dev

# TODO(eric.cousineau) Once there's a bazelisk 1.20 that incorporates pr563, we
# should switch to using that here.
dpkg_install_from_curl \
bazelisk 1.19.0 \
https://drake-mirror.csail.mit.edu/github/bazelbuild/bazelisk/pr563/bazelisk_1.19.0-9-g58a850f_amd64.deb \
c2bfd15d6c3422ae540cda9facc0ac395005e2701c09dbb15d40447b53e831d4
bazelisk 1.25.0 \
https://github.com/bazelbuild/bazelisk/releases/download/v1.25.0/bazelisk-amd64.deb \
f16dc348190990eb2e8950e773bc91dcdc7632517e5b63bdc4dd58f90062920c

# If the user did not explicitly specify their installation prefix, install
# ROS 2 Humble.
Expand Down

0 comments on commit f208880

Please sign in to comment.