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
a4c46a30
Commit
a4c46a30
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Throw an error if getState() is called in an unitialized ProcessorMotion
parent
e0992431
No related branches found
No related tags found
1 merge request
!157
Kfpackmanager
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor_motion.cpp
+6
-2
6 additions, 2 deletions
src/processor_motion.cpp
with
6 additions
and
2 deletions
src/processor_motion.cpp
+
6
−
2
View file @
a4c46a30
...
...
@@ -286,7 +286,7 @@ void ProcessorMotion::process(CaptureBasePtr _incoming_ptr)
void
ProcessorMotion
::
getState
(
const
TimeStamp
&
_ts
,
Eigen
::
VectorXs
&
_x
)
{
CaptureMotionPtr
capture_motion
;
if
(
_ts
>=
origin_ptr_
->
getTimeStamp
())
if
(
origin_ptr_
&&
_ts
>=
origin_ptr_
->
getTimeStamp
())
// timestamp found in the current processor buffer
capture_motion
=
last_ptr_
;
else
...
...
@@ -302,8 +302,12 @@ void ProcessorMotion::getState(const TimeStamp& _ts, Eigen::VectorXs& _x)
statePlusDelta
(
state_0
,
delta
,
dt
,
_x
);
}
else
{
// We could not find any CaptureMotion for the time stamp requested
std
::
runtime_error
(
"Could not find any Capture for the time stamp requested"
);
WOLF_ERROR
(
"Could not find any Capture for the time stamp requested. "
);
WOLF_TRACE
(
"Did you forget to call Problem::setPrior() in your application?"
)
throw
std
::
runtime_error
(
"Could not find any Capture for the time stamp requested. Did you forget to call Problem::setPrior() in your application?"
);
}
}
CaptureMotionPtr
ProcessorMotion
::
findCaptureContainingTimeStamp
(
const
TimeStamp
&
_ts
)
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