Skip to content

Instantly share code, notes, and snippets.

@goretkin
goretkin / acrobot_missing_tip_body.urdf
Last active November 29, 2018 15:34
minimal example
<?xml version="1.0"?>
<robot name="DoublePendulum">
<link name="base_link">
<visual>
<geometry>
<box size=".2 .2 .2" />
</geometry>
<material name="green">
<color rgba="0 1 0 1" />
@goretkin
goretkin / movo.urdf
Created November 29, 2018 15:20
lis movo urdf
<?xml version="1.0" encoding="utf-8"?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from movo_description/urdf/movo.urdf.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<!--
Software License Agreement (BSD)
\file movo.urdf.xacro
\authors Patrick Hussey
\copyright Copyright (c) 2017, Kinova Robotics inc. All rights reserved.
@goretkin
goretkin / .juliarc.jl
Created November 9, 2018 20:43
load revise in julia 0.6
function isinstalled(pkg)
return try
Pkg.installed(pkg)
true
catch
false
end
end
#!/usr/bin/env python
import argparse
import re
parser = argparse.ArgumentParser()
parser.add_argument('--input')
parser.add_argument('--output')
args = parser.parse_args()
fi = open(args.input, "r")
@goretkin
goretkin / validate_timestamps.py
Created August 1, 2018 14:45
validate timestamps
import numpy as np
import rosbag
input_bag_path = "/home/goretkin/repos/Hg_Scene_Extractor/bags/ekffff.bag"
bag_ts = []
odoms = []
with rosbag.Bag(input_bag_path) as bag:
# promiscuously grab all possible odometry topics. Assumes that bags contain only one of each.
for topic, msg, t in bag.read_messages(topics=["/aft_mapped_to_init", "/odometry/filtered"]):
start_state_domain = SearchState_t(mp.q_start, [mp.q_start], VAMP.make_packed_view_volume(UnionOfGeometry(starting_visibility__Fworld)))
path_segments = [[start_state_domain]]
goal_stack = Any[
PointEpsilonGoal(convert(SE2_MPState_t, goal.q), goal.ϵ)]
execute_move_prefix = false
struct CoverageGoal{T}
region::T
@goretkin
goretkin / gist:74d29a9d8bfa21af9be347982f2b151e
Created May 14, 2018 18:17
MethodError: no method matching convert(::Type{AssertionError}, ::String)
ERROR: LoadError: MethodError: no method matching convert(::Type{AssertionError}, ::String)
Closest candidates are:
convert(::Type{Any}, ::ANY) at essentials.jl:28
convert(::Type{T}, ::T) where T at essentials.jl:29
Stacktrace:
[1] AssertionError(::String) at ./coreimg.jl:14
[2] update_valid_age!(::UInt64, ::UInt64, ::Core.Inference.InferenceState) at ./inference.jl:2353
[3] add_backedge!(::Core.MethodInstance, ::Core.Inference.InferenceState) at ./inference.jl:2366
[4] abstract_call_gf_by_type(::Any, ::Any, ::Core.Inference.InferenceState) at ./inference.jl:1421
[5] abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Inference.InferenceState) at ./inference.jl:1897
export HISTTIMEFORMAT="%s "
# this we need because we could be su'd to another user and we still want history here
chmod 666 ~/.bash_eternal_history
# reason for ~/../ is if su'ing into another user
HIST_FILE_ETERNAL=~/../goretkin/.bash_eternal_history
# add a header to indicate a new session
echo "#" $$, $USER, $(pwd), "parent:"$(ps -o ppid= -p $$), $(date), $(pwd) >> $HIST_FILE_ETERNAL
julia> using CLArrays
WARNING: deprecated syntax "typealias CL_float2 Complex64".
Use "const CL_float2 = Complex64" instead.
WARNING: deprecated syntax "typealias CL_double2 Complex128".
Use "const CL_double2 = Complex128" instead.
julia> for dev in CLArrays.devices()
@show dev
using Polyhedra
using CDDLib
struct Cdd_SetFamily
famsize::CDDLib.Cdd_bigrange
setsize::CDDLib.Cdd_bigrange
# `dd(f)_SetVector set` is the next field
# dd(f)_SetVector is a typedef for *set_type, defined in setoper.h