Skip to content

Instantly share code, notes, and snippets.

@psigen
psigen / hollow lake boat spin log
Created August 22, 2013 19:14
Log file of boat spinning bug taken from Hollow Lake deployment.
1 19:58:42,545 POSE: {476608.34, 4671214.4, 172.35, Q[0.0,0.0,0.0]} @ 17North
17 19:58:42,561 VEL: Twist[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
197 19:58:42,741 POSE: {476608.34, 4671214.4, 172.35, Q[0.0,0.0,0.0]} @ 17North
220 19:58:42,764 VEL: Twist[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
272 19:58:42,816 THRUST: [t, 0.000000]
399 19:58:42,943 POSE: {476608.34, 4671214.4, 172.35, Q[0.0,0.0,0.0]} @ 17North
410 19:58:42,954 VEL: Twist[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
479 19:58:43,23 COMPASS: 1.626297871551391
500 19:58:43,44 COMPASS: 1.6170635142148462
559 19:58:43,103 COMPASS: 1.6073652456363123
@psigen
psigen / playlist.yml
Created December 13, 2013 21:29
playlist yaml
actions:
- name : chairtaken
start : 0.0
duration : 2.0
say : Excuse me. Is this chair taken?
- name : wait2
start : 2.0
duration : 2.0
- name : thistaken
start : 4.0
@psigen
psigen / app.js
Last active January 1, 2016 21:49
Node module that demonstrates a failure to call native function as callback to Object.observe.
var my_module = require('./build/Release/my_module');
console.log(my_module.my_function); // Prints "[Function]", as expected
my_module.my_function(); // Prints "Ran my function."
// Create a dummy object
var foo = {}
// Let's hook up an observer to my object
Object.observe(foo, my_module.my_function);
foo.bar = true; // change object
+==============
+ 2
+ ===========
+ =========
+ \
========= \
\\ \
=========// /
2 /
=============/
@psigen
psigen / gist:f378064818577ab9309b
Created January 30, 2015 22:18
TSR visualization psuedocode
# Compute the base to gripper offset for the robot.
T0_e = robot.GetLink('grasp_frame').GetTransform()
T0_b = robot.GetTransform()
Te_b = numpy.dot(numpy.linalg.inv(T0_e), T0_b)
# Turn off everything except things named 'gripper'!
# Autoscale the window by initially centering the gripper.
for link in robot.GetLinks():
if 'gripper' not in link.GetName():
link.SetVisible(False)
@psigen
psigen / empty.iv
Created April 6, 2015 14:10
Invalid empty geometry placeholder for OR_RVIZ
#Inventor V2.0 ascii
Separator {
Info {
string "empty.iv generated by IVCON."
string "Original data in file NO_IN_NAME."
}
Separator {
LightModel {
model PHONG
@psigen
psigen / Main.java
Created November 18, 2015 16:07
Registry Test Application
package com.platypus;
import com.platypus.crw.FunctionObserver;
import com.platypus.crw.udp.UdpVehicleServer;
import com.platypus.crw.udp.UdpVehicleService;
import com.platypus.crw.udp.VehicleRegistryService;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;
@psigen
psigen / Main.java
Created November 18, 2015 16:07
Registry Test Application
package com.platypus;
import com.platypus.crw.FunctionObserver;
import com.platypus.crw.udp.UdpVehicleServer;
import com.platypus.crw.udp.UdpVehicleService;
import com.platypus.crw.udp.VehicleRegistryService;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;
@psigen
psigen / VehicleTunnelService.java
Last active November 20, 2015 19:17
Vehicle Tunnel Service
package com.platypus.com.platypus.crw.udp;
import com.platypus.crw.udp.UdpConstants;
import com.platypus.crw.udp.UdpServer;
import com.platypus.crw.udp.UdpServer.Request;
import java.io.IOException;
import java.net.*;
import java.util.Collection;
import java.util.HashMap;
@psigen
psigen / verify_firebase_token.py
Created August 1, 2016 06:07
Google App Engine compatible server-side Python token-verification for Firebase 3.
def base64url_decode(s):
""" Decode base64 encoded strings with stripped trailing '=' """
import base64
return base64.urlsafe_b64decode(s + '=' * (-len(s) % 4))
def unpack_jwt_token(token):
""" Splits and decodes a JWT into a header, payload and signature. """
import json
encoded_header, encoded_payload, encoded_signature = token.split('.')