fixed TOROOptimizer::loadGraph(), added some assert to make usre that rotational and transitional variances are not null

This commit is contained in:
Mathieu Labbe
2015-04-01 12:50:29 -04:00
parent 3eb103f239
commit f847bb9f9f
4 changed files with 29 additions and 14 deletions
+2
View File
@@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define LINK_H_
#include <rtabmap/core/Transform.h>
#include <rtabmap/utilite/ULogger.h>
namespace rtabmap {
@@ -52,6 +53,7 @@ public:
rotVariance_(rotVariance),
transVariance_(transVariance)
{
UASSERT_MSG(rotVariance_ > 0 && transVariance_ > 0, "Rotational and transitional variances should not be null! (set to 1 if unknown)");
}
bool isValid() const {return from_ > 0 && to_ > 0 && !transform_.isNull() && type_!=kUndef;}