Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic_graph_bridge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Guilhem Saurel
dynamic_graph_bridge
Commits
e537910c
Commit
e537910c
authored
5 years ago
by
Joseph Mirabel
Committed by
olivier stasse
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Minor] add debug message + avoid exception.
parent
b15f4136
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ros_tf_listener.cpp
+15
-4
15 additions, 4 deletions
src/ros_tf_listener.cpp
with
15 additions
and
4 deletions
src/ros_tf_listener.cpp
+
15
−
4
View file @
e537910c
...
...
@@ -8,13 +8,24 @@ namespace internal {
sot
::
MatrixHomogeneous
&
TransformListenerData
::
getTransform
(
sot
::
MatrixHomogeneous
&
res
,
int
time
)
{
static
const
ros
::
Time
origin
(
0
);
bool
useFailback
=
false
;
try
{
ros
::
Duration
elapsed
;
std
::
string
msg
;
if
(
buffer
.
canTransform
(
toFrame
,
fromFrame
,
origin
,
&
msg
))
{
transform
=
buffer
.
lookupTransform
(
toFrame
,
fromFrame
,
origin
);
ros
::
Duration
elapsed
(
ros
::
Time
::
now
()
-
transform
.
header
.
stamp
)
;
elapsed
=
ros
::
Time
::
now
()
-
transform
.
header
.
stamp
;
useFailback
=
elapsed
>
max_elapsed
;
}
catch
(
const
tf2
::
TransformException
&
ex
)
{
if
(
useFailback
)
{
std
::
ostringstream
oss
;
oss
<<
"Use failback "
<<
signal
.
getName
()
<<
" at time "
<<
time
<<
". Time since last update of the transform: "
<<
elapsed
;
entity
->
SEND_INFO_STREAM_MSG
(
oss
.
str
());
}
}
else
{
std
::
ostringstream
oss
;
oss
<<
"Enable to get transform at time "
<<
time
<<
": "
<<
ex
.
what
();
oss
<<
"Unable to get transform "
<<
signal
.
getName
()
<<
" at time "
<<
time
<<
": "
<<
msg
;
entity
->
SEND_WARNING_STREAM_MSG
(
oss
.
str
());
useFailback
=
true
;
}
...
...
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