Skip to content

Commit a7597be

Browse files
authored
20.04 updates (#259)
* Add signal-scope for 20.04 * Split bionic (18.04) and focal (20.04) prereq installation scripts * Increment dockerfile versions. Add focal dockerfiles and test. * Update to Drake master
1 parent 1fb87cf commit a7597be

File tree

15 files changed

+107
-15
lines changed

15 files changed

+107
-15
lines changed

.cirrus.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,24 @@ build_task:
1616
--local_ram_resources=24000
1717
--local_cpu_resources=8
1818
//...
19+
build_focal_task:
20+
timeout_in: 120m
21+
container:
22+
dockerfile: install/focal/Dockerfile
23+
cpu: 8
24+
memory: 24
25+
test_script:
26+
- bazel build
27+
--define=WITH_SNOPT=OFF
28+
--local_ram_resources=24000
29+
--local_cpu_resources=8
30+
--jobs=8
31+
//...
32+
- bazel test
33+
--define=WITH_SNOPT=OFF
34+
--local_ram_resources=24000
35+
--local_cpu_resources=8
36+
//...
1937
build_with_ros_task:
2038
timeout_in: 120m
2139
container:

WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ workspace(name = "dairlib")
1111
# export DAIRLIB_LOCAL_DRAKE_PATH=/home/user/workspace/drake
1212

1313
# Choose a revision of Drake to use.
14-
DRAKE_COMMIT = "1cab4e23d5d41690a3c43a0af80cb62f7eaacf3f"
14+
DRAKE_COMMIT = "2f16f87df02d7c6ef436fb87437e59a3df840bb5"
1515

16-
DRAKE_CHECKSUM = "da63499c336e690afa41db030c7586e8c2c2ae53ca0a81acf8f94d162a6a2b0e"
16+
DRAKE_CHECKSUM = "fb65e3f2949a7d50075afa658ec0043b6c8a32f8f692628032c53a18176eff76"
1717
# Before changing the COMMIT, temporarily uncomment the next line so that Bazel
1818
# displays the suggested new value for the CHECKSUM.
1919
# DRAKE_CHECKSUM = "0" * 64

examples/Cassie/cassie_state_estimator.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <fstream>
77
#include <utility>
88

9-
#include "drake/math/orthonormal_basis.h"
109
#include "drake/solvers/equality_constrained_qp_solver.h"
1110
#include "drake/solvers/mathematical_program.h"
1211
#include "drake/solvers/solve.h"

examples/Cassie/osc_jump/toe_angle_traj_generator.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ FlightToeAngleTrajGenerator::FlightToeAngleTrajGenerator(
2727
DRAKE_DEMAND(feet_contact_points_.size() == 2);
2828
// Input/Output Setup
2929
state_port_ =
30-
this->DeclareVectorInputPort(OutputVector<double>(plant.num_positions(),
30+
this->DeclareVectorInputPort("x, u, t", OutputVector<double>(plant.num_positions(),
3131
plant.num_velocities(),
3232
plant.num_actuators()))
3333
.get_index();
34-
fsm_port_ = this->DeclareVectorInputPort(BasicVector<double>(1)).get_index();
34+
fsm_port_ = this->DeclareVectorInputPort("fsm", BasicVector<double>(1)).get_index();
3535

3636
PiecewisePolynomial<double> empty_pp_traj(Eigen::VectorXd(0));
3737
Trajectory<double>& traj_inst = empty_pp_traj;

install/bionic/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ros:melodic-ros-base-bionic
22
WORKDIR /dairlib
3-
ENV DAIRLIB_DOCKER_VERSION=0.1
3+
ENV DAIRLIB_DOCKER_VERSION=0.21
44
COPY . .
55
RUN apt-get update && apt-get install -y wget lsb-release pkg-config zip g++ zlib1g-dev unzip python
66
RUN set -eux \
@@ -14,5 +14,5 @@ RUN if type sudo 2>/dev/null; then \
1414
fi
1515
RUN set -eux \
1616
&& export DEBIAN_FRONTEND=noninteractive \
17-
&& yes | install/install_prereqs_ubuntu.sh \
17+
&& yes | install/install_prereqs_bionic.sh \
1818
&& rm -rf /var/lib/apt/lists/*

install/bionic/ros/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ros:melodic-ros-base-bionic
22
WORKDIR /dairlib
3-
ENV DAIRLIB_DOCKER_VERSION=0.1
3+
ENV DAIRLIB_DOCKER_VERSION=0.21
44
COPY . .
55
RUN apt-get update && apt-get install -y wget lsb-release pkg-config zip g++ zlib1g-dev unzip python
66
RUN apt-get install -y python-rosinstall-generator python-catkin-tools
@@ -15,5 +15,5 @@ RUN if type sudo 2>/dev/null; then \
1515
fi
1616
RUN set -eux \
1717
&& export DEBIAN_FRONTEND=noninteractive \
18-
&& yes | install/install_prereqs_ubuntu.sh \
18+
&& yes | install/install_prereqs_bionic.sh \
1919
&& rm -rf /var/lib/apt/lists/*

install/focal/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM ros:noetic-ros-base-focal
2+
WORKDIR /dairlib
3+
ENV DAIRLIB_DOCKER_VERSION=0.21
4+
COPY . .
5+
RUN apt-get update && apt-get install -y wget lsb-release pkg-config zip g++ zlib1g-dev unzip python
6+
RUN set -eux \
7+
&& apt-get install --no-install-recommends locales \
8+
&& locale-gen en_US.UTF-8
9+
RUN if type sudo 2>/dev/null; then \
10+
echo "The sudo command already exists... Skipping."; \
11+
else \
12+
echo -e "#!/bin/sh\n\${@}" > /usr/sbin/sudo; \
13+
chmod +x /usr/sbin/sudo; \
14+
fi
15+
RUN set -eux \
16+
&& export DEBIAN_FRONTEND=noninteractive \
17+
&& yes | install/install_prereqs_focal.sh \
18+
&& rm -rf /var/lib/apt/lists/*

install/focal/ros/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ros:noetic-ros-base-focal
2+
WORKDIR /dairlib
3+
ENV DAIRLIB_DOCKER_VERSION=0.21
4+
COPY . .
5+
RUN apt-get update && apt-get install -y wget lsb-release pkg-config zip g++ zlib1g-dev unzip python
6+
RUN apt-get install -y python-rosinstall-generator python-catkin-tools
7+
RUN set -eux \
8+
&& apt-get install --no-install-recommends locales \
9+
&& locale-gen en_US.UTF-8
10+
RUN if type sudo 2>/dev/null; then \
11+
echo "The sudo command already exists... Skipping."; \
12+
else \
13+
echo -e "#!/bin/sh\n\${@}" > /usr/sbin/sudo; \
14+
chmod +x /usr/sbin/sudo; \
15+
fi
16+
RUN set -eux \
17+
&& export DEBIAN_FRONTEND=noninteractive \
18+
&& yes | install/install_prereqs_focal.sh \
19+
&& rm -rf /var/lib/apt/lists/*
File renamed without changes.

install/install_prereqs_focal.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# look in WORKSPACE file for appropriate commit number
4+
DRAKE_COMMIT=$(grep -oP '(?<=DRAKE_COMMIT = ")(.*)(?=")' $(dirname "$0")/../WORKSPACE)
5+
6+
ubuntu_codename=$(lsb_release -sc)
7+
8+
# Add drake apt repository for lcm and libbot2
9+
wget -O - https://drake-apt.csail.mit.edu/drake.pub.gpg | apt-key add
10+
echo "deb [arch=amd64] https://drake-apt.csail.mit.edu/focal focal main" > /etc/apt/sources.list.d/drake.list
11+
apt-get update
12+
13+
echo "Using Drake commit '${DRAKE_COMMIT}'"
14+
# Download and run drake install scripts
15+
mkdir tmp
16+
cd tmp
17+
wget "https://raw.githubusercontent.com/RobotLocomotion/drake/${DRAKE_COMMIT}/setup/ubuntu/install_prereqs.sh"
18+
mkdir source_distribution
19+
cd source_distribution
20+
wget "https://raw.githubusercontent.com/RobotLocomotion/drake/${DRAKE_COMMIT}/setup/ubuntu/source_distribution/install_prereqs.sh"
21+
# skipping drake's "install_prereqs_user_environment.sh"
22+
touch install_prereqs_user_environment.sh
23+
wget "https://raw.githubusercontent.com/RobotLocomotion/drake/${DRAKE_COMMIT}/setup/ubuntu/source_distribution/packages-${ubuntu_codename}.txt"
24+
wget "https://raw.githubusercontent.com/RobotLocomotion/drake/${DRAKE_COMMIT}/setup/ubuntu/source_distribution/packages-${ubuntu_codename}-test-only.txt"
25+
cd ..
26+
mkdir binary_distribution
27+
cd binary_distribution
28+
wget "https://raw.githubusercontent.com/RobotLocomotion/drake/${DRAKE_COMMIT}/setup/ubuntu/binary_distribution/install_prereqs.sh"
29+
wget "https://raw.githubusercontent.com/RobotLocomotion/drake/${DRAKE_COMMIT}/setup/ubuntu/binary_distribution/packages-${ubuntu_codename}.txt"
30+
cd ..
31+
chmod +x install_prereqs.sh
32+
./install_prereqs.sh
33+
cd ..
34+
rm -rf tmp/
35+
# In addition to drake, install lcm and libbot2
36+
apt install lcm libbot2

multibody/kinematic/distance_evaluator.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include "multibody/kinematic/distance_evaluator.h"
22

3-
#include "drake/math/orthonormal_basis.h"
4-
53
using drake::MatrixX;
64
using drake::Matrix3X;
75
using drake::VectorX;

systems/ros/ros_subscriber_system.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ class RosSubscriberSystem : public drake::systems::LeafSystem<double> {
6363
*/
6464
RosSubscriberSystem(const std::string& topic, ros::NodeHandle* node_handle)
6565
: topic_(topic), node_handle_(node_handle) {
66-
DRAKE_DEMAND(node_handle_);
66+
DRAKE_DEMAND(node_handle_ != nullptr);
6767

6868

6969
subscriber_ = node_handle->subscribe(
7070
topic, 1, &RosSubscriberSystem<RosMessage>::HandleMessage, this);
7171

7272
DeclareAbstractOutputPort(
73+
topic,
7374
[this]() {
7475
return this->AllocateOutputValue();
7576
},
@@ -151,8 +152,7 @@ class RosSubscriberSystem : public drake::systems::LeafSystem<double> {
151152
drake::systems::EventCollection<
152153
drake::systems::UnrestrictedUpdateEvent<double>>&
153154
uu_events = events->get_mutable_unrestricted_update_events();
154-
uu_events.add_event(
155-
std::make_unique<drake::systems::UnrestrictedUpdateEvent<double>>(
155+
uu_events.AddEvent(drake::systems::UnrestrictedUpdateEvent<double>(
156156
drake::systems::Event<double>::TriggerType::kTimed));
157157
}
158158

systems/trajectory_optimization/dircon_position_data.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <vector>
33

44
#include "systems/trajectory_optimization/dircon_position_data.h"
5-
#include "drake/math/orthonormal_basis.h"
65

76
namespace dairlib {
87

tools/workspace/ros/compile_ros_workspace.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
# Only tested on Ubuntu 18.04
23
BASE_DIR="$PWD"
34

45
cd $(dirname "$BASH_SOURCE")

tools/workspace/signal_scope/repository.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ def _impl(repository_ctx):
2020
urls = ["https://www.seas.upenn.edu/~posa/files/signal-scope/signal-scope-18.04.zip"]
2121
sha256 = "b9dd567bde8f4a1043ae9f13194b7a2cf9c8c716f8e7373f11a98a770c404d54"
2222
prefix = "signal-scope-18.04"
23+
elif os_result.ubuntu_release == "20.04":
24+
urls = ["https://www.seas.upenn.edu/~posa/files/signal-scope/signal-scope-20.04.zip"]
25+
sha256 = "6bb42fdec9767984d21cd07ab0eb13e11189c3a1b5931a5fabef4c23de247fa6"
26+
prefix = "signal-scope-20.04"
2327
else:
2428
fail("Operating system is NOT supported", attr = os_result)
2529

0 commit comments

Comments
 (0)