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
aa245079
Commit
aa245079
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Use a const ref to PrcParamsOdom2D in constructor
parent
b5bd6dbb
No related branches found
Branches containing commit
No related tags found
1 merge request
!170
Processors api
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/processor_odom_2D.cpp
+8
-16
8 additions, 16 deletions
src/processor_odom_2D.cpp
src/processor_odom_2D.h
+7
-10
7 additions, 10 deletions
src/processor_odom_2D.h
with
15 additions
and
26 deletions
src/processor_odom_2D.cpp
+
8
−
16
View file @
aa245079
...
...
@@ -2,18 +2,14 @@
namespace
wolf
{
ProcessorOdom2D
::
ProcessorOdom2D
(
const
Scalar
&
_dist_traveled_th
,
const
Scalar
&
_theta_traveled_th
,
const
Scalar
&
_cov_det_th
,
const
Scalar
&
_elapsed_time_th
,
const
Scalar
&
_unmeasured_perturbation_std
)
:
ProcessorMotion
(
"ODOM 2D"
,
3
,
3
,
3
,
2
),
dist_traveled_th_
(
_dist_traveled_th
),
theta_traveled_th_
(
_theta_traveled_th
),
cov_det_th_
(
_cov_det_th
),
elapsed_time_th_
(
_elapsed_time_th
)
ProcessorOdom2D
::
ProcessorOdom2D
(
const
ProcessorParamsOdom2D
&
_params
)
:
ProcessorMotion
(
"ODOM 2D"
,
3
,
3
,
3
,
2
),
dist_traveled_th_
(
_params
.
dist_traveled_th_
),
theta_traveled_th_
(
_params
.
theta_traveled_th_
),
cov_det_th_
(
_params
.
cov_det_th_
),
elapsed_time_th_
(
_params
.
elapsed_time_th_
)
{
unmeasured_perturbation_cov_
=
_unmeasured_perturbation_std
*
_unmeasured_perturbation_std
*
Matrix3s
::
Identity
();
unmeasured_perturbation_cov_
=
_
params
.
unmeasured_perturbation_std
_
*
_
params
.
unmeasured_perturbation_std
_
*
Matrix3s
::
Identity
();
}
ProcessorOdom2D
::~
ProcessorOdom2D
()
...
...
@@ -180,11 +176,7 @@ ProcessorBasePtr ProcessorOdom2D::create(const std::string& _unique_name, const
{
std
::
shared_ptr
<
ProcessorParamsOdom2D
>
params
=
std
::
static_pointer_cast
<
ProcessorParamsOdom2D
>
(
_params
);
prc_ptr
=
std
::
make_shared
<
ProcessorOdom2D
>
(
params
->
dist_traveled_th_
,
params
->
theta_traveled_th_
,
params
->
cov_det_th_
,
params
->
elapsed_time_th_
,
params
->
unmeasured_perturbation_std_
);
prc_ptr
=
std
::
make_shared
<
ProcessorOdom2D
>
(
*
params
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/processor_odom_2D.h
+
7
−
10
View file @
aa245079
...
...
@@ -21,22 +21,19 @@ WOLF_STRUCT_PTR_TYPEDEFS(ProcessorParamsOdom2D);
struct
ProcessorParamsOdom2D
:
public
ProcessorParamsBase
{
Scalar
dist_traveled_th_
=
1.0
;
Scalar
theta_traveled_th_
=
0.17
;
Scalar
cov_det_th_
=
1.0
;
Scalar
elapsed_time_th_
=
1.0
;
Scalar
unmeasured_perturbation_std_
=
0.001
;
Scalar
dist_traveled_th_
=
1.0
;
// 1m
Scalar
theta_traveled_th_
=
0.17
;
// 90 degrees
Scalar
cov_det_th_
=
1.0
;
// 1 rad^2
Scalar
elapsed_time_th_
=
1.0
;
// 1s
Scalar
unmeasured_perturbation_std_
=
0.001
;
// no particular dimension: the same for displacement and angle
};
class
ProcessorOdom2D
:
public
ProcessorMotion
{
public:
ProcessorOdom2D
(
const
Scalar
&
_traveled_dist_th
=
1.0
,
const
Scalar
&
_theta_traveled_th
=
0.17
,
const
Scalar
&
_cov_det_th
=
1.0
,
const
Scalar
&
_elapsed_time_th
=
1.0
,
const
Scalar
&
_unmeasured_perturbation_std
=
0.001
);
ProcessorOdom2D
(
const
ProcessorParamsOdom2D
&
_params
=
ProcessorParamsOdom2D
());
virtual
~
ProcessorOdom2D
();
virtual
bool
voteForKeyFrame
()
override
;
protected:
...
...
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