CMake
target_link_library(something private LIB)
The thing above is only applicable for shared libraries
#include <Eigen/Dense> | |
template <class MatT> | |
Eigen::Matrix<typename MatT::Scalar, MatT::ColsAtCompileTime, MatT::RowsAtCompileTime> | |
pseudoinverse(const MatT &mat, typename MatT::Scalar tolerance = typename MatT::Scalar{1e-4}) // choose appropriately | |
{ | |
typedef typename MatT::Scalar Scalar; | |
auto svd = mat.jacobiSvd(Eigen::ComputeFullU | Eigen::ComputeFullV); | |
const auto &singularValues = svd.singularValues(); | |
Eigen::Matrix<Scalar, MatT::ColsAtCompileTime, MatT::RowsAtCompileTime> singularValuesInv(mat.cols(), mat.rows()); |
ffmpeg -i 1.mov -i 2.mov -i 3.mov -filter_complex "hstack=3" output.mp4 |
CMake
target_link_library(something private LIB)
The thing above is only applicable for shared libraries
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 100 | |
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100 |
#ifndef TIMER_H | |
#define TIMER_H | |
#include <chrono> | |
#include <thread> | |
using timer = std::chrono::high_resolution_clock::time_point; | |
inline void tic(timer &t){ | |
t = std::chrono::high_resolution_clock::now(); |
The document provides description on calibration of three Kinect for Microsoft sensors connected to one computer with several usb controllers. Three cameras setup is shown below:
Intrinsic, extrinsic, and Kinect2Kinect calibration is performed to know the position of each sensor in the space. Our setup is ROS Indigo with Ubuntu 14.04. freenect_launch and camera_pose ROS packages are used. Camera_pose package provides the pipeline to calibrate the relative 6D poses between multiple camera's. freenect_launch package contains launch files for using OpenNI-compliant devices in ROS. It creates a nodelet graph to transform raw data from the device driver into point clouds, disparity images, and other products suitable for processing and visualization. It is installed with catkin as follows:
# Prepa
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
xhost + ${hostname}
to allow connections to the macOS host *export HOSTNAME=`hostname`
* environment:
https://github.com/aancel/admin/wiki/VirtualGL-on-Ubuntu
https://virtualgl.org/About/Introduction
When you use ssh with X forwarding, you might have noticed that you cannot execute programs that require 3D acceleration. That's where VirtualGL comes into play.
import numpy as NP | |
import casadi as C | |
def qpsolve(H,g,lbx,ubx,A=NP.zeros((0,0)),lba=NP.zeros(0),uba=NP.zeros(0)): | |
# Convert to CasADi types | |
H = C.DMatrix(H) | |
g = C.DMatrix(g) | |
lbx = C.DMatrix(lbx) | |
ubx = C.DMatrix(ubx) | |
A = C.DMatrix(A) | |
A = A.reshape((A.size1(),H.size1())) # Make sure matching dimensions |