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
3e9691e2
Commit
3e9691e2
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add problem::getTimeStamp()
parent
bb77e506
No related branches found
No related tags found
1 merge request
!366
Resolve "Complete state vector new data structure?"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/problem/problem.h
+1
-0
1 addition, 0 deletions
include/core/problem/problem.h
src/problem/problem.cpp
+19
-0
19 additions, 0 deletions
src/problem/problem.cpp
with
20 additions
and
0 deletions
include/core/problem/problem.h
+
1
−
0
View file @
3e9691e2
...
@@ -312,6 +312,7 @@ class Problem : public std::enable_shared_from_this<Problem>
...
@@ -312,6 +312,7 @@ class Problem : public std::enable_shared_from_this<Problem>
// State getters
// State getters
VectorComposite
getState
(
)
const
;
VectorComposite
getState
(
)
const
;
VectorComposite
getState
(
const
TimeStamp
&
_ts
)
const
;
VectorComposite
getState
(
const
TimeStamp
&
_ts
)
const
;
TimeStamp
getTimeStamp
(
)
const
;
// Zero state provider
// Zero state provider
Eigen
::
VectorXd
zeroState
(
)
const
;
Eigen
::
VectorXd
zeroState
(
)
const
;
...
...
This diff is collapsed.
Click to expand it.
src/problem/problem.cpp
+
19
−
0
View file @
3e9691e2
...
@@ -415,6 +415,25 @@ FrameBasePtr Problem::emplaceFrame(FrameType _frame_key_type, //
...
@@ -415,6 +415,25 @@ FrameBasePtr Problem::emplaceFrame(FrameType _frame_key_type, //
// _state = zeroState();
// _state = zeroState();
//}
//}
TimeStamp
Problem
::
getTimeStamp
(
)
const
{
if
(
processor_is_motion_list_
.
empty
()
)
// Use last estimated frame's state
{
auto
last_kf_or_aux
=
trajectory_ptr_
->
getLastKeyOrAuxFrame
();
assert
(
last_kf_or_aux
!=
nullptr
&&
"Problem has no Keyframe so no timestamp can be obtained!"
);
return
last_kf_or_aux
->
getTimeStamp
();
}
else
{
TimeStamp
ts
(
0
);
for
(
const
auto
&
prc
:
processor_is_motion_list_
)
if
(
prc
->
getTimeStamp
()
>
ts
)
ts
=
prc
->
getTimeStamp
();
return
ts
;
}
}
VectorComposite
Problem
::
getState
()
const
VectorComposite
Problem
::
getState
()
const
{
{
...
...
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