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
30eb47a9
Commit
30eb47a9
authored
6 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Fixed compile errors
parent
960fc9b9
No related branches found
No related tags found
1 merge request
!260
WIP: params autoconf
Pipeline
#2589
passed
6 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hello_plugin/CMakeLists.txt
+1
-3
1 addition, 3 deletions
hello_plugin/CMakeLists.txt
hello_plugin/params_autoconf.cpp
+0
-70
0 additions, 70 deletions
hello_plugin/params_autoconf.cpp
with
1 addition
and
73 deletions
hello_plugin/CMakeLists.txt
+
1
−
3
View file @
30eb47a9
...
@@ -4,11 +4,9 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
...
@@ -4,11 +4,9 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
# ADD_EXECUTABLE(hello_plugin hello_plugin.cpp sensor_odom_2D.cpp processor_odom_2D.cpp)
# ADD_EXECUTABLE(hello_plugin hello_plugin.cpp sensor_odom_2D.cpp processor_odom_2D.cpp)
ADD_EXECUTABLE
(
hello_plugin hello_plugin.cpp
)
ADD_EXECUTABLE
(
hello_plugin hello_plugin.cpp
)
ADD_EXECUTABLE
(
params_autoconf params_autoconf.cpp
)
# target_link_libraries(hello_plugin class_loader boost_system console_bridge wolf yaml-cpp ${CERES_LIBRARIES})
# target_link_libraries(hello_plugin class_loader boost_system console_bridge wolf yaml-cpp ${CERES_LIBRARIES})
# target_link_libraries(params_autoconf class_loader boost_system console_bridge wolf yaml-cpp )
# target_link_libraries(params_autoconf class_loader boost_system console_bridge wolf yaml-cpp )
target_link_libraries
(
hello_plugin boost_system wolf yaml-cpp
${
CERES_LIBRARIES
}
dl
)
target_link_libraries
(
hello_plugin wolf yaml-cpp
${
CERES_LIBRARIES
}
dl
)
target_link_libraries
(
params_autoconf boost_system wolf yaml-cpp dl
)
# These lines always at the end
# These lines always at the end
SET
(
HDRS_PLUGIN
${
HDRS_PLUGIN
}
PARENT_SCOPE
)
SET
(
HDRS_PLUGIN
${
HDRS_PLUGIN
}
PARENT_SCOPE
)
SET
(
SRCS_PLUGIN
${
SRCS_PLUGIN
}
PARENT_SCOPE
)
SET
(
SRCS_PLUGIN
${
SRCS_PLUGIN
}
PARENT_SCOPE
)
...
...
This diff is collapsed.
Click to expand it.
hello_plugin/params_autoconf.cpp
deleted
100644 → 0
+
0
−
70
View file @
960fc9b9
/*
* params_autoconf.cpp
*
* Created on: Feb 15, 2019
* Author: jcasals
*/
#include
"base/sensor/sensor_base.h"
#include
"base/wolf.h"
// #include "sensor_odom_2D.cpp"
#include
<yaml-cpp/yaml.h>
#include
"base/yaml/parser_yaml.hpp"
#include
"base/params_server.hpp"
#include
"../hello_wolf/capture_range_bearing.h"
#include
"../hello_wolf/feature_range_bearing.h"
#include
"../hello_wolf/constraint_range_bearing.h"
#include
"../hello_wolf/landmark_point_2D.h"
#include
"loader.hpp"
#include
"base/processor/processor_odom_2D.h"
#include
"base/solver/solver_factory.h"
#include
"base/ceres_wrapper/ceres_manager.h"
using
namespace
std
;
using
namespace
wolf
;
using
namespace
Eigen
;
int
main
(
int
argc
,
char
**
argv
)
{
string
file
=
""
;
if
(
argc
>
1
)
file
=
argv
[
1
];
parserYAML
parser
=
parserYAML
(
file
);
parser
.
parse
();
paramsServer
server
=
paramsServer
(
parser
.
getParams
(),
parser
.
sensorsSerialization
(),
parser
.
processorsSerialization
());
cout
<<
"PRINTING SERVER MAP"
<<
endl
;
server
.
print
();
cout
<<
"-----------------------------------"
<<
endl
;
/**
It seems to be a requirement that each file is loaded by its own ClassLoader object, otherwise I get
a segmentation fault. Likewise, it seems that these ClassLoaders must be allocated at the heap, because
the constructor refuses to build an object if I try to do local (stack) allocation, i.e `ClassLoader(it)` is not allowed but `new ClassLoader(it)` is.
**/
auto
loaders
=
vector
<
Loader
*>
();
for
(
auto
it
:
parser
.
getFiles
())
{
auto
l
=
new
LoaderRaw
(
it
);
loaders
.
push_back
(
l
);
}
ProblemPtr
problem
=
Problem
::
create
(
"PO 2D"
);
auto
sensorMap
=
map
<
string
,
SensorBasePtr
>
();
auto
procesorMap
=
map
<
string
,
ProcessorBasePtr
>
();
for
(
auto
s
:
server
.
getSensors
()){
cout
<<
s
.
_name
<<
" "
<<
s
.
_type
<<
endl
;
sensorMap
.
insert
(
pair
<
string
,
SensorBasePtr
>
(
s
.
_name
,
problem
->
installSensor
(
s
.
_type
,
s
.
_name
,
server
)));
}
for
(
auto
s
:
server
.
getProcessors
()){
cout
<<
s
.
_name
<<
" "
<<
s
.
_type
<<
" "
<<
s
.
_name_assoc_sensor
<<
endl
;
procesorMap
.
insert
(
pair
<
string
,
ProcessorBasePtr
>
(
s
.
_name
,
problem
->
installProcessor
(
s
.
_type
,
s
.
_name
,
s
.
_name_assoc_sensor
,
server
)));
}
auto
prc
=
ProcessorParamsOdom2D
(
"my_proc_test"
,
server
);
std
::
cout
<<
"prc.cov_det "
<<
prc
.
cov_det
<<
std
::
endl
;
std
::
cout
<<
"prc.unmeasured_perturbation_std "
<<
prc
.
unmeasured_perturbation_std
<<
std
::
endl
;
std
::
cout
<<
"prc.angle_turned "
<<
prc
.
angle_turned
<<
std
::
endl
;
std
::
cout
<<
"prc.dist_traveled "
<<
prc
.
dist_traveled
<<
std
::
endl
;
std
::
cout
<<
"prc.max_buff_length "
<<
prc
.
max_buff_length
<<
std
::
endl
;
std
::
cout
<<
"prc.max_time_span "
<<
prc
.
max_time_span
<<
std
::
endl
;
std
::
cout
<<
"prc.time_tolerance "
<<
prc
.
time_tolerance
<<
std
::
endl
;
std
::
cout
<<
"prc.voting_active "
<<
prc
.
voting_active
<<
std
::
endl
;
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