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

Removing topic name parameter configuration and replacing with const strings #2777

Closed
wants to merge 5 commits into from

Conversation

Gaurang-1402
Copy link

Description

This PR introduces changes to streamline the setup process for the moveit_cpp::PlanningSceneMonitorOptions and moveit_servo::ServoParameters by utilizing constant strings for topic names instead of parameter-based configurations. The changes ensure that topic names are now consistent and predefined. This modification also implies that users who need customized topic names will now have to use topic remapping in their launch files or at the ROS node level.

These updates are in direct response to the issue discussed in #2714

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
    In the tutorials, I see some files where changes need to be made to remove topic names from parameters, for example here: 
    https://github.com/ros-planning/moveit2_tutorials/blob/main/doc/examples/moveit_cpp/config/moveit_cpp.yaml
    I'm confused about the sequence of changes though since these are 2 separate repos. Do I make these changes before this PR is merged, do I make 2 simultaneous PR or do I raise an issue on that repo? Some guidance would be helpful to proceed on this point.
  • Document API changes relevant to the user in the MIGRATION.md notes
    Done included in the commit
  • Create tests, which fail without this PR reference
    As this PR stands, there are no scenarios where the code fails without this PR because it is an API enhancement. Yet, if needed, I can create tests- please let me know.
  • Include a screenshot if changing a GUI
    Not Applicable
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

Copy link

mergify bot commented Mar 31, 2024

Please target the main branch for development, we will backport the changes to humble for you if approved and if they don't break API.

@Gaurang-1402 Gaurang-1402 changed the title Humble Removing topic name parameter configuration and replacing with const strings Mar 31, 2024
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 @Gaurang-1402! Just small comments and then this is good to go

@@ -271,12 +264,11 @@ ServoParameters ServoParameters::get(const std::string& ns,

// ROS Parameters
parameters.use_gazebo = node_parameters->get_parameter(ns + ".use_gazebo").as_bool();
parameters.status_topic = node_parameters->get_parameter(ns + ".status_topic").as_string();
parameters.status_topic = "/servo_server/status";
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make these constants in the anonymous namespace above like Logger and then assign the constant to the parameters member? Something like

namespace {
const std::string SERVO_STATUS_TOPIC = "/servo_server/status";
}
...
parameters.status_topic = SERVO_STATUS_TOPIC;

@@ -44,29 +48,69 @@ API changes in MoveIt releases

## ROS Melodic

- Migration to ``tf2`` API.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these changes necessary?

Copy link

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

@github-actions github-actions bot added the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Jun 10, 2024
@henningkayser
Copy link
Member

@Gaurang-1402 what's the current status of this PR? It would also be great if you could target the 'main' branch. We can backport fixes and non-breaking changes to 'humble'

@github-actions github-actions bot removed the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Jun 17, 2024
Copy link

github-actions bot commented Oct 9, 2024

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

@github-actions github-actions bot added the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Oct 9, 2024
@sjahr
Copy link
Contributor

sjahr commented Oct 14, 2024

Closing this due to inactivity. Feel free to re-open if you want to continue working on it again

@sjahr sjahr closed this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Inactive issues and PRs are marked as stale and may be closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants