-
Notifications
You must be signed in to change notification settings - Fork 565
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
Closed
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
72378ac
moveit_servo package- remove topic name configuration with parameters…
Gaurang-1402 1efde1f
moveit_ros package- remove topic name configuration with parameters, …
Gaurang-1402 ef407d0
perform format checks
Gaurang-1402 07d6670
Update MIGRATION.md with information about removing topic name config…
Gaurang-1402 763914d
Merge branch 'humble' into humble
sjahr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,16 +102,9 @@ void ServoParameters::declare(const std::string& ns, | |
ParameterDescriptorBuilder{} | ||
.type(PARAMETER_BOOL) | ||
.description("Whether the robot is started in a Gazebo simulation environment")); | ||
node_parameters->declare_parameter( | ||
ns + ".status_topic", ParameterValue{ parameters.status_topic }, | ||
ParameterDescriptorBuilder{}.type(PARAMETER_STRING).description("Publish status to this topic")); | ||
|
||
// Properties of incoming commands | ||
node_parameters->declare_parameter( | ||
ns + ".cartesian_command_in_topic", ParameterValue{ parameters.cartesian_command_in_topic }, | ||
ParameterDescriptorBuilder{}.type(PARAMETER_STRING).description("Topic for incoming Cartesian twist commands")); | ||
node_parameters->declare_parameter( | ||
ns + ".joint_command_in_topic", ParameterValue{ parameters.joint_command_in_topic }, | ||
ParameterDescriptorBuilder{}.type(PARAMETER_STRING).description("Topic for incoming joint angle commands")); | ||
|
||
node_parameters->declare_parameter( | ||
ns + ".robot_link_command_frame", ParameterValue{ parameters.robot_link_command_frame }, | ||
ParameterDescriptorBuilder{} | ||
|
@@ -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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
|
||
|
||
// Properties of incoming commands | ||
parameters.cartesian_command_in_topic = | ||
node_parameters->get_parameter(ns + ".cartesian_command_in_topic").as_string(); | ||
parameters.joint_command_in_topic = node_parameters->get_parameter(ns + ".joint_command_in_topic").as_string(); | ||
parameters.cartesian_command_in_topic = "/servo_server/cartesian_commands"; | ||
parameters.joint_command_in_topic = "/servo_server/joint_commands"; | ||
parameters.robot_link_command_frame = node_parameters->get_parameter(ns + ".robot_link_command_frame").as_string(); | ||
parameters.command_in_type = node_parameters->get_parameter(ns + ".command_in_type").as_string(); | ||
parameters.linear_scale = node_parameters->get_parameter(ns + ".scale.linear").as_double(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why are these changes necessary?