Skip to content

Instantly share code, notes, and snippets.

Eric Cousineau EricCousineau-TRI

  • Toyota Research Institute
Block or report user

Report or block EricCousineau-TRI

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 2019-11-14-sdformat-semantic-pose-idea.cc
template <typename Class, typename... Args>
math::RigidTransformd ResolveRigidTransform(
const Class& element, Args... args) {
ignition::math::Pose3d pose;
ThrowAnyErrors(element.ResolvePose(args..., pose));
return ToRigidTransform(pose);
}
ResolveRigidTransform(link, model_frame)
View drake_pr12242_replace.py
#!/usr/bin/env python3
import os
from os.path import basename, dirname, abspath, join, isfile, splitext
from subprocess import run, check_output
import multiprocessing as mp
import re
files = [
# "attic/manipulation/scene_generation/test/test_random_clutter_to_rest.cc",
View blender_dump_race_spaceship_snippet.json
# Small JSON snippet using this stuff:
# https://github.com/EricCousineau-TRI/blender_server/blob/175054b15df1dc0b99795cc15fe80ef555d7dafa/blender_dump.py
...
"Cylinder.002": {
"_obj_id": 140067398049800,
"_path": "scenes['Scene'].collection.all_objects['Cylinder.002']",
"_relpath": "['Cylinder.002']",
"_type": "<class 'bpy_types.Object'>",
"animation_data": null,
"animation_visualization": {
View download_jenkins_stuff_with_auth.sh
# https://superuser.com/questions/1320212/firefox-download-from-command-line
set -eux
for build in $(seq 100 110); do
curl '{jenkins}/job/{job}/'${build}'/artifact/*zip*/archive.zip' \
{output from cURL}
-o ${build}.zip
done
View pytorch_pydrake_backtrace.txt
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007fcb5cdbd801 in __GI_abort () at abort.c:79
#2 0x00007fcb5ce06897 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fcb5cf33b9a "%s\n")
at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007fcb5ce0d90a in malloc_printerr (str=str@entry=0x7fcb5cf31d88 "free(): invalid pointer") at malloc.c:5350
#4 0x00007fcb5ce14e1c in _int_free (have_lock=0, p=0x2736548, av=0x7fcb5d168c40 <main_arena>) at malloc.c:4157
#5 __GI___libc_free (mem=0x2736558)
View model_regression_test.output.txt
# From: https://github.com/RobotLocomotion/drake/issues/12063#issuecomment-532340730
KinematicError: /configuration[@note='Ones']/frame[@name='iiwa14::iiwa_link_2']:
translation: 2.6613411018572645e-17
rotation: 1.3834338342131005
KinematicError: /configuration[@note='Ones']/frame[@name='iiwa14::iiwa_link_3']:
translation: 0.19608449058033037
rotation: 1.3834338342131005
KinematicError: /configuration[@note='Ones']/frame[@name='iiwa14::iiwa_link_4']:
translation: 0.40271631317231665
View drake_pr_11942.txt
+ git log -n 1
commit 095aa18d56d3d05698f361764ff56ab9525134e6
Author: Jamie Snape <jamie.snape@kitware.com>
Date: Mon Aug 19 11:21:07 2019 -0400
Fix build of no_csdp, no_osqp, and no_scs
+ bazel test --define=NO_DREAL=ON -k ...
INFO: Invocation ID: ae481166-31be-43a3-aa9f-edd764eb69a3
Loading:
Loading: 0 packages loaded
View documentation_pybind_snippet.h
// Starting from L39937, drake @ c6f0525c9
// ...
// Symbol: drake::math::RigidTransform::RigidTransform<T>
struct /* ctor */ {
// Source: drake/math/rigid_transform.h:73
const char* doc_0args =
R"""(Constructs the RigidTransform that corresponds to aligning the two
frames so unit vectors Ax = Bx, Ay = By, Az = Bz and point Ao is
coincident with Bo. Hence, the constructed RigidTransform contains an
identity RotationMatrix and a zero position vector.)""";
View multiprocessing_cpython_jupyter_threading.py
# https://stackoverflow.com/questions/17053671/python-how-do-you-stop-numpy-from-multithreading
# Necessary for multiprocess :(
import os
os.environ.update(
OMP_NUM_THREADS = '1',
OPENBLAS_NUM_THREADS = '1',
NUMEXPR_NUM_THREADS = '1',
MKL_NUM_THREADS = '1',
)
You can’t perform that action at this time.