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
abb5b67b
Commit
abb5b67b
authored
5 years ago
by
Médéric Fourmy
Browse files
Options
Downloads
Patches
Plain Diff
Fix segfault
parent
10ef25c4
No related branches found
No related tags found
1 merge request
!339
Adapting to multiple processor motion 285
Pipeline
#4967
failed
5 years ago
Stage: build
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/problem/problem.cpp
+3
-4
3 additions, 4 deletions
src/problem/problem.cpp
with
3 additions
and
4 deletions
src/problem/problem.cpp
+
3
−
4
View file @
abb5b67b
...
...
@@ -358,16 +358,15 @@ 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
FrameBasePtr
closest_frame
=
trajectory_ptr_
->
closestKeyOrAuxFrameToTimeStamp
(
_ts
);
Eigen
::
VectorXd
closest_frame_state
=
closest_frame
->
getState
();
if
(
processor_is_motion_list_
.
empty
()){
if
(
closest_frame
!=
nullptr
)
_state
=
closest_frame
_s
tate
;
_state
=
closest_frame
->
getS
tate
()
;
else
_state
=
zeroState
();
}
// RETRIEVE FROM PROCESSOR MOTION
// TODO: current implementation
really
messy, would be much easier with a state being an std::unordered_map
// TODO: current implementation messy, would be much easier with a state being an std::unordered_map
else
{
// Iterate over the problem state structure and get the corresponding state
// in the first processor is motion that provides it
...
...
@@ -383,7 +382,7 @@ void Problem::getState(const TimeStamp& _ts, Eigen::VectorXd& _state) const
// not already there
if
(
states_to_concat_map
.
find
(
sb_name
)
==
states_to_concat_map
.
end
()){
if
(
sb_name
==
'O'
){
int
size_sb
=
dim_
==
3
?
4
:
1
;
// really bad
...
int
size_sb
=
dim_
==
3
?
4
:
1
;
// really bad
: should be more transparent
states_to_concat_map
[
sb_name
]
=
proc_state
.
segment
(
idx
,
size_sb
);
idx
+=
size_sb
;
}
...
...
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