From c1247930c9ed473a5305651d2ab9cfcfa86e06f9 Mon Sep 17 00:00:00 2001 From: Francesco Gatti Date: Wed, 8 Apr 2020 16:53:35 +0200 Subject: [PATCH 1/2] gnuplot imuodom --- include/tkDNN/ImuOdom.h | 2 ++ tests/imuodom/imuodom.cpp | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/tkDNN/ImuOdom.h b/include/tkDNN/ImuOdom.h index a6b449c..49e5d4d 100644 --- a/include/tkDNN/ImuOdom.h +++ b/include/tkDNN/ImuOdom.h @@ -109,6 +109,8 @@ class ImuOdom { odomPOS = Eigen::MatrixXd::Zero(3, 1); odomROT = Eigen::MatrixXd::Identity(3, 3); + + return true; } void update(dnnType *x0, dnnType *x1, dnnType *x2) { diff --git a/tests/imuodom/imuodom.cpp b/tests/imuodom/imuodom.cpp index 6a03321..981c7c3 100644 --- a/tests/imuodom/imuodom.cpp +++ b/tests/imuodom/imuodom.cpp @@ -24,7 +24,7 @@ int main() { tk::dnn::ImuOdom ImuNet; ImuNet.init("../tests/imuodom/layers/"); - const int N = 19513; + const int N = 10000; //19513; // Network layout tk::dnn::dataDim_t dim0(1, 4, 1, 100); @@ -61,11 +61,11 @@ int main() { path.flush(); // Print real test - //printCenteredTitle( (std::string(" CHECK RESULT ") + std::to_string(i) + " ").c_str() , '='); - //ImuNet.odim0.print(); - //checkResult(ImuNet.odim0.tot(), out0, ImuNet.o0_d); - //ImuNet.odim1.print(); - //checkResult(ImuNet.odim0.tot(), out1, ImuNet.o1_d); + printCenteredTitle( (std::string(" CHECK RESULT ") + std::to_string(i) + " ").c_str() , '='); + ImuNet.odim0.print(); + checkResult(ImuNet.odim0.tot(), out0, ImuNet.o0_d); + ImuNet.odim1.print(); + checkResult(ImuNet.odim0.tot(), out1, ImuNet.o1_d); i0_h += ImuNet.dim0.tot(); i1_h += ImuNet.dim1.tot(); @@ -73,5 +73,7 @@ int main() { out0 += ImuNet.odim0.tot(); out1 += ImuNet.odim1.tot(); } + + system("cat path.txt | gnuplot -p -e \"set datafile separator ' '; plot '-'\""); return 0; } From 1bb9f73a0b2a3a6f9cb2f8966104c26c7a0c74f8 Mon Sep 17 00:00:00 2001 From: Francesco Gatti Date: Thu, 9 Apr 2020 00:55:07 +0200 Subject: [PATCH 2/2] remove deprecated and unused warning --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8582bef..65a96a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5) project (tkDNN) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -Wno-deprecated-declarations -Wno-unused-variable") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/tkDNN) # project specific flags