Chroot Jail - Ubuntu 20.04 + ROS Noetic
sudo bash bootstrap.bash # creates a chroot jail at $HOME/bootstrap
sudo chroot $HOME/bootstrap # Type exit to exit the chroot jail
Chroot Jail - Ubuntu 20.04 + ROS Noetic
sudo bash bootstrap.bash # creates a chroot jail at $HOME/bootstrap
sudo chroot $HOME/bootstrap # Type exit to exit the chroot jail
/** | |
* Solving Ax = b using Cholesky Decomposition in C using LAPACK | |
* Compile with: gcc test_chol.c -lblas -llapack -llapacke -o test_chol | |
*/ | |
#include <stdio.h> | |
#include <lapacke.h> | |
int main() { | |
// Define matrix A and vector b in A * x = b | |
// clang-format off |
The following code snippet showcases how one would use Eigen's spline module to
fit x^2
and find the first and second derivatives along the spline.
An important note is to remember to scale the derivatives with:
(x - x_min) / (x_max - x_min)
(first derivative)(x - x_min) / (x_max - x_min)^2
(second derivative).Because when fitting a spline to x^2
, the x
values you feed into the spline
fitter is actually normalized with (x - x_min) / (x_max - x_min)
. So using
Eigen has an unsupported spline module where you can fit a spline given some data. Once a spline is fitted you can use it as a function to obtain points inbetween. The following example fits 1D data but can be modified to fit N-dimensional data.
git clone https://gist.github.com/chutsu/815c7c916c329eec85f34690a012f7cb spline_example
g++ -I/usr/include/eigen3 spline_example.cpp -o spline_example
./spline_example