Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
ce8aa09f
Commit
ce8aa09f
authored
6 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
deleted demo, moving to a new gtest
parent
6134f893
No related branches found
No related tags found
1 merge request
!278
Resolve "Revisit demos (formerly called examples) and update them"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
demos/demo_processor_tracker_landmark.cpp
+0
-95
0 additions, 95 deletions
demos/demo_processor_tracker_landmark.cpp
with
0 additions
and
95 deletions
demos/demo_processor_tracker_landmark.cpp
deleted
100644 → 0
+
0
−
95
View file @
6134f893
/**
* \file test_processor_tracker_landmark.cpp
*
* Created on: Apr 12, 2016
* \author: jvallve
*/
//std
#include
<iostream>
//Wolf
#include
"core/common/wolf.h"
#include
"core/problem/problem.h"
#include
"core/sensor/sensor_base.h"
#include
"core/state_block/state_block.h"
#include
"core/processor/processor_tracker_landmark_dummy.h"
#include
"core/capture/capture_void.h"
void
print_problem_pointers
(
wolf
::
ProblemPtr
wolf_problem_ptr_
)
{
using
namespace
wolf
;
std
::
cout
<<
"
\n
-----------
\n
Wolf tree begin"
<<
std
::
endl
;
std
::
cout
<<
"Hrd: "
<<
wolf_problem_ptr_
->
getHardware
()
->
getProblem
()
<<
std
::
endl
;
for
(
SensorBasePtr
sen
:
wolf_problem_ptr_
->
getHardware
()
->
getSensorList
())
{
std
::
cout
<<
"
\t
Sen: "
<<
sen
->
getProblem
()
<<
std
::
endl
;
for
(
ProcessorBasePtr
prc
:
sen
->
getProcessorList
())
{
std
::
cout
<<
"
\t\t
Prc: "
<<
prc
->
getProblem
()
<<
std
::
endl
;
}
}
std
::
cout
<<
"Trj: "
<<
wolf_problem_ptr_
->
getTrajectory
()
->
getProblem
()
<<
std
::
endl
;
for
(
FrameBasePtr
frm
:
wolf_problem_ptr_
->
getTrajectory
()
->
getFrameList
())
{
std
::
cout
<<
"
\t
Frm: "
<<
frm
->
getProblem
()
<<
std
::
endl
;
for
(
CaptureBasePtr
cap
:
frm
->
getCaptureList
())
{
std
::
cout
<<
"
\t\t
Cap: "
<<
cap
->
getProblem
()
<<
std
::
endl
;
for
(
FeatureBasePtr
ftr
:
cap
->
getFeatureList
())
{
std
::
cout
<<
"
\t\t\t
Ftr: "
<<
ftr
->
getProblem
()
<<
std
::
endl
;
for
(
FactorBasePtr
ctr
:
ftr
->
getFactorList
())
{
std
::
cout
<<
"
\t\t\t\t
Ctr: "
<<
ctr
->
getProblem
()
<<
std
::
endl
;
}
}
}
}
std
::
cout
<<
"Map: "
<<
wolf_problem_ptr_
->
getMap
()
->
getProblem
()
<<
std
::
endl
;
for
(
LandmarkBasePtr
lmk
:
wolf_problem_ptr_
->
getMap
()
->
getLandmarkList
())
{
std
::
cout
<<
"
\t
Lmk: "
<<
lmk
->
getProblem
()
<<
std
::
endl
;
}
std
::
cout
<<
"Wolf tree end
\n
-----------
\n
"
<<
std
::
endl
;
}
int
main
()
{
using
namespace
wolf
;
std
::
cout
<<
std
::
endl
<<
"==================== processor tracker landmark test ======================"
<<
std
::
endl
;
// Wolf problem
ProblemPtr
wolf_problem_ptr_
=
Problem
::
create
(
"PO"
,
2
);
// SensorBasePtr sensor_ptr_ = std::make_shared< SensorBase>("ODOM 2D", std::make_shared<StateBlock>(Eigen::VectorXs::Zero(2)),
// std::make_shared<StateBlock>(Eigen::VectorXs::Zero(1)),
// std::make_shared<StateBlock>(Eigen::VectorXs::Zero(2)), 2);
auto
sensor_ptr_
=
SensorBase
::
emplace
<
SensorBase
>
(
wolf_problem_ptr_
->
getHardware
(),
"ODOM 2D"
,
std
::
make_shared
<
StateBlock
>
(
Eigen
::
VectorXs
::
Zero
(
2
)),
std
::
make_shared
<
StateBlock
>
(
Eigen
::
VectorXs
::
Zero
(
1
)),
std
::
make_shared
<
StateBlock
>
(
Eigen
::
VectorXs
::
Zero
(
2
)),
2
);
ProcessorParamsTrackerLandmarkPtr
params_trk
=
std
::
make_shared
<
ProcessorParamsTrackerLandmark
>
();
params_trk
->
max_new_features
=
5
;
params_trk
->
min_features_for_keyframe
=
7
;
params_trk
->
time_tolerance
=
0.25
;
// std::shared_ptr<ProcessorTrackerLandmarkDummy> processor_ptr_ = std::make_shared< ProcessorTrackerLandmarkDummy>(params_trk);
std
::
shared_ptr
<
ProcessorTrackerLandmarkDummy
>
processor_ptr_
=
std
::
static_pointer_cast
<
ProcessorTrackerLandmarkDummy
>
(
ProcessorBase
::
emplace
<
ProcessorTrackerLandmarkDummy
>
(
sensor_ptr_
,
params_trk
));
// wolf_problem_ptr_->addSensor(sensor_ptr_);
// sensor_ptr_->addProcessor(processor_ptr_);
std
::
cout
<<
"sensor & processor created and added to wolf problem"
<<
std
::
endl
;
TimeStamp
t
(
0
);
Scalar
dt
=
0.5
;
for
(
auto
i
=
0
;
i
<
10
;
i
++
)
{
processor_ptr_
->
process
(
std
::
make_shared
<
CaptureVoid
>
(
t
,
sensor_ptr_
));
t
+=
dt
;
}
wolf_problem_ptr_
->
print
(
2
);
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment