Skip to content

Instantly share code, notes, and snippets.

View mjcarroll's full-sized avatar

Michael Carroll mjcarroll

View GitHub Profile
@mjcarroll
mjcarroll / image_pub.cpp
Created August 29, 2012 16:15
Test Case for image_view
#include <ros/ros.h>
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/Image.h>
#include <sensor_msgs/image_encodings.h>
@mjcarroll
mjcarroll / pcd_write.cpp
Created November 15, 2012 17:06
PCL lseek error
#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
int
main (int argc, char** argv)
{
std::cout << "sizeof(off_t)" << sizeof(off_t) << std::endl;
std::cout << "sizeof(off64_t)" << sizeof(off64_t) << std::endl;
import urllib2, shutil, tempfile
import tarfile
import os
try:
from urllib.request import urlretrieve
except ImportError:
import urllib2, shutil, tempfile, os
def urlretrieve(url):
fd, fname = tempfile.mkstemp() # Make a temporary file

Keybase proof

I hereby claim:

  • I am mjcarroll on github.
  • I am mjcarroll (https://keybase.io/mjcarroll) on keybase.
  • I have a public key whose fingerprint is 568E DBDA BA41 D781 B017 B3EA F5F2 85B9 9F96 9349

To claim this, I am signing this object:

import copy
paths = [ ('A', 'F', 0.58), ('D', 'F', 0.27), ('C', 'E', 0.3),
('E', 'F', 0.22), ('B', 'E', 0.59), ('A', 'B', 1.27),
('B', 'C', 0.61), ('C', 'D', 1.08), ('A', 'D', 0.72)
]
bi_paths = copy.copy(paths)
for path in paths:
bi_paths.append( (path[1], path[0], path[2]) )
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "Horrible Lunchtime Hack"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
0.44 1
0.54 1
0.98 1
1.04 1
1.15 1
1.56 1
1.58 1
1.6 1
1.62 1
1.7 1
@mjcarroll
mjcarroll / hero3.txt
Created March 30, 2015 14:20
Brian's GoPro Hero3 calibration
Focal Length: fc = [ 760.84916 760.33692 ] ± [ 12.49356 12.35419 ]
Principal point: cc = [ 607.37808 269.25236 ] ± [ 11.55389 8.94308 ]
Skew: alpha_c = [ 0.00000 ] ± [ 0.00000 ] => angle of pixel axes = 90.00000 ± 0.00000 degrees
Distortion: kc = [ -0.32726 0.12925 0.00069 0.00060 0.00000 ] ± [ 0.01078 0.01474 0.00190 0.00182 0.00000 ]
Pixel error: err = [ 0.90611 0.27294 ]
@mjcarroll
mjcarroll / keybase.md
Last active October 10, 2017 20:47
keybase.md

Keybase proof

I hereby claim:

  • I am mjcarroll on github.
  • I am mjcarroll (https://keybase.io/mjcarroll) on keybase.
  • I have a public key whose fingerprint is 418E DBEF 60B7 1DB4 4A2A 74DA 5EE7 4370 3027 8FD7

To claim this, I am signing this object:

@mjcarroll
mjcarroll / export_pose_graph.py
Last active October 19, 2021 03:52
Cartographer Pose Graph
#!/usr/bin/env python3
# sudo apt-get install protobuf-compiler
# roscd cartographer && mkdir py_export
# protoc --python_out ./py_export -I . `find . -iname '*.proto'`
import struct
import gzip
import cartographer.mapping