Skip to content

Instantly share code, notes, and snippets.

View pvazteixeira's full-sized avatar

Pedro Vaz Teixeira pvazteixeira

View GitHub Profile
@pvazteixeira
pvazteixeira / gps_nmea_log.md
Created July 30, 2020 21:46
gpsd nmea logging
This set of notes describes the process to get a raspberry pi to log position data using a USB GNSS receiver 
- Install gpsd and its clients: `sudo apt install gpsd gpsd-clients`
- Connect your USB GPS and restart
- Make sure `gpsd` is running: `sudo service gpsd status`
- Check you're getting good GPS reception by running `cgps`
- Run `nohup gpspipe -w -r -o track.nmea` to log NMEA sentences to a file (add `-t` flag to log system time at every sentence)
  - the `nohup` command will let the logging continue even if your SSH connection drops
  • Copy the log to your machine and use a tool like GPXSee to plot your path
@pvazteixeira
pvazteixeira / packages-temp.tex
Created April 3, 2019 13:33
shortcuts for notes and tasks
% temporary packages (to be removed for final version)
\usepackage{color,soul}
\setlength{\marginparwidth}{2.5cm}
\usepackage[colorinlistoftodos,obeyDraft,textsize=small]{todonotes}
\newcommand{\pnote}[1]{\todo[inline,color=blue!50]{\textbf{NOTE}: #1}}
% use to describe med-priority tasks
\newcommand{\phigh}[1]{\todo[inline,color=red!50]{\textbf{[\#A] TODO}: #1}}
% use to describe med-priority tasks
\newcommand{\pmed}[1]{\todo[inline,color=orange!50]{\textbf{[\#B] TODO}: #1}}
@pvazteixeira
pvazteixeira / isam-partial.md
Created November 6, 2018 05:46
isam - partial constraints (example)
➜ ./isam-partial 
LM Iteration 1: (lambda=1e-06) residual: 0.0106658
LM Iteration 2: (lambda=1e-07) residual: 2.62846e-07

Full graph:
Pose3d_Factor 0 (0, 0, 0; 0, 0, 0) {10,0,0,0,0,0,10,0,0,0,0,10,0,0,0,10,0,0,10,0,10}
Pose3dPartial_Factor 1 (2, 0.1, 0.1) {10,0,0,10,0,10}
Pose3d_Pose3d_PartialXYH_Factor 0 1   1
 1
@pvazteixeira
pvazteixeira / README-Template.md
Created October 10, 2018 18:01 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@pvazteixeira
pvazteixeira / Sonar.jl
Created September 13, 2018 22:55
Pose3Pose3Offset
# BEGIN:
"""
$(SIGNATURES)
A factor for sensor offset calibration, connecting three variable nodes: platform, sensor, and offset. The measurement should be centered around zero.
# Examples
```julia-repl
```
"""
@pvazteixeira
pvazteixeira / odometry.jl
Created September 13, 2018 18:05
use of composition operator
using CoordinateTransformations
wTp1 = Translation(1.0, 0.0, 0.0);
wRp1 = LinearMap(RotXYZ(0.0, 0.0, 0.0))
wPp1 = compose(wTp1, wRp1)
To = Translation(1.0, 0.0, 0.0)
Ro = LinearMap(RotXYZ(0.0,0.0,pi/6.0))
odom = compose(To, Ro)
package multibeamlcm;
struct ping_t {
int64_t time;
string sonar_id; // sonar id, e.g.: "DIDSON", "MB2250", ...
// platform/vehicle pose in the world frame
double platform_origin[3]; // x y z (North, East, Down) [m]
double platform_orientation[4]; // w + xi + yj + zk (eigen conv)
import time
import zmq
import json
from Navi import *
from NaviUtils import *
# TODO: configurable port
# TODO: configurable id
# TODO: configurable sessionid
@pvazteixeira
pvazteixeira / server.py
Last active August 10, 2018 03:48
synchronySDK_py server
import time
import zmq
import json
from Navi import *
from NaviUtils import *
# TODO: configurable port
# TODO: configurable id
# TODO: configurable sessionid
@pvazteixeira
pvazteixeira / get-qgc.sh
Last active June 28, 2018 20:35
get qgc
#!/bin/sh
if [ ! -f qgroundcontrol/qgroundcontrol-start.sh ]; then
echo "QGroundControl not found! Downloading."
mkdir qgroundcontrol
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/latest/QGroundControl.tar.bz2 -O qgroundcontrol/qgroundcontrol.tar.bz2
tar -xvf qgroundcontrol/qgroundcontrol.tar.bz2
fi