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
1936d8a2
Commit
1936d8a2
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
0cdf0e52
No related branches found
No related tags found
1 merge request
!418
Resolve "Map factory"
Pipeline
#6656
failed
4 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/core/map/factory_map.h
+0
-3
0 additions, 3 deletions
include/core/map/factory_map.h
include/core/problem/problem.h
+1
-0
1 addition, 0 deletions
include/core/problem/problem.h
src/problem/problem.cpp
+19
-3
19 additions, 3 deletions
src/problem/problem.cpp
with
20 additions
and
6 deletions
include/core/map/factory_map.h
+
0
−
3
View file @
1936d8a2
...
@@ -155,8 +155,6 @@ namespace wolf
...
@@ -155,8 +155,6 @@ namespace wolf
*
*
*/
*/
typedef
Factory
<
MapBase
,
typedef
Factory
<
MapBase
,
const
std
::
string
&
,
const
Eigen
::
VectorXd
&
,
const
ParamsMapBasePtr
>
FactoryMap
;
const
ParamsMapBasePtr
>
FactoryMap
;
template
<
>
template
<
>
...
@@ -181,7 +179,6 @@ inline std::string FactoryParamsMap::getClass() const
...
@@ -181,7 +179,6 @@ inline std::string FactoryParamsMap::getClass() const
typedef
Factory
<
MapBase
,
typedef
Factory
<
MapBase
,
const
std
::
string
&
,
const
ParamsServer
&>
AutoConfFactoryMap
;
const
ParamsServer
&>
AutoConfFactoryMap
;
template
<
>
template
<
>
...
...
This diff is collapsed.
Click to expand it.
include/core/problem/problem.h
+
1
−
0
View file @
1936d8a2
...
@@ -329,6 +329,7 @@ class Problem : public std::enable_shared_from_this<Problem>
...
@@ -329,6 +329,7 @@ class Problem : public std::enable_shared_from_this<Problem>
// Map branch -----------------------------------------
// Map branch -----------------------------------------
MapBasePtr
getMap
()
const
;
MapBasePtr
getMap
()
const
;
void
setMap
(
MapBasePtr
);
void
loadMap
(
const
std
::
string
&
_filename_dot_yaml
);
void
loadMap
(
const
std
::
string
&
_filename_dot_yaml
);
void
saveMap
(
const
std
::
string
&
_filename_dot_yaml
,
//
void
saveMap
(
const
std
::
string
&
_filename_dot_yaml
,
//
const
std
::
string
&
_map_name
=
"Map automatically saved by Wolf"
);
const
std
::
string
&
_map_name
=
"Map automatically saved by Wolf"
);
...
...
This diff is collapsed.
Click to expand it.
src/problem/problem.cpp
+
19
−
3
View file @
1936d8a2
...
@@ -3,7 +3,10 @@
...
@@ -3,7 +3,10 @@
#include
"core/hardware/hardware_base.h"
#include
"core/hardware/hardware_base.h"
#include
"core/trajectory/trajectory_base.h"
#include
"core/trajectory/trajectory_base.h"
#include
"core/map/map_base.h"
#include
"core/map/map_base.h"
#include
"core/map/factory_map.h"
#include
"core/sensor/sensor_base.h"
#include
"core/sensor/sensor_base.h"
#include
"core/sensor/factory_sensor.h"
#include
"core/processor/factory_processor.h"
#include
"core/processor/processor_motion.h"
#include
"core/processor/processor_motion.h"
#include
"core/processor/processor_tracker.h"
#include
"core/processor/processor_tracker.h"
#include
"core/capture/capture_pose.h"
#include
"core/capture/capture_pose.h"
...
@@ -11,8 +14,6 @@
...
@@ -11,8 +14,6 @@
#include
"core/factor/factor_base.h"
#include
"core/factor/factor_base.h"
#include
"core/factor/factor_block_absolute.h"
#include
"core/factor/factor_block_absolute.h"
#include
"core/factor/factor_quaternion_absolute.h"
#include
"core/factor/factor_quaternion_absolute.h"
#include
"core/sensor/factory_sensor.h"
#include
"core/processor/factory_processor.h"
#include
"core/state_block/state_block.h"
#include
"core/state_block/state_block.h"
#include
"core/state_block/state_quaternion.h"
#include
"core/state_block/state_quaternion.h"
#include
"core/state_block/state_angle.h"
#include
"core/state_block/state_angle.h"
...
@@ -44,7 +45,7 @@ Problem::Problem(const std::string& _frame_structure, SizeEigen _dim) :
...
@@ -44,7 +45,7 @@ Problem::Problem(const std::string& _frame_structure, SizeEigen _dim) :
tree_manager_
(
nullptr
),
tree_manager_
(
nullptr
),
hardware_ptr_
(
std
::
make_shared
<
HardwareBase
>
()),
hardware_ptr_
(
std
::
make_shared
<
HardwareBase
>
()),
trajectory_ptr_
(
std
::
make_shared
<
TrajectoryBase
>
()),
trajectory_ptr_
(
std
::
make_shared
<
TrajectoryBase
>
()),
map_ptr_
(
std
::
make_shared
<
MapBase
>
()
),
map_ptr_
(
nullptr
),
processor_is_motion_map_
(),
processor_is_motion_map_
(),
frame_structure_
(
_frame_structure
),
frame_structure_
(
_frame_structure
),
prior_options_
(
std
::
make_shared
<
PriorOptions
>
())
prior_options_
(
std
::
make_shared
<
PriorOptions
>
())
...
@@ -75,6 +76,7 @@ void Problem::setup()
...
@@ -75,6 +76,7 @@ void Problem::setup()
{
{
hardware_ptr_
->
setProblem
(
shared_from_this
());
hardware_ptr_
->
setProblem
(
shared_from_this
());
trajectory_ptr_
->
setProblem
(
shared_from_this
());
trajectory_ptr_
->
setProblem
(
shared_from_this
());
map_ptr_
=
std
::
make_shared
<
MapBase
>
(
std
::
make_shared
<
ParamsMapBase
>
());
map_ptr_
->
setProblem
(
shared_from_this
());
map_ptr_
->
setProblem
(
shared_from_this
());
}
}
...
@@ -200,6 +202,13 @@ ProblemPtr Problem::autoSetup(ParamsServer &_server)
...
@@ -200,6 +202,13 @@ ProblemPtr Problem::autoSetup(ParamsServer &_server)
_server
.
getParam
<
VectorComposite
>
(
"problem/prior/state"
));
_server
.
getParam
<
VectorComposite
>
(
"problem/prior/state"
));
}
}
// Map
std
::
string
map_type
=
_server
.
getParam
<
std
::
string
>
(
"problem/map/type"
);
WOLF_TRACE
(
"Map Type: "
,
map_type
);
auto
map
=
AutoConfFactoryMap
::
create
(
map_type
,
_server
);
map
->
setProblem
(
problem
);
problem
->
setMap
(
map
);
// Done
// Done
return
problem
;
return
problem
;
}
}
...
@@ -988,6 +997,13 @@ MapBasePtr Problem::getMap() const
...
@@ -988,6 +997,13 @@ MapBasePtr Problem::getMap() const
return
map_ptr_
;
return
map_ptr_
;
}
}
void
Problem
::
setMap
(
MapBasePtr
_map_ptr
)
{
assert
(
map_ptr_
==
nullptr
&&
"map has already been set"
);
map_ptr_
=
_map_ptr
;
}
TrajectoryBasePtr
Problem
::
getTrajectory
()
const
TrajectoryBasePtr
Problem
::
getTrajectory
()
const
{
{
return
trajectory_ptr_
;
return
trajectory_ptr_
;
...
...
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