Separate web_video_server into a component and an executable #168
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.
Public API Changes
web_video_server::WebVideoServer
now inherits fromrclcpp::Node
. Previously, theWebVideoServer
class had a private member variablenode_
for interacting with the ROS 2 runtime.WebVideoServer
was changed to accept a single input argument of typerclcpp::NodeOptions
. This is required for components.spin
method was removed. This separates the definition of work from the means of executing it. Instead of theWebVideoServer
needing to have a public method for spinning the privatenode_
member, the executor that does the work is now created outside of the class.Description
The ROS 2 (Humble) docs recommend writing applications as components:
The default deployment scheme for the
web_video_server
node remains the same: i.e., usingros2 run web_video_server web_video_server {parameter-args-here}
.Having a component library available adds flexibility for users, particularly for those users looking to use intra-process memory for published camera topics and the web video server.