Merged in feature/small-things (pull request #102)

* Print symbol interpretation of key in IndeterminantLinearSystemException.
release/4.3a0
Frank Dellaert 2015-02-16 14:09:46 +01:00
commit cd0f8c8c57
3 changed files with 8 additions and 4 deletions

View File

@ -3,6 +3,7 @@ include_directories(.)
# Find sources.
file(GLOB metis_sources *.c)
# Build libmetis.
add_definitions(-fPIC)
add_library(metis ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources})
if(UNIX)
target_link_libraries(metis m)

View File

@ -17,7 +17,7 @@
*/
#include <gtsam/linear/linearExceptions.h>
#include <gtsam/inference/Symbol.h>
#include <boost/format.hpp>
namespace gtsam {
@ -25,16 +25,19 @@ namespace gtsam {
/* ************************************************************************* */
const char* IndeterminantLinearSystemException::what() const throw()
{
if(!description_)
if(!description_) {
description_ = String(
"\nIndeterminant linear system detected while working near variable\n"
+ boost::lexical_cast<String>(j_) + ".\n"
+ boost::lexical_cast<String>(j_) +
+ " (Symbol: " + boost::lexical_cast<String>(
gtsam::DefaultKeyFormatter(gtsam::Symbol(j_))) + ").\n"
"\n\
Thrown when a linear system is ill-posed. The most common cause for this\n\
error is having underconstrained variables. Mathematically, the system is\n\
underdetermined. See the GTSAM Doxygen documentation at\n\
http://borg.cc.gatech.edu/ on gtsam::IndeterminantLinearSystemException for\n\
more information.");
}
return description_->c_str();
}

View File

@ -83,7 +83,7 @@ public:
integrationCovariance_(integrationErrorCovariance) {}
/// methods to access class variables
const bool use2ndOrderIntegration() const {return use2ndOrderIntegration_;}
bool use2ndOrderIntegration() const {return use2ndOrderIntegration_;}
const Vector3& deltaPij() const {return deltaPij_;}
const Vector3& deltaVij() const {return deltaVij_;}
const imuBias::ConstantBias& biasHat() const { return biasHat_;}