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
9fefe6b6
Commit
9fefe6b6
authored
3 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Improve motion buffer print()
parent
4097a1d7
No related branches found
No related tags found
1 merge request
!466
devel->main
Pipeline
#12715
passed
3 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/processor/motion_buffer.h
+1
-1
1 addition, 1 deletion
include/core/processor/motion_buffer.h
src/processor/motion_buffer.cpp
+9
-6
9 additions, 6 deletions
src/processor/motion_buffer.cpp
with
10 additions
and
7 deletions
include/core/processor/motion_buffer.h
+
1
−
1
View file @
9fefe6b6
...
@@ -100,7 +100,7 @@ class MotionBuffer : public std::list<Motion>
...
@@ -100,7 +100,7 @@ class MotionBuffer : public std::list<Motion>
const
Motion
&
getMotion
(
const
TimeStamp
&
_ts
)
const
;
const
Motion
&
getMotion
(
const
TimeStamp
&
_ts
)
const
;
void
getMotion
(
const
TimeStamp
&
_ts
,
Motion
&
_motion
)
const
;
void
getMotion
(
const
TimeStamp
&
_ts
,
Motion
&
_motion
)
const
;
void
split
(
const
TimeStamp
&
_ts
,
MotionBuffer
&
_oldest_buffer
);
void
split
(
const
TimeStamp
&
_ts
,
MotionBuffer
&
_oldest_buffer
);
void
print
(
bool
show_data
=
0
,
bool
show_delta
=
0
,
bool
show_delta_int
=
0
,
bool
show_jacs
=
0
);
void
print
(
bool
show_data
=
0
,
bool
show_delta
=
0
,
bool
show_delta_int
=
0
,
bool
show_jacs
=
0
,
bool
show_covs
=
0
);
};
};
}
// namespace wolf
}
// namespace wolf
...
...
This diff is collapsed.
Click to expand it.
src/processor/motion_buffer.cpp
+
9
−
6
View file @
9fefe6b6
...
@@ -144,14 +144,14 @@ void MotionBuffer::split(const TimeStamp& _ts, MotionBuffer& _buffer_part_before
...
@@ -144,14 +144,14 @@ void MotionBuffer::split(const TimeStamp& _ts, MotionBuffer& _buffer_part_before
}
}
void
MotionBuffer
::
print
(
bool
show_data
,
bool
show_delta
,
bool
show_delta_int
,
bool
show_jacs
)
void
MotionBuffer
::
print
(
bool
show_data
,
bool
show_delta
,
bool
show_delta_int
,
bool
show_jacs
,
bool
show_covs
)
{
{
using
std
::
cout
;
using
std
::
cout
;
using
std
::
endl
;
using
std
::
endl
;
if
(
!
show_data
&&
!
show_delta
&&
!
show_delta_int
&&
!
show_jacs
)
if
(
!
show_data
&&
!
show_delta
&&
!
show_delta_int
&&
!
show_jacs
&&
!
show_covs
)
{
{
cout
<<
"Buffer s
tate [
"
<<
this
->
size
()
<<
"
]
: <"
;
cout
<<
"Buffer s
ize:
"
<<
this
->
size
()
<<
"
; time stamps
: <"
;
for
(
Motion
mot
:
*
this
)
for
(
Motion
mot
:
*
this
)
cout
<<
" "
<<
mot
.
ts_
;
cout
<<
" "
<<
mot
.
ts_
;
cout
<<
" >"
<<
endl
;
cout
<<
" >"
<<
endl
;
...
@@ -165,17 +165,20 @@ void MotionBuffer::print(bool show_data, bool show_delta, bool show_delta_int, b
...
@@ -165,17 +165,20 @@ void MotionBuffer::print(bool show_data, bool show_delta, bool show_delta_int, b
if
(
show_data
)
if
(
show_data
)
{
{
cout
<<
" data: "
<<
mot
.
data_
.
transpose
()
<<
endl
;
cout
<<
" data: "
<<
mot
.
data_
.
transpose
()
<<
endl
;
cout
<<
" data cov:
\n
"
<<
mot
.
data_cov_
<<
endl
;
if
(
show_covs
)
cout
<<
" data cov:
\n
"
<<
mot
.
data_cov_
<<
endl
;
}
}
if
(
show_delta
)
if
(
show_delta
)
{
{
cout
<<
" delta: "
<<
mot
.
delta_
.
transpose
()
<<
endl
;
cout
<<
" delta: "
<<
mot
.
delta_
.
transpose
()
<<
endl
;
cout
<<
" delta cov:
\n
"
<<
mot
.
delta_cov_
<<
endl
;
if
(
show_covs
)
cout
<<
" delta cov:
\n
"
<<
mot
.
delta_cov_
<<
endl
;
}
}
if
(
show_delta_int
)
if
(
show_delta_int
)
{
{
cout
<<
" delta integrated: "
<<
mot
.
delta_integr_
.
transpose
()
<<
endl
;
cout
<<
" delta integrated: "
<<
mot
.
delta_integr_
.
transpose
()
<<
endl
;
cout
<<
" delta integrated cov:
\n
"
<<
mot
.
delta_integr_cov_
<<
endl
;
if
(
show_covs
)
cout
<<
" delta integrated cov:
\n
"
<<
mot
.
delta_integr_cov_
<<
endl
;
}
}
if
(
show_jacs
)
if
(
show_jacs
)
{
{
...
...
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