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
1237bacc
Commit
1237bacc
authored
2 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
[skip ci] wip
parent
72bf7682
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!448
Draft: Resolve "Implementation of new nodes creation"
Pipeline
#11979
skipped
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/sensor/sensor_base.h
+5
-6
5 additions, 6 deletions
include/core/sensor/sensor_base.h
src/problem/problem.cpp
+14
-1
14 additions, 1 deletion
src/problem/problem.cpp
with
19 additions
and
7 deletions
include/core/sensor/sensor_base.h
+
5
−
6
View file @
1237bacc
...
...
@@ -87,17 +87,16 @@ static SensorBasePtr create(SizeEigen _dim,
const std::string& _yaml_filepath, \
const std::vector<std::string>& folders_schema) \
{ \
auto s
chema
= yaml-schema-cpp::YamlServer(folders_schema, _yaml_filepath); \
auto s
erver
= yaml-schema-cpp::YamlServer(folders_schema, _yaml_filepath); \
\
std::stringstream log; \
if (not schema.validate(SensorClass, log)) \
if (not server.validate(SensorClass)) \
{ \
WOLF_ERROR(
log.str());
\
WOLF_ERROR(
server.getLog().str());
\
return nullptr; \
} \
auto params = std::make_shared<ParamsSensorClass>(s
chema
.getNode()); \
auto params = std::make_shared<ParamsSensorClass>(s
erver
.getNode()); \
\
auto priors = Priors(s
chema
.getNode()["states"]); \
auto priors = Priors(s
erver
.getNode()["states"]); \
\
return std::make_shared<SensorClass>(_dim, params, priors); \
} \
...
...
This diff is collapsed.
Click to expand it.
src/problem/problem.cpp
+
14
−
1
View file @
1237bacc
...
...
@@ -84,7 +84,7 @@ ProblemPtr Problem::create(const std::string& _frame_structure, SizeEigen _dim,
return
p
->
shared_from_this
();
}
ProblemPtr
Problem
::
autoSetup
(
ParamsServer
&
_serv
er
)
ProblemPtr
Problem
::
autoSetup
(
const
std
::
string
&
_input_yaml_file
,
std
::
vector
<
std
::
string
>
_schema_fold
er
s
)
{
#if __APPLE__
std
::
string
lib_extension
=
".dylib"
;
...
...
@@ -92,6 +92,19 @@ ProblemPtr Problem::autoSetup(ParamsServer &_server)
std
::
string
lib_extension
=
".so"
;
#endif
// Create yaml server
auto
server
=
yaml
-
schema
-
cpp
::
YamlServer
({},
_input_yaml_file
);
//
std
::
stringstream
log
;
if
(
not
server
.
validate
(
SensorClass
,
log
))
{
WOLF_ERROR
(
log
.
str
());
return
nullptr
;
}
auto
params
=
std
::
make_shared
<
ParamsSensorClass
>
(
server
.
getNode
())
// Problem structure and dimension
std
::
string
frame_structure
=
_server
.
getParam
<
std
::
string
>
(
"problem/frame_structure"
);
int
dim
=
_server
.
getParam
<
int
>
(
"problem/dimension"
);
...
...
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