-
Notifications
You must be signed in to change notification settings - Fork 566
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
Planning Scene Monitor should use relaible QoS with >1 history #3257
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3257 +/- ##
==========================================
- Coverage 46.00% 45.64% -0.36%
==========================================
Files 483 714 +231
Lines 40632 62300 +21668
Branches 0 7530 +7530
==========================================
+ Hits 18689 28430 +9741
- Misses 21943 33703 +11760
- Partials 0 167 +167 ☔ View full report in Codecov by Sentry. |
This might explain (and fix) a number of problems we've been seeing on our ros2 build. I'll test this later. |
planning_scene_subscriber_ = pnode_->create_subscription<moveit_msgs::msg::PlanningScene>( | ||
scene_topic, rclcpp::SystemDefaultsQoS(), [this](const moveit_msgs::msg::PlanningScene::ConstSharedPtr& scene) { | ||
scene_topic, qos, [this](const moveit_msgs::msg::PlanningScene::ConstSharedPtr& scene) { |
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.
According to the docs, the default profile for publishers/subscribers already matches the desired settings.
Hence, it should be sufficient to use that profile instead of rclcpp::SystemDefaultsQoS()
:
- scene_topic, rclcpp::SystemDefaultsQoS(), [this](const moveit_msgs::msg::PlanningScene::ConstSharedPtr& scene) {
+ scene_topic, rmw_qos_profile_default, [this](const moveit_msgs::msg::PlanningScene::ConstSharedPtr& scene) {
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.
Actually, rclcpp::SystemDefaultsQoS()
should not be used anywhere in the code. Instead, the profiles predefined for specific use cases should be used.
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.
No clue how things are supposed to work, but what I saw reported by ros2 topic info
was that the subscription was "Reliability: BEST_EFFORT" with queue size of 1. That said, I am a novice in ROS2, so if there is an easier way to specify the desired QoS, I do not know.
Description
As discussed in #3174 (comment), updated the
PlanningSceneMonitor::startSceneMonitor
to use reliable QoS with history depth=10. This is necessary e.g. when used in Rviz plugin and updating the state of attached objects - those kinds of messages are only sent once and missing it results in things being badly out of sync. After implementing it , it looks like another issue I was having where/apply_planning_scene
requests were not always reliably taking effect might have been also fixed by this.Checklist