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

srdf publisher node #2682

Merged
merged 3 commits into from
Feb 13, 2024
Merged

srdf publisher node #2682

merged 3 commits into from
Feb 13, 2024

Conversation

tylerjw
Copy link
Member

@tylerjw tylerjw commented Feb 13, 2024

  • Sort lists in moveit_ros/planning CMake and package.xml
  • srdf_publisher_node

Description

Similar to how robot_state_publisher publishes a string to /robot_description for the URDF this publishes to /robot_description_semantic controlled by a parameter of the same name.

MoveIt already subscribes to the topic /robot_description_semantic, so this node could be useful in a system using MoveIt.

@tylerjw tylerjw requested a review from Abishalini February 13, 2024 00:41
@tylerjw tylerjw requested a review from sea-bass February 13, 2024 00:44
@tylerjw tylerjw force-pushed the srdf_publisher branch 4 times, most recently from dc86a47 to 7a5d0ad Compare February 13, 2024 00:53
@tylerjw tylerjw requested a review from moriarty February 13, 2024 00:59
@tylerjw tylerjw force-pushed the srdf_publisher branch 2 times, most recently from 5f6d030 to 58fd791 Compare February 13, 2024 01:11
Comment on lines +70 to +77
for (auto const& parameter : parameters)
{
if (parameter.get_name() == "robot_description_semantic")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can there be multiple robot_description_semantic parameter? or should if the get_name( ) == then should this function return?

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding a break here instead of a return because we need to return success through the result for now.

Comment on lines +80 to +88
rcl_interfaces::msg::SetParametersResult result;
result.successful = true;
return result;
Copy link
Contributor

Choose a reason for hiding this comment

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

is this callback always suppose to return success or should it return success in the if, and false otherwise?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm adding a comment about this. In humble the only callback we have for parameters is the validation one. You may ask, why don't I validate this is a valid srdf? I considered that until I realized the srdf parser requires a urdf as a parameter which I don't want to make this node get the urdf just to validate the srdf. This node is just a relay anyway and if you use it to set an invalid srdf the nodes that depend on it will blow up.

After humble is eol we can use add_post_set_parameters_callback which is only in rolling now. I'm adding a comment explaining this.

Copy link

codecov bot commented Feb 13, 2024

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (d962501) 50.74% compared to head (ae124e0) 41.50%.
Report is 7 commits behind head on main.

❗ Current head ae124e0 differs from pull request most recent head 1662647. Consider uploading reports for the commit 1662647 to get more accurate results

Files Patch % Lines
...default_capabilities/get_group_urdf_capability.cpp 0.00% 20 Missing ⚠️
...nning_scene_monitor/src/planning_scene_monitor.cpp 40.00% 3 Missing ⚠️
...py/src/moveit/moveit_ros/moveit_cpp/moveit_cpp.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2682      +/-   ##
==========================================
- Coverage   50.74%   41.50%   -9.24%     
==========================================
  Files         392      691     +299     
  Lines       32553    56255   +23702     
  Branches        0     7288    +7288     
==========================================
+ Hits        16517    23341    +6824     
- Misses      16036    32752   +16716     
- Partials        0      162     +162     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@moriarty moriarty left a comment

Choose a reason for hiding this comment

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

thanks for the clarification comment

Copy link
Contributor

@sjahr sjahr left a comment

Choose a reason for hiding this comment

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

Nice work! Should we add that node to the move_group launch files?

Copy link

mergify bot commented Feb 13, 2024

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

@tylerjw tylerjw merged commit 74feda2 into moveit:main Feb 13, 2024
9 of 11 checks passed
@tylerjw tylerjw deleted the srdf_publisher branch February 13, 2024 16:22
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