-
Notifications
You must be signed in to change notification settings - Fork 1.6k
use_sim_time refactoring #3131
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_sim_time refactoring #3131
Conversation
|
@tonynajjar, please properly fill in PR template in the future. @SteveMacenski, use this instead.
|
Codecov Report
@@ Coverage Diff @@
## main #3131 +/- ##
==========================================
+ Coverage 82.78% 83.05% +0.27%
==========================================
Files 333 333
Lines 15078 15082 +4
==========================================
+ Hits 12482 12527 +45
+ Misses 2596 2555 -41
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Generally LGTM! This is worth an update to the migration guide for - mentioning you can remove the use_sim_time from your param files.
| load_nodes = GroupAction( | ||
| condition=IfCondition(PythonExpression(['not ', use_composition])), | ||
| actions=[ | ||
| SetParameter("use_sim_time", use_sim_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.
does SetParameter work globally or can it be used for a single node? Also, does that work if the parameter in question is inside of the yaml file also (clearly it works if its not inside the yaml file)? I ask because this could be a really nice solution for the yaml_filename thing too if we can set it for only the map server if there is a non-trivial value set in the launch configuration.
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.
It would be great not to require users to set yaml_filename in the yaml if we're going to override it always in launch using the CLI or the launch configuration defaults. This could be that solution, as long as it works if the parameter is in the yaml file too.
In general though, that's a problem with this PR if it doesn't work with the param in the yaml too, since users' yaml files right now will have it from previous clones they're working under
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.
does SetParameter work globally or can it be used for a single node?
It applies the parameter for all nodes within the GroupAction. See here
Also, does that work if the parameter in question is inside of the yaml file also
yes, the parameter in the yaml would override
For the refactoring of yaml_filename, I'd prefer if we can open a separate issue. I might take it but can't commit to it right now
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.
Totally understood, just asking the question, it sounds like this would be a solution for it too. Duly noted.
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.
Leaving this un-resolved as a reminder to myself
tonynajjar
left a comment
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.
In general I think this approach to using sim time should be made more public/popular in the ROS2 community. I can't find the discussions anymore but I remember many complaints from people switching from ROS1 on having to set this parameter manually for every node.
|
This pull request is in conflict. Could you fix it @tonynajjar? |
Once this is merged, you should post about it with a link! Awareness is 25% of the battle. |
|
Other commits are showing up in this PR now - please rebase on main with only these comments / conflict resolutions |
|
Not sure I see what you mean, I merged master into my branch to fix the conflicts. The changes in "Files changed" are only my changes. |
|
Oh sorry, I was a little quick on the draw there, this is fine |
|
This pull request is in conflict. Could you fix it @tonynajjar? |
|
* initial commit * fix * fixes * revert * fix * linting * fixes * fix format * fixing pycodestyle * revert typo * add use_sim_time to costmap * add parameter description * fix defaults * fix formatting
* initial commit * fix * fixes * revert * fix * linting * fixes * fix format * fixing pycodestyle * revert typo * add use_sim_time to costmap * add parameter description * fix defaults * fix formatting
* initial commit * fix * fixes * revert * fix * linting * fixes * fix format * fixing pycodestyle * revert typo * add use_sim_time to costmap * add parameter description * fix defaults * fix formatting
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: