Skip to content

Instantly share code, notes, and snippets.

View cohnt's full-sized avatar

Thomas Cohn cohnt

View GitHub Profile
@cohnt
cohnt / break2.py
Created April 27, 2023 13:56
Simpler Terrible Linear System
# Built off of commit hash 8ddd6672b1
import numpy as np
from pydrake.all import ContinuousAlgebraicRiccatiEquation
A = np.fromstring("0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 \
0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.00000000
@cohnt
cohnt / error.py
Last active September 5, 2023 18:46
Segmentation Fault in KinematicTrajectoryOptimization when Using MinimumDistanceConstraint 1
#!/usr/bin/env python
# coding: utf-8
# # Kinematic Trajectory Optimization
#
# This notebook provides examples to go along with the [textbook](http://manipulation.csail.mit.edu/trajectories.html). I recommend having both windows open, side-by-side!
#
# In[ ]:
@cohnt
cohnt / main.py
Last active December 2, 2023 17:43
Toppra Failure Example
import numpy as np
from pydrake.all import (
StartMeshcat,
PiecewisePolynomial,
Toppra,
DiagramBuilder,
AddMultibodyPlantSceneGraph,
Parser,
LoadModelDirectivesFromString,
ProcessModelDirectives
@cohnt
cohnt / bad_hpolyhedron.py
Last active January 29, 2024 19:50
HPolyhedron where MaximumVolumeInscribedEllipsoid Fails
import numpy as np
from pydrake.all import HPolyhedron
A=np.array([[ 1.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00 ],\
[ 0.000000000000000000e+00, 0.000000000000000000e+00, -1.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00 ],\
[ 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, -1.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00 ],\
[ 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, -1.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00 ],\
[ 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e
@cohnt
cohnt / regions.pickle
Last active January 31, 2024 21:49
GcsTrajectoryOptimization::GetGraphvizString Crash
@cohnt
cohnt / regions.pickle
Last active February 2, 2024 21:50
GcsTrajectoryOptimization Bug
@cohnt
cohnt / box_small.urdf
Last active March 26, 2024 01:20
PointOnBoxSurfaceHelper Failure Reproduction
<?xml version="1.0"?>
<robot name="box_scene">
<material name="Blue">
<color rgba="0.0 0.0 0.8 1.0"/>
</material>
<material name="Red">
<color rgba="0.8 0.0 0.0 1.0"/>
</material>
<material name="Green">