Skip to content

Instantly share code, notes, and snippets.

View AlexanderFabisch's full-sized avatar

Alexander Fabisch AlexanderFabisch

View GitHub Profile

Setup

Install dmpbbo

git clone https://github.com/stulp/dmpbbo.git
cd dmpbbo
./install_dependencies.sh
make build
cd ..
import numpy as np
def box_surface_grid(size, n_steps):
size = np.asarray(size)
half_size = 0.5 * size
# +-------+
# | |
# +---+-------+---+-------+ -
import numpy as np
def concat_dependent_uncertain_transforms(
mean_A2B, cov_A2B, mean_B2C, cov_B2C, cov_A2B_B2C):
"""Concatenate two dependent uncertain transformations.
This is an approximation up to 2nd-order terms that takes into account
the covariance between the two distributions.
@AlexanderFabisch
AlexanderFabisch / heartrate_stats.py
Last active April 24, 2022 17:44
Plot heart rate statistics per day from exported Garmin data.
"""
Plot heart rate statistics per day from exported Garmin data.
"""
import glob
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from fitparse import FitFile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlexanderFabisch
AlexanderFabisch / active_passive.ipynb
Created December 8, 2019 20:43
Active vs. passive rotation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlexanderFabisch
AlexanderFabisch / plot_frame.py
Created November 7, 2018 21:35
Plot frame without any axis
import numpy as np
from pytransform import rotations as pr
from pytransform import plot_utils as pp
import matplotlib.pyplot as plt
plt.figure(frameon=False)
ax = pp.make_3d_axis(1)
ax.grid(False)
ax.set_xticks([])
import msgpack
def summarize_logfile(filename):
n_samples = {}
typenames = {}
with open(filename, "r") as f:
unpacker = msgpack.Unpacker(file_like=f)
n_keys = unpacker.read_map_header()
stream_names = []
#ifndef GENERATED_ASN1SCC_LASERSCAN_H
#define GENERATED_ASN1SCC_LASERSCAN_H
/*
Code automatically generated by asn1scc tool
*/
#include "taste-types.h"
#include "Time.h"
#include "taste-extended.h"
#include "asn1crt.h"
@AlexanderFabisch
AlexanderFabisch / README.md
Last active May 24, 2018 13:32
[InFuse] intermediate log format / minimal example

msgpack Logs

This is an example of how to create an InFuse-compatible intermediate log file in the msgpack format.

Setup

Install msgpack: run install.sh.

Compile Example