RobotWebTools / web_video_server

HTTP Streaming of ROS Image Topics in Multiple Formats
http://ros.org/wiki/web_video_server
Other
269 stars 187 forks source link

Fix passing parameters from the command line #120

Open lFatality opened 2 years ago

lFatality commented 2 years ago

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