Skip to content
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

Latched Strings for URDF and SRDF #765

Merged
merged 10 commits into from
Dec 7, 2021
Merged

Latched Strings for URDF and SRDF #765

merged 10 commits into from
Dec 7, 2021

Conversation

DLu
Copy link
Contributor

@DLu DLu commented Oct 29, 2021

Description

Initial solution for #755 / #169

  • Adds the rdf_loader::StringLoader class which loads a string from the ROS environment, either via parameter or topic (could theoretically be extended for dynamic parameter later)
  • Uses the above functionality to load robot_description and robot_description_semantic
  • Adds a parameter to optionally publish a std_msgs::msg::String if read in from a parameter.
  • You can also add callback hooks so that the class that uses RDFLoader can take appropriate actions when the description is updated.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference

@DLu
Copy link
Contributor Author

DLu commented Oct 29, 2021

I tested with this branch of moveit_resources and the command ros2 launch moveit_resources_panda_moveit_config demo.launch.py

@codecov
Copy link

codecov bot commented Oct 29, 2021

Codecov Report

Merging #765 (c7c2cd5) into main (a4066b0) will increase coverage by 0.06%.
The diff coverage is 74.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #765      +/-   ##
==========================================
+ Coverage   60.79%   60.85%   +0.06%     
==========================================
  Files         271      273       +2     
  Lines       23823    23880      +57     
==========================================
+ Hits        14482    14529      +47     
- Misses       9341     9351      +10     
Impacted Files Coverage Δ
moveit_ros/planning/rdf_loader/src/rdf_loader.cpp 25.78% <57.15%> (+2.31%) ⬆️
...g/rdf_loader/src/synchronized_string_parameter.cpp 84.22% <84.22%> (ø)
.../rdf_loader/include/moveit/rdf_loader/rdf_loader.h 100.00% <100.00%> (ø)
.../moveit/rdf_loader/synchronized_string_parameter.h 100.00% <100.00%> (ø)
...nning_scene_monitor/src/planning_scene_monitor.cpp 46.11% <0.00%> (-0.47%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4066b0...c7c2cd5. Read the comment docs.

Copy link
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good to me so far. We should get a version of this feature merged to unblock MSA work, I would only like to at least make sure the API is compatible with switching to using synced parameters in the future. With this implementation, I don't see too many issues with this, though.

SRDF and URDF need to be checked for compatibility, otherwise the callbacks are risky to use. Possibly switch to using a single callback that triggers when both values are present.

Do the topics use a global namespace?

@DLu DLu marked this pull request as ready for review November 8, 2021 17:09
@DLu
Copy link
Contributor Author

DLu commented Nov 8, 2021

One thing I'm pondering is how to specify parameters while maintaining maximum compatibility. The goal was to keep the Node based constructor the same, so lines like this didn't have to change:

rdf_loader_.reset(new rdf_loader::RDFLoader(node_, robot_description_property_->getStdString()));

But if we want to have robot_state_display update when a new robot description is published, we need to set the _continuous parameter.... or add something to the constructor to allow bypassing/overriding the parameter check.

@DLu DLu requested a review from tylerjw November 16, 2021 15:25
@mergify
Copy link

mergify bot commented Nov 23, 2021

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

Copy link
Member

@tylerjw tylerjw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally really like this. I just have a small question about the base QoS you are using.

@DLu
Copy link
Contributor Author

DLu commented Dec 7, 2021

Added documentation in moveit/moveit2_tutorials#234

@tylerjw tylerjw merged commit 482950a into moveit:main Dec 7, 2021
@DLu DLu deleted the magical_strings branch May 12, 2022 16:32
@DLu DLu mentioned this pull request Jul 1, 2022
6 tasks
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.

3 participants