This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Eigen/SVD> | |
/// Method to find the average of a set of rotation quaternions using Singular Value Decomposition | |
/* | |
* The algorithm used is described here: | |
* https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20070017872.pdf | |
*/ | |
Eigen::Vector4f quaternionAverage(std::vector<Eigen::Vector4f> quaternions) | |
{ | |
if (quaternions.size() == 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
bool getline_async(std::istream& is, std::string& str, char delim = '\n') { | |
static std::string lineSoFar; | |
char inChar; | |
int charsRead = 0; | |
bool lineRead = false; | |
str = ""; |