Skip to content

Use ros2 interfaces for parameters in moveit_servo #790

@tylerjw

Description

@tylerjw

Currently, moveit_servo uses a template function declareOrGetParam for specifying and getting parameters. Here is the file where that is done: https://github.com/ros-planning/moveit2/blob/main/moveit_ros/moveit_servo/src/servo_parameters.cpp

I would like to use the ros2 parameter interfaces directly in order to specify descriptions and types of each parameter using the ParameterDescription. An example of that is here: https://github.com/tylerjw/parameter_tools/blob/parameter_set/parameter_set/src/example_node/robot_parameters.cpp

Note that I created a ParaeterDescriptionBuilder. Copy that into servo for now and eventually, we'll find a home for it.

Steps

  • Define defaults for all parameters in servo_paramets.h in the struct
  • Copy ParaeterDescriptionBuilder into servo
  • Create a static declare servo_pareters.cpp that uses the built in ros2 interfaces for parameters
  • Use NodeParametersInterface::SharedPtr in the builder function for ServoParameters instead of the Node directly
  • Create a get function that reads the parameters into the struct fields
  • Modify the builder function for ServoParameters to use the get and declare functions you created

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions