Remove most debug messages
parent
4e481ea1e1
commit
d012bcd4dc
|
@ -59,12 +59,12 @@ struct HybridConstructorTraversalData {
|
||||||
myData.myJTNode = boost::make_shared<Node>(node->key, node->factors);
|
myData.myJTNode = boost::make_shared<Node>(node->key, node->factors);
|
||||||
parentData.myJTNode->addChild(myData.myJTNode);
|
parentData.myJTNode->addChild(myData.myJTNode);
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifdef GTSAM_HYBRID_JUNCTIONTREE_DEBUG
|
||||||
std::cout << "Getting discrete info: ";
|
std::cout << "Getting discrete info: ";
|
||||||
#endif
|
#endif
|
||||||
for (HybridFactor::shared_ptr& f : node->factors) {
|
for (HybridFactor::shared_ptr& f : node->factors) {
|
||||||
for (auto& k : f->discreteKeys_) {
|
for (auto& k : f->discreteKeys_) {
|
||||||
#ifndef NDEBUG
|
#ifdef GTSAM_HYBRID_JUNCTIONTREE_DEBUG
|
||||||
std::cout << "DK: " << DefaultKeyFormatter(k.first) << "\n";
|
std::cout << "DK: " << DefaultKeyFormatter(k.first) << "\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ struct HybridConstructorTraversalData {
|
||||||
boost::tie(myConditional, mySeparatorFactor) =
|
boost::tie(myConditional, mySeparatorFactor) =
|
||||||
internal::EliminateSymbolic(symbolicFactors, keyAsOrdering);
|
internal::EliminateSymbolic(symbolicFactors, keyAsOrdering);
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifdef GTSAM_HYBRID_JUNCTIONTREE_DEBUG
|
||||||
std::cout << "Symbolic: ";
|
std::cout << "Symbolic: ";
|
||||||
myConditional->print();
|
myConditional->print();
|
||||||
#endif
|
#endif
|
||||||
|
@ -136,7 +136,7 @@ struct HybridConstructorTraversalData {
|
||||||
myData.discreteKeys.exists(myConditional->frontals()[0]);
|
myData.discreteKeys.exists(myConditional->frontals()[0]);
|
||||||
const bool theirType =
|
const bool theirType =
|
||||||
myData.discreteKeys.exists(childConditionals[i]->frontals()[0]);
|
myData.discreteKeys.exists(childConditionals[i]->frontals()[0]);
|
||||||
#ifndef NDEBUG
|
#ifdef GTSAM_HYBRID_JUNCTIONTREE_DEBUG
|
||||||
std::cout << "Type: "
|
std::cout << "Type: "
|
||||||
<< DefaultKeyFormatter(myConditional->frontals()[0]) << " vs "
|
<< DefaultKeyFormatter(myConditional->frontals()[0]) << " vs "
|
||||||
<< DefaultKeyFormatter(childConditionals[i]->frontals()[0])
|
<< DefaultKeyFormatter(childConditionals[i]->frontals()[0])
|
||||||
|
@ -145,7 +145,7 @@ struct HybridConstructorTraversalData {
|
||||||
if (myType == theirType) {
|
if (myType == theirType) {
|
||||||
// Increment number of frontal variables
|
// Increment number of frontal variables
|
||||||
myNrFrontals += nrFrontals[i];
|
myNrFrontals += nrFrontals[i];
|
||||||
#ifndef NDEBUG
|
#ifdef GTSAM_HYBRID_JUNCTIONTREE_DEBUG
|
||||||
std::cout << "Merging ";
|
std::cout << "Merging ";
|
||||||
childConditionals[i]->print();
|
childConditionals[i]->print();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,6 +57,7 @@ using gtsam::symbol_shorthand::D;
|
||||||
using gtsam::symbol_shorthand::X;
|
using gtsam::symbol_shorthand::X;
|
||||||
using gtsam::symbol_shorthand::Y;
|
using gtsam::symbol_shorthand::Y;
|
||||||
|
|
||||||
|
#ifdef HYBRID_DEBUG
|
||||||
#define BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
|
#define BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
|
||||||
|
|
||||||
#include <signal.h> // ::signal, ::raise
|
#include <signal.h> // ::signal, ::raise
|
||||||
|
@ -68,6 +69,7 @@ void my_signal_handler(int signum) {
|
||||||
std::cout << boost::stacktrace::stacktrace();
|
std::cout << boost::stacktrace::stacktrace();
|
||||||
::raise(SIGABRT);
|
::raise(SIGABRT);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
TEST_DISABLED(HybridFactorGraph, creation) {
|
TEST_DISABLED(HybridFactorGraph, creation) {
|
||||||
|
@ -594,9 +596,10 @@ TEST_DISABLED(HybridFactorGraph, SwitchingTwoVar) {
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
int main() {
|
int main() {
|
||||||
|
#ifdef HYBRID_DEBUG
|
||||||
::signal(SIGSEGV, &my_signal_handler);
|
::signal(SIGSEGV, &my_signal_handler);
|
||||||
::signal(SIGBUS, &my_signal_handler);
|
::signal(SIGBUS, &my_signal_handler);
|
||||||
|
#endif
|
||||||
TestResult tr;
|
TestResult tr;
|
||||||
return TestRegistry::runAllTests(tr);
|
return TestRegistry::runAllTests(tr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue