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