Skip to content

Instantly share code, notes, and snippets.

View goldbattle's full-sized avatar

Patrick Geneva goldbattle

View GitHub Profile
@goldbattle
goldbattle / 10-microstrain.rules
Last active November 13, 2021 20:16
udev rules for microstrain sensors.
# Universal rule for GX3/4/5 devices
#SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{product}=="Lord Inertial Sensor", SYMLINK="microstrain", MODE="0666"
# Vendor/Product-locked rules for GX3/4/5 devices
#SUBSYSTEM=="tty", ATTRS{idVendor}=="199b", ATTRS{idProduct}=="3065", SYMLINK="microstrain", MODE="0666"
#SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", SYMLINK="microstrain", MODE="0666"
# Uncomment these rules if you'd like the serial number to appear in the symlink. Useful if you have multiple devices.
SUBSYSTEM=="tty", ATTRS{idVendor}=="199b", ATTRS{idProduct}=="3065", SYMLINK+="microstrain_%s{serial}", MODE="0666"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", SYMLINK+="microstrain_%s{serial}", MODE="0666"
<launch>
<!-- mono or stereo and what ros bag to play -->
<arg name="max_cameras" default="2" />
<arg name="use_stereo" default="true" />
<!-- imu starting thresholds -->
<arg name="init_window_time" default="0.75" />
<arg name="init_imu_thresh" default="0.75" />
<launch>
<!-- mono or stereo and what ros bag to play -->
<arg name="max_cameras" default="2" />
<arg name="use_stereo" default="true" />
<!-- imu starting thresholds -->
<arg name="init_window_time" default="0.5" />
<arg name="init_imu_thresh" default="0.5" />
<launch>
<!-- MASTER NODE! -->
<node name="run_serial_msckf" pkg="ov_msckf" type="run_serial_msckf" output="screen" clear_params="true" required="true">
<!-- bag topics -->
<param name="topic_imu" type="string" value="/uav1/vio/imu" />
<param name="topic_camera0" type="string" value="/uav1/vio/camera/image_raw" />

From Hans Kumar to Everyone: 10:13 AM Hi Great Talk! I always have trouble picking the delta parameter for the RPE metric. Any intuition on how to pick this?

  • Normally this is tied to what you want “to look at”. For example, a short length of a meter might be enough if you just care about odometry accuracy while longer lengths can evaluate the long-term performance. Generally speaking the max length should be much smaller than the total trajectory length since one would want to get multiple samples of the same length over the whole trajectory.
  • Generally, what one cares about is the “trend” in the RPE. Is the algorithm always better at all lengths? For loop-closure methods is the RPE the same over all segment lengths? What is the expected accuracy if the robot travels a given distance?

From Ran Cheng to Everyone: 10:14 AM can we use deep nets on vison to do initialization and complementary of the missing Do for of imu. for example we can always estimate the opposite of gravity direction by a rgb

@goldbattle
goldbattle / Eigen Cheat sheet
Created September 28, 2020 19:59 — forked from gocarlos/Eigen Cheat sheet
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
@goldbattle
goldbattle / pointgrey_bkfy.launch
Created September 12, 2020 03:39
Example launch with low shutter time for pointgrey.
<launch>
<!-- Determine this using rosrun pointgrey_camera_driver list_cameras. -->
<!-- If not specified, defaults to first camera found. -->
<arg name="camera_name" default="bkfy" />
<arg name="camera_serial" default="17371919" />
<arg name="calibrated" default="0" />
<arg name="framerate" default="20" />
<arg name="shutterspeed" default="0.005" />
<group ns="$(arg camera_name)">
@goldbattle
goldbattle / updatekalibr2opencv4.sh
Created July 8, 2020 05:23
Script to update Kalibr calibration toolbox to use opencv 4 (allows compiling on ubuntu 18.04).
#!/bin/sh
# update from old OPENCV to the newest OPENCV 3/4
# https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/912#issue-377202823
# place this file in your /kalibr/ directory and run it
# -> you will still need to comment out cvStartWindowThread(); function calls
# -> aslamcv_helper.hpp needs to be corrected for the pointer logic
# -> cv::Ptr<cv::Mat> _pts(new cv::Mat(1, N * N, CV_32FC2));
#
# This file is part of m.css.
#
# Copyright © 2017, 2018, 2019 Vladimír Vondruš <mosra@centrum.cz>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
#include <boost/math/distributions/chi_squared.hpp>
/// Chi squared 95th percentile table
std::map<int, double> chi_squared_table;
// Initialize the chi squared test table with confidence level 0.95
// https://github.com/KumarRobotics/msckf_vio/blob/050c50defa5a7fd9a04c1eed5687b405f02919b5/src/msckf_vio.cpp#L215-L221
for (int i = 1; i < 100; ++i) {
boost::math::chi_squared chi_squared_dist(i);