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
3ab2283b
Commit
3ab2283b
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
small var rename for consistency with convention
parent
f115986a
No related branches found
No related tags found
No related merge requests found
Pipeline
#4359
passed
5 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/problem/problem.h
+3
-3
3 additions, 3 deletions
include/core/problem/problem.h
src/problem/problem.cpp
+12
-12
12 additions, 12 deletions
src/problem/problem.cpp
with
15 additions
and
15 deletions
include/core/problem/problem.h
+
3
−
3
View file @
3ab2283b
...
@@ -262,10 +262,10 @@ class Problem : public std::enable_shared_from_this<Problem>
...
@@ -262,10 +262,10 @@ class Problem : public std::enable_shared_from_this<Problem>
// State getters
// State getters
Eigen
::
VectorXs
getCurrentState
(
)
const
;
Eigen
::
VectorXs
getCurrentState
(
)
const
;
void
getCurrentState
(
Eigen
::
VectorXs
&
state
)
const
;
void
getCurrentState
(
Eigen
::
VectorXs
&
_
state
)
const
;
void
getCurrentStateAndStamp
(
Eigen
::
VectorXs
&
state
,
TimeStamp
&
_ts
)
const
;
void
getCurrentStateAndStamp
(
Eigen
::
VectorXs
&
_
state
,
TimeStamp
&
_ts
)
const
;
Eigen
::
VectorXs
getState
(
const
TimeStamp
&
_ts
)
const
;
Eigen
::
VectorXs
getState
(
const
TimeStamp
&
_ts
)
const
;
void
getState
(
const
TimeStamp
&
_ts
,
Eigen
::
VectorXs
&
state
)
const
;
void
getState
(
const
TimeStamp
&
_ts
,
Eigen
::
VectorXs
&
_
state
)
const
;
// Zero state provider
// Zero state provider
Eigen
::
VectorXs
zeroState
(
)
const
;
Eigen
::
VectorXs
zeroState
(
)
const
;
bool
priorIsSet
()
const
;
bool
priorIsSet
()
const
;
...
...
This diff is collapsed.
Click to expand it.
src/problem/problem.cpp
+
12
−
12
View file @
3ab2283b
...
@@ -328,42 +328,42 @@ Eigen::VectorXs Problem::getCurrentState() const
...
@@ -328,42 +328,42 @@ Eigen::VectorXs Problem::getCurrentState() const
return
state
;
return
state
;
}
}
void
Problem
::
getCurrentState
(
Eigen
::
VectorXs
&
state
)
const
void
Problem
::
getCurrentState
(
Eigen
::
VectorXs
&
_
state
)
const
{
{
if
(
processor_motion_ptr_
!=
nullptr
)
if
(
processor_motion_ptr_
!=
nullptr
)
processor_motion_ptr_
->
getCurrentState
(
state
);
processor_motion_ptr_
->
getCurrentState
(
_
state
);
else
if
(
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
!=
nullptr
)
else
if
(
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
!=
nullptr
)
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
->
getState
(
state
);
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
->
getState
(
_
state
);
else
else
state
=
zeroState
();
_
state
=
zeroState
();
}
}
void
Problem
::
getCurrentStateAndStamp
(
Eigen
::
VectorXs
&
state
,
TimeStamp
&
ts
)
const
void
Problem
::
getCurrentStateAndStamp
(
Eigen
::
VectorXs
&
_
state
,
TimeStamp
&
ts
)
const
{
{
if
(
processor_motion_ptr_
!=
nullptr
)
if
(
processor_motion_ptr_
!=
nullptr
)
{
{
processor_motion_ptr_
->
getCurrentState
(
state
);
processor_motion_ptr_
->
getCurrentState
(
_
state
);
processor_motion_ptr_
->
getCurrentTimeStamp
(
ts
);
processor_motion_ptr_
->
getCurrentTimeStamp
(
ts
);
}
}
else
if
(
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
!=
nullptr
)
else
if
(
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
!=
nullptr
)
{
{
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
->
getTimeStamp
(
ts
);
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
->
getTimeStamp
(
ts
);
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
->
getState
(
state
);
trajectory_ptr_
->
getLastKeyOrAuxFrame
()
->
getState
(
_
state
);
}
}
else
else
state
=
zeroState
();
_
state
=
zeroState
();
}
}
void
Problem
::
getState
(
const
TimeStamp
&
_ts
,
Eigen
::
VectorXs
&
state
)
const
void
Problem
::
getState
(
const
TimeStamp
&
_ts
,
Eigen
::
VectorXs
&
_
state
)
const
{
{
// try to get the state from processor_motion if any, otherwise...
// try to get the state from processor_motion if any, otherwise...
if
(
processor_motion_ptr_
==
nullptr
||
!
processor_motion_ptr_
->
getState
(
_ts
,
state
))
if
(
processor_motion_ptr_
==
nullptr
||
!
processor_motion_ptr_
->
getState
(
_ts
,
_
state
))
{
{
FrameBasePtr
closest_frame
=
trajectory_ptr_
->
closestKeyOrAuxFrameToTimeStamp
(
_ts
);
FrameBasePtr
closest_frame
=
trajectory_ptr_
->
closestKeyOrAuxFrameToTimeStamp
(
_ts
);
if
(
closest_frame
!=
nullptr
)
if
(
closest_frame
!=
nullptr
)
closest_frame
->
getState
(
state
);
closest_frame
->
getState
(
_
state
);
else
else
state
=
zeroState
();
_
state
=
zeroState
();
}
}
}
}
...
...
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