Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 92

How to parameterize a duration?

$
0
0
I have used the following pattern a number of times, across a variety of packages: double my_param_seconds; ros::param::get("~my_param", my_param_seconds); my_param_ = ros::Duration(my_param_seconds); This seems awkward compared to parameterizing integers or doubles. It's fine if it's only one or two, but for a safety state machine which has a half-dozen parameterized timeouts, this is a drag. I can write my own little wrapper function, but perhaps something standard already exists? Alternatively, is it better to simply store the seconds value, and convert that to a `ros::Duration` at the point of use? Thanks.

Viewing all articles
Browse latest Browse all 92

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>