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
c4f07b5f
Commit
c4f07b5f
authored
5 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Plain Diff
Merge branch 'devel' into write-state-tracker-demo
parents
ad63e333
343c1fc8
No related branches found
No related tags found
No related merge requests found
Pipeline
#4708
passed
5 years ago
Stage: build
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/core/utils/params_server.hpp
+13
-8
13 additions, 8 deletions
include/core/utils/params_server.hpp
src/problem/problem.cpp
+6
-5
6 additions, 5 deletions
src/problem/problem.cpp
wolf_scripts/rename.sh
+7
-2
7 additions, 2 deletions
wolf_scripts/rename.sh
with
26 additions
and
15 deletions
include/core/utils/params_server.hpp
+
13
−
8
View file @
c4f07b5f
...
...
@@ -40,14 +40,19 @@ public:
_params
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
key
,
value
));
}
// template<typename T>
// T getParam(std::string key, std::string def_value) const {
// if(_params.find(key) != _params.end()){
// return converter<T>::convert(_params.find(key)->second);
// }else{
// return converter<T>::convert(def_value);
// }
// }
void
addParams
(
std
::
map
<
std
::
string
,
std
::
string
>
params
)
{
_params
.
insert
(
params
.
begin
(),
params
.
end
());
}
// template<typename T>
// T getParam(std::string key, std::string def_value) const {
// if(_params.find(key) != _params.end()){
// return converter<T>::convert(_params.find(key)->second);
// }else{
// return converter<T>::convert(def_value);
// }
// }
template
<
typename
T
>
T
getParam
(
std
::
string
key
)
const
{
...
...
This diff is collapsed.
Click to expand it.
src/problem/problem.cpp
+
6
−
5
View file @
c4f07b5f
...
...
@@ -84,7 +84,8 @@ ProblemPtr Problem::autoSetup(ParamsServer &_server)
std
::
string
frame_structure
=
_server
.
getParam
<
std
::
string
>
(
"problem/frame_structure"
);
int
dim
=
_server
.
getParam
<
int
>
(
"problem/dimension"
);
auto
problem
=
Problem
::
create
(
frame_structure
,
dim
);
// cout << "PRINTING SERVER MAP" << endl;
//
// cout << "PRINTING SERVER MAP" << endl;
// _server.print();
// cout << "-----------------------------------" << endl;
WOLF_TRACE
(
"Setting up problem with frame structure {"
+
frame_structure
+
"} and dimension "
+
std
::
to_string
(
dim
)
+
"D"
);
...
...
@@ -149,10 +150,10 @@ ProblemPtr Problem::autoSetup(ParamsServer &_server)
}
// Prior
Eigen
::
VectorXs
prior_state
=
_server
.
getParam
<
Eigen
::
VectorXs
>
(
"problem/prior/state"
);
Eigen
::
MatrixXs
prior_cov
=
_server
.
getParam
<
Eigen
::
MatrixXs
>
(
"problem/prior/cov"
);
Scalar
prior_time_tolerance
=
_server
.
getParam
<
Scalar
>
(
"problem/prior/time_tolerance"
);
Scalar
prior_ts
=
_server
.
getParam
<
Scalar
>
(
"problem/prior/timestamp"
);
Eigen
::
VectorXs
prior_state
=
_server
.
getParam
<
Eigen
::
VectorXs
>
(
"problem/prior/state"
);
Eigen
::
MatrixXs
prior_cov
=
_server
.
getParam
<
Eigen
::
MatrixXs
>
(
"problem/prior/cov"
);
Scalar
prior_time_tolerance
=
_server
.
getParam
<
Scalar
>
(
"problem/prior/time_tolerance"
);
Scalar
prior_ts
=
_server
.
getParam
<
Scalar
>
(
"problem/prior/timestamp"
);
WOLF_TRACE
(
"prior timestamp:
\n
"
,
prior_ts
);
WOLF_TRACE
(
"prior state:
\n
"
,
prior_state
.
transpose
());
...
...
This diff is collapsed.
Click to expand it.
wolf_scripts/rename.sh
+
7
−
2
View file @
c4f07b5f
...
...
@@ -50,8 +50,13 @@ types=$(getTypes | sort | uniq)
# done
for
target
in
$(
find include/ src/
test
/
-type
f
)
;
do
for
ctype
in
$types
;
do
filename
=
$(
echo
$target
| rev |
cut
-d
'/'
-f1
|
cut
-d
'.'
-f2
| rev
)
snake2camel
$filename
oldtype
=
$ctype
ctype
=
$(
echo
$ctype
|
sed
-r
"s/([^
\
0-9])([^
\
0-9]+)
\
?/
\1\L\2
/g"
)
sed
-ri
"s/(Capture|Feature|Processor|Landmark|Factor|Sensor)(.*)
\"
${
oldtype
}
\"
/
\1\2\"\1
${
ctype
}
\"
/"
$target
# echo $target $oldtype $ctype
# sed -ri "s/(Capture|Feature|Processor|Landmark|Factor|Sensor)(.*)\"${oldtype}\"/\1\2\"\1${ctype}\"/" $target
sed
-ri
"s/(Capture|Feature|Processor|Landmark|Factor|Sensor)(.*)
\"
${
oldtype
}
\"
/
\1\2\"\1
${
ctype
}
\"
/"
$target
sed
-ri
"s%
\"
${
oldtype
}
\"
%
\"
${
new_camel
}
\"
%"
$target
done
done
\ No newline at end of file
done
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