Skip to content
Snippets Groups Projects
Commit 0f49a1f0 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Use yaml file for initializing sensor

parent c17d2b6d
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,16 @@ int main (int argc, char** argv) ...@@ -31,6 +31,16 @@ int main (int argc, char** argv)
{ {
cout << "\n========= Test ProcessorOdom3D ===========" << endl; cout << "\n========= Test ProcessorOdom3D ===========" << endl;
//=====================================================
// Environment variable for configuration files
char const* tmp = std::getenv( "WOLF_ROOT" );
if ( tmp == nullptr )
throw std::runtime_error("WOLF_ROOT environment not loaded.");
std::string wolf_path( tmp );
std::cout << "Wolf path: " << wolf_path << std::endl;
//=====================================================
TimeStamp tf; TimeStamp tf;
if (argc == 1) if (argc == 1)
tf = 1.0; tf = 1.0;
...@@ -44,7 +54,7 @@ int main (int argc, char** argv) ...@@ -44,7 +54,7 @@ int main (int argc, char** argv)
ProblemPtr problem = Problem::create(FRM_PO_3D); ProblemPtr problem = Problem::create(FRM_PO_3D);
CeresManager ceres_manager(problem); CeresManager ceres_manager(problem);
SensorBasePtr sen = problem->installSensor("ODOM 3D", "odom", (Vector7s()<<0,0,0,0,0,0,1).finished(),""); SensorBasePtr sen = problem->installSensor("ODOM 3D", "odom", (Vector7s()<<0,0,0,0,0,0,1).finished(), wolf_path + "/src/examples/odom_3D.yaml");
problem->installProcessor("ODOM 3D", "odometry integrator", "odom", ""); problem->installProcessor("ODOM 3D", "odometry integrator", "odom", "");
problem->getProcessorMotionPtr()->setOrigin((Vector7s()<<0,0,0,0,0,0,1).finished(), TimeStamp(0)); problem->getProcessorMotionPtr()->setOrigin((Vector7s()<<0,0,0,0,0,0,1).finished(), TimeStamp(0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment