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
f65f0130
Commit
f65f0130
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Update hello_wolf_autoconf.cpp
parent
226cd5ae
No related branches found
No related tags found
1 merge request
!303
Hello wolf autoconf
Pipeline
#3977
passed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hello_wolf/hello_wolf_autoconf.cpp
+7
-6
7 additions, 6 deletions
hello_wolf/hello_wolf_autoconf.cpp
with
7 additions
and
6 deletions
hello_wolf/hello_wolf_autoconf.cpp
+
7
−
6
View file @
f65f0130
...
@@ -103,15 +103,15 @@ int main()
...
@@ -103,15 +103,15 @@ int main()
WOLF_TRACE
(
"======== CONFIGURE PROBLEM ======="
)
WOLF_TRACE
(
"======== CONFIGURE PROBLEM ======="
)
// Config file to parse
// Config file to parse
. Here is where all the problem is defined:
std
::
string
file
=
std
::
string
(
_WOLF_ROOT_DIR
)
+
"/hello_wolf/hello_wolf_config.yaml"
;
std
::
string
file
=
std
::
string
(
_WOLF_ROOT_DIR
)
+
"/hello_wolf/hello_wolf_config.yaml"
;
// parse file into params server
// parse file into params server
: each param will be retrievable from this params server:
parserYAML
parser
=
parserYAML
(
file
);
parserYAML
parser
=
parserYAML
(
file
);
parser
.
parse
();
parser
.
parse
();
paramsServer
server
=
paramsServer
(
parser
.
getParams
(),
parser
.
sensorsSerialization
(),
parser
.
processorsSerialization
());
paramsServer
server
=
paramsServer
(
parser
.
getParams
(),
parser
.
sensorsSerialization
(),
parser
.
processorsSerialization
());
// Wolf problem
// Wolf problem
: automatically build the left branch of the wolf tree from the contents of the params server:
ProblemPtr
problem
=
Problem
::
autoSetup
(
server
);
ProblemPtr
problem
=
Problem
::
autoSetup
(
server
);
// Print problem to see its status before processing any sensor data
// Print problem to see its status before processing any sensor data
...
@@ -121,7 +121,7 @@ int main()
...
@@ -121,7 +121,7 @@ int main()
SensorBasePtr
sensor_odo
=
problem
->
getSensor
(
"odom"
);
SensorBasePtr
sensor_odo
=
problem
->
getSensor
(
"odom"
);
SensorBasePtr
sensor_rb
=
problem
->
getSensor
(
"rb"
);
SensorBasePtr
sensor_rb
=
problem
->
getSensor
(
"rb"
);
// Solver
// Solver
. Configure a Ceres solver
ceres
::
Solver
::
Options
options
;
ceres
::
Solver
::
Options
options
;
options
.
max_num_iterations
=
1000
;
// We depart far from solution, need a lot of iterations
options
.
max_num_iterations
=
1000
;
// We depart far from solution, need a lot of iterations
CeresManagerPtr
ceres
=
std
::
make_shared
<
CeresManager
>
(
problem
,
options
);
CeresManagerPtr
ceres
=
std
::
make_shared
<
CeresManager
>
(
problem
,
options
);
...
@@ -129,6 +129,7 @@ int main()
...
@@ -129,6 +129,7 @@ int main()
// SELF CALIBRATION ===================================================
// SELF CALIBRATION ===================================================
// These few lines control whether we calibrate some sensor parameters or not.
// NOTE: SELF-CALIBRATION OF SENSOR ORIENTATION
// NOTE: SELF-CALIBRATION OF SENSOR ORIENTATION
// Uncomment this line below to achieve sensor self-calibration (of the orientation only, since the position is not observable)
// Uncomment this line below to achieve sensor self-calibration (of the orientation only, since the position is not observable)
...
@@ -138,7 +139,7 @@ int main()
...
@@ -138,7 +139,7 @@ int main()
// The position is however not observable, and thus self-calibration would not work. You can try uncommenting it too.
// The position is however not observable, and thus self-calibration would not work. You can try uncommenting it too.
// sensor_rb->getP()->unfix();
// sensor_rb->getP()->unfix();
// CONFIGURE
observations
==============================================
// CONFIGURE
input data (motion and measurements)
==============================================
// Motion data
// Motion data
Vector2s
motion_data
(
1.0
,
0.0
);
// Will advance 1m at each keyframe, will not turn.
Vector2s
motion_data
(
1.0
,
0.0
);
// Will advance 1m at each keyframe, will not turn.
...
@@ -148,7 +149,7 @@ int main()
...
@@ -148,7 +149,7 @@ int main()
VectorXi
ids
;
VectorXi
ids
;
VectorXs
ranges
,
bearings
;
VectorXs
ranges
,
bearings
;
// SET OF EVENTS =======================================================
// SET OF EVENTS
: make things happen
=======================================================
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
WOLF_TRACE
(
"======== BUILD PROBLEM ======="
)
WOLF_TRACE
(
"======== BUILD PROBLEM ======="
)
...
...
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