-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
In wait_action node change duration type from int to double #3871
In wait_action node change duration type from int to double #3871
Conversation
@@ -53,7 +53,7 @@ class WaitAction : public BtActionNode<nav2_msgs::action::Wait> | |||
{ | |||
return providedBasicPorts( | |||
{ | |||
BT::InputPort<int>("wait_duration", 1, "Wait time") | |||
BT::InputPort<double>("wait_duration", 1, "Wait time") |
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.
change the default to 1.0 to make it clearer that it's a double
I wanted to say that the documentation needs updating as well but it looks like it's correct already; there was a mismatch in the code: https://navigation.ros.org/configuration/packages/bt-plugins/actions/Wait.html |
There are also a bunch of trees that use Wait with an int, example. I know it still works like that and it's not a big deal but it's slightly cleaner imo to have them as doubles as well |
done)) |
@maksymdidukh check CI, you have linting issues: https://app.circleci.com/pipelines/github/ros-planning/navigation2/10176/workflows/cbd18739-840b-42e8-bd73-899603ec4e9d/jobs/32314/tests Also, this will need documentation updates in the migration guide that we're changing the type of an input. Please open a Migration Guide PR as well |
@maksymdidukh, your PR has failed to build. Please check CI outputs and resolve issues. |
here is a link for Migration PR ros-navigation/docs.nav2.org#476 |
failing test is unrelated to my PR |
@SteveMacenski, could u please backport it to iron? |
Unfortunately no, this breaks ABI using different data types. I’d be OK fudging it for something this minor if you can show that current behavior trees with int’s set in the BT XML still work and are cast correctly. If not, we can’t break everyone’s existing BTs mid-distro |
…gation#3871) * change duration tyype from int to double * change "1" to "1.0" as default wait_duration value * modify wait_action tests * fix * change int values to double in trees * add usage of Duration::from_seconds() * fix build failing issue * delete whitespace
…gation#3871) * change duration tyype from int to double * change "1" to "1.0" as default wait_duration value * modify wait_action tests * fix * change int values to double in trees * add usage of Duration::from_seconds() * fix build failing issue * delete whitespace Signed-off-by: enricosutera <enricosutera@outlook.com>
…gation#3871) * change duration tyype from int to double * change "1" to "1.0" as default wait_duration value * modify wait_action tests * fix * change int values to double in trees * add usage of Duration::from_seconds() * fix build failing issue * delete whitespace
…gation#3871) * change duration tyype from int to double * change "1" to "1.0" as default wait_duration value * modify wait_action tests * fix * change int values to double in trees * add usage of Duration::from_seconds() * fix build failing issue * delete whitespace
…gation#3871) (#30) * change duration tyype from int to double * change "1" to "1.0" as default wait_duration value * modify wait_action tests * fix * change int values to double in trees * add usage of Duration::from_seconds() * fix build failing issue * delete whitespace Co-authored-by: maksymdidukh <142302397+maksymdidukh@users.noreply.github.com>
Basic Info
Description of contribution in a few bullet points
wait_duration port for Wait node is an integer, so if we pass something like 1.3 or 2.42 than it will automatically cast to nearest integer value, so i changed type of this port from int to double.
Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: