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
d1fabfae
Commit
d1fabfae
authored
5 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
P::getCurrentState returns prior if !applied & using bool isM::getState
parent
2dddd16d
No related branches found
No related tags found
No related merge requests found
Pipeline
#5488
passed
5 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/problem/problem.cpp
+10
-3
10 additions, 3 deletions
src/problem/problem.cpp
with
10 additions
and
3 deletions
src/problem/problem.cpp
+
10
−
3
View file @
d1fabfae
...
@@ -367,7 +367,12 @@ void Problem::getCurrentState(Eigen::VectorXd& _state) const
...
@@ -367,7 +367,12 @@ void Problem::getCurrentState(Eigen::VectorXd& _state) const
void
Problem
::
getCurrentStateAndStamp
(
Eigen
::
VectorXd
&
_state
,
TimeStamp
&
_ts
)
const
void
Problem
::
getCurrentStateAndStamp
(
Eigen
::
VectorXd
&
_state
,
TimeStamp
&
_ts
)
const
{
{
if
(
!
processor_is_motion_list_
.
empty
())
if
(
!
isPriorSet
()
and
prior_options_
->
mode
!=
"nothing"
)
{
_state
=
prior_options_
->
state
;
_ts
=
0
;
}
else
if
(
!
processor_is_motion_list_
.
empty
())
{
{
// retrieve the minimum of the most recent ts in all processor is motion then call getSate(ts, state)
// retrieve the minimum of the most recent ts in all processor is motion then call getSate(ts, state)
std
::
list
<
TimeStamp
>
proc_is_motion_current_ts
;
std
::
list
<
TimeStamp
>
proc_is_motion_current_ts
;
...
@@ -389,7 +394,7 @@ void Problem::getCurrentStateAndStamp(Eigen::VectorXd& _state, TimeStamp& _ts) c
...
@@ -389,7 +394,7 @@ void Problem::getCurrentStateAndStamp(Eigen::VectorXd& _state, TimeStamp& _ts) c
}
}
// Problem of this implmentation: if more state
// Problem of this impl
e
mentation: if more state
void
Problem
::
getState
(
const
TimeStamp
&
_ts
,
Eigen
::
VectorXd
&
_state
)
const
void
Problem
::
getState
(
const
TimeStamp
&
_ts
,
Eigen
::
VectorXd
&
_state
)
const
{
{
// if _ts is too recent, for some of the processor is motion, they return the state corresponding to their last frame timestamp
// if _ts is too recent, for some of the processor is motion, they return the state corresponding to their last frame timestamp
...
@@ -413,7 +418,9 @@ void Problem::getState(const TimeStamp& _ts, Eigen::VectorXd& _state) const
...
@@ -413,7 +418,9 @@ void Problem::getState(const TimeStamp& _ts, Eigen::VectorXd& _state) const
for
(
auto
proc
:
processor_is_motion_list_
)
for
(
auto
proc
:
processor_is_motion_list_
)
{
{
Eigen
::
VectorXd
proc_state
=
proc
->
getState
(
_ts
);
Eigen
::
VectorXd
proc_state
;
if
(
!
proc
->
getState
(
_ts
,
proc_state
))
continue
;
int
idx
=
0
;
int
idx
=
0
;
for
(
char
sb_name
:
proc
->
getStateStructure
()){
for
(
char
sb_name
:
proc
->
getStateStructure
()){
...
...
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