-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use fuse_core::getPositiveParam for all ros::Duration parameters #212
Use fuse_core::getPositiveParam for all ros::Duration parameters #212
Conversation
double tf_timeout_double = tf_timeout.toSec(); | ||
nh.getParam("tf_timeout", tf_timeout_double); | ||
tf_timeout.fromSec(tf_timeout_double); | ||
fuse_core::getPositiveParam(nh, "tf_cache_time", tf_cache_time, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also used fuse_core::getPositiveParam
for these two, that didn't required the input to be positive.
I believe they must be positive, and I've allowed 0.0
because:
- tf_cache_time: A TF buffer with a time cache that only spans for
0.0
seconds probably doesn't make much sense. I believe in this case only the latest transform is kept in the buffer. - tf_timeout: A
lookupTransform
with0.0
timeout will simply not wait for the transform to be available.
If you don't agree with any of this, I'm happy to change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
double tf_timeout_double = tf_timeout.toSec(); | ||
nh.getParam("tf_timeout", tf_timeout_double); | ||
tf_timeout.fromSec(tf_timeout_double); | ||
fuse_core::getPositiveParam(nh, "tf_cache_time", tf_cache_time, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Looks like this needs a rebase. |
2d757a1
to
2a8a7c5
Compare
Rebased |
When I tried to use
fuse_core::getPositiveParam
for allros::Duration
parameters before, I searched for_sec
, so I missed a few spots where we use_double
instead. Now allros::Duration
parameters make use of the newfuse_core::getPositiveParam
that supportsros::Duration
.