Skip to content

Conversation

@tonynajjar
Copy link
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses #3119)
Primary OS tested on Ubuntu
Robotic platform tested on Gazebo

Description of contribution in a few bullet points

  • I used SetParameter to set the use_sim_time parameter and removed the parameter from launch files

Description of documentation updates required from your changes


Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in navigation.ros.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists

@mergify
Copy link
Contributor

mergify bot commented Aug 21, 2022

@tonynajjar, please properly fill in PR template in the future. @SteveMacenski, use this instead.

  • Check that any new parameters added are updated in navigation.ros.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists

@tonynajjar tonynajjar marked this pull request as ready for review August 21, 2022 15:45
@codecov
Copy link

codecov bot commented Aug 21, 2022

Codecov Report

Merging #3131 (868a03e) into main (1c74368) will increase coverage by 0.27%.
The diff coverage is 100.00%.

@@            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     
Impacted Files Coverage Δ
...tmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp 85.71% <ø> (ø)
...clude/nav2_behavior_tree/bt_action_server_impl.hpp 75.55% <100.00%> (+0.27%) ⬆️
nav2_controller/src/controller_server.cpp 52.09% <100.00%> (+0.16%) ⬆️
nav2_costmap_2d/src/costmap_2d_ros.cpp 88.00% <100.00%> (+0.04%) ⬆️
nav2_planner/src/planner_server.cpp 72.47% <100.00%> (+0.12%) ⬆️
...v2_util/include/nav2_util/simple_action_server.hpp 83.97% <0.00%> (+26.28%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@SteveMacenski SteveMacenski left a 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),
Copy link
Member

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.

Copy link
Member

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

Copy link
Contributor Author

@tonynajjar tonynajjar Aug 22, 2022

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

Copy link
Member

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.

Copy link
Member

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

@SteveMacenski SteveMacenski linked an issue Aug 22, 2022 that may be closed by this pull request
Copy link
Contributor Author

@tonynajjar tonynajjar left a 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.

@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2022

This pull request is in conflict. Could you fix it @tonynajjar?

@SteveMacenski
Copy link
Member

SteveMacenski commented Aug 23, 2022

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.

Once this is merged, you should post about it with a link! Awareness is 25% of the battle.

@SteveMacenski
Copy link
Member

Other commits are showing up in this PR now - please rebase on main with only these comments / conflict resolutions

@tonynajjar
Copy link
Contributor Author

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.
Should I have rebased instead and why?

@SteveMacenski
Copy link
Member

Oh sorry, I was a little quick on the draw there, this is fine

@mergify
Copy link
Contributor

mergify bot commented Aug 24, 2022

This pull request is in conflict. Could you fix it @tonynajjar?

@tonynajjar
Copy link
Contributor Author

tonynajjar commented Aug 24, 2022

This is worth an update to the migration guide

ros-navigation/docs.nav2.org#339

@SteveMacenski SteveMacenski merged commit 7703c81 into ros-navigation:main Aug 25, 2022
jwallace42 pushed a commit to jwallace42/navigation2 that referenced this pull request Dec 14, 2022
* 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
doisyg pushed a commit to botsandus/navigation2 that referenced this pull request Jan 6, 2023
* 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
savalena pushed a commit to savalena/navigation2 that referenced this pull request Jul 5, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace config use_sim_time with SetUseSimTime in launch file

2 participants