Closed Vicidel closed 2 years ago
You should use standard parameter interface. ~/set
have quite specific use cases: to bypass parameter exclude check (bu name) or to send unknown (yet) parameter.
Okay that makes sense, thanks for the quick answer!
You should use standard parameter interface.
~/set
have quite specific use cases: to bypass parameter exclude check (bu name) or to send unknown (yet) parameter.
Can you please explain? I'm interested in setting and getting parameters from pixhawk. The service /mavros/param/set work fine for setting, is it the right way? and how can I get a specific parameter? Thanks
ROS2 has standard interface to parameters. Use them. https://github.com/mavlink/mavros/blob/686bd833e7d6ea5542977178872762dfbec5ed89/mavros/src/plugins/param.cpp#L43-L55
Issue details
Hello all
I need to set parameters using MAVROS2. I see that there are two services:
/mavros/param/set
of typemavros_msgs::srv::ParamSetV2
/mavros/param/set_parameters
of typercl_interfaces::srv::SetParameters
In the param plugin there is a line here saying that the service
set_parameters
is not exposed to user code. And in themavros_msgs
definition ofParamSetV2
there is a note that it's only if the ROS2 param API is not sufficient here.From my interpretation I should not use any of those two. Which of these two should I believe?
MAVROS version and platform
Mavros: 2.1.1 ROS: ROS2 Galactic Ubuntu: 20.04
Autopilot type and version
[ ] ArduPilot [x] PX4