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. # Find sources.
file(GLOB metis_sources *.c) file(GLOB metis_sources *.c)
# Build libmetis. # Build libmetis.
add_definitions(-fPIC)
add_library(metis ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources}) add_library(metis ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources})
if(UNIX) if(UNIX)
target_link_libraries(metis m) target_link_libraries(metis m)

View File

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

View File

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