Skip to content

Instantly share code, notes, and snippets.

View DmitriyKorchemkin's full-sized avatar

Dmitriy Korchemkin DmitriyKorchemkin

View GitHub Profile
@DmitriyKorchemkin
DmitriyKorchemkin / mix_local_parameterizations_bounds.cpp
Last active October 21, 2021 10:14
Mixing local parameterizations and upper/lower bounds in ceres-solver resulting in drifting away from initial manifold
#include <Eigen/Dense>
#include <ceres/ceres.h>
#include <iostream>
using Vector3d = Eigen::Vector3d;
struct VectorDiff {
template <typename T> bool operator()(const T *point, T *residual) const {
Eigen::Map<const Eigen::Matrix<T, 3, 1>> map(point);
Eigen::Map<Eigen::Matrix<T, 3, 1>> res(residual);
@DmitriyKorchemkin
DmitriyKorchemkin / example_bicubic.cc
Created September 16, 2021 17:33
Sample for bicubic interpolation and autodiff
/* Small example of using bicubic interpolation in ceres with autodiff */
#include <ceres/ceres.h>
#include <ceres/cubic_interpolation.h>
#include <cassert>
using Grid = ceres::Grid2D<double>;
using Interpolator = ceres::BiCubicInterpolator<Grid>;
struct Residual {
@DmitriyKorchemkin
DmitriyKorchemkin / gpsd_record.sh
Created August 24, 2020 09:11
Simple recording of rinex & raw data using gpsd
#!/bin/bash
interval=1
hours=24
seconds=$(( ${hours} * 3600 ))
n=$(( ${seconds} / ${interval} ))
tag=$( date +%Y-%m-%d_%H-%M-%S )