web_video_server icon indicating copy to clipboard operation
web_video_server copied to clipboard

Fix passing parameters from the command line

Open lFatality opened this issue 4 years ago • 0 comments

Public API Changes

None

Description

This fix enables passing parameters to the web_video_server node via the command line or a yaml file, e.g. to change the port or address.
Currently this does not work since the parameters are not declared in the node.
To fix the issue the node option automatically_declare_parameters_from_overrides was set to true.

This then enables passing parameters to the node in ROS 2 (Foxy) like so:

ros2 run web_video_server web_video_server --ros-args -p port:=8181

or like this:

ros2 run web_video_server web_video_server --ros-args --params-file /path/to/your/params.yaml

where params.yaml:

_web_video_server:
  ros__parameters:
    port: 8181

lFatality avatar Feb 13 '22 17:02 lFatality