Skip to content

Instantly share code, notes, and snippets.

View jwnimmer-tri's full-sized avatar

Jeremy Nimmer jwnimmer-tri

  • Toyota Research Institute
View GitHub Profile
@jwnimmer-tri
jwnimmer-tri / hardware_station_monitor.py
Last active November 29, 2024 16:26
item locking prototype; 2024-10-17; licensed under Drake's BSD-3-Clause
import abc
from pydrake.systems.framework import Context, EventStatus
class HardwareStationMonitor(abc.ABC):
"""Base class for all station simuation components that interact with
Drake's Simulator.set_monitor feature."""
@abc.abstractmethod
@jwnimmer-tri
jwnimmer-tri / jenkins.log
Last active March 30, 2020 13:49
jenkins.log valgrind gl_renderer
[2020-03-28T06:59:00.426Z] FAIL: //geometry/render/gl_renderer:opengl_context_test (see /media/ephemeral0/ubuntu/workspace/linux-bionic-clang-bazel-nightly-valgrind-memcheck/_bazel_ubuntu/e3a17ea9b3fa24f286c626398f92b05a/execroot/drake/bazel-out/k8-dbg/testlogs/geometry/render/gl_renderer/opengl_context_test/test.log)
[2020-03-28T06:59:00.426Z] INFO: From Testing //geometry/render/gl_renderer:opengl_context_test:
[2020-03-28T06:59:00.426Z] ==================== Test output for //geometry/render/gl_renderer:opengl_context_test:
[2020-03-28T06:59:00.426Z] ==17== Memcheck, a memory error detector
[2020-03-28T06:59:00.426Z] ==17== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
[2020-03-28T06:59:00.426Z] ==17== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
[2020-03-28T06:59:00.426Z] ==17== Command: geometry/render/gl_renderer/opengl_context_test
[2020-03-28T06:59:00.426Z] ==17==
[2020-03-28T06:59:00.426Z] Using drake_cc_googletest_main.cc
[2020-03-28T06:59:00.426Z]
@jwnimmer-tri
jwnimmer-tri / xorg.sh
Created March 16, 2020 18:00
CI script for starting xorg server on Ubuntu 18.04
# Start the X DISPLAY server.
apt_install xserver-xorg-core
sudo systemctl stop xorg.service || true
cat | sudo tee /lib/systemd/system/xorg.service <<EOF
[Unit]
Description=X Server
After=network.target
[Service]
ExecStart=/usr/bin/X :0
#!/bin/sh
set -ex
# Download buildozer if you need it
# https://github.com/bazelbuild/buildtools/releases
buildozer=${HOME}/Downloads/buildozer
test -x $buildozer
# The stems.txt should list of components to be processed one per line, e.g.:

This post contains instructions to users about how to update their code to the new MathematicalProgram APIs.

For C++ code that called MathematicalProgram::Solve

We have deprecated the method MathematicalProgram::Solve() (non-const), because it stores the results back into MathematicalProgram (not threadsafe) and because it induces a dependency cycle (program-uses-solvers and solvers-use-program).

Code that previously looked like this:

#include "drake/solvers/mathematical_program.h"
diff --git a/math/barycentric.cc b/math/barycentric.cc
index d4ba892..92f4fd6 100644
--- a/math/barycentric.cc
+++ b/math/barycentric.cc
@@ -14,19 +14,19 @@ namespace drake {
namespace math {
template <typename T>
-BarycentricMesh<T>::BarycentricMesh(std::unique_ptr<MeshGrid> input_grid)
+BarycentricMesh<T>::BarycentricMesh(MeshGrid input_grid)