Skip to content

Ros2 rebased#3

Closed
kineticsystem wants to merge 42 commits into
ros2from
ros2-rebased
Closed

Ros2 rebased#3
kineticsystem wants to merge 42 commits into
ros2from
ros2-rebased

Conversation

@kineticsystem
Copy link
Copy Markdown

Sync with mainstream and applied the only change that was not on mainstream.

sea-bass and others added 30 commits June 28, 2024 10:44
* Add CI workflow

* Add ament_lint tests

* Disable uncrustify for now

* Use package format 3 and add xml schema

* Fix cmake lint error
The package does not export any libraries so there's no reason to
install header files
…applicable

This is a more modern way to link ROS libraries in CMake
* Fix usage of deprecated libavcodec functions

* Drop compatibility with old ffmpeg libraries

* backport RobotWebTools#103

* Remove remaining avcodec version check

* Use rclcpp debug logs instead of cerr

* Remove redundant vector

* Fix segfault on write_header

* Allow overriding width and height

* Fix warning about missing timestamps
* Reformat using ament_uncrustify

* Add ament_cmake_uncrustify test

* Fix ament_uncrustify errors on humble
…obotWebTools#159)

* Add support for jpg compression format (backport RobotWebTools#142)

* Fix formatting

---------

Co-authored-by: Tina Tian <31605482+Te12944265-AMAHA@users.noreply.github.com>
…tWebTools#160)

Co-authored-by: TobinHall <45376386+TobinHall@users.noreply.github.com>
… (backport RobotWebTools#106) (RobotWebTools#163)

* Add support for alpha pngs by adding per stream type decode functions (backport RobotWebTools#106)

Co-authored-by: Matthew Bries <matthew.bries@swri.org>

* Fix cv_bridge headers

---------

Co-authored-by: Matthew Bries <matthew.bries@swri.org>
…WebTools#161)

* Add ament_cmake_copyright test

* Add license headers to all C++ source files

* Fix main license file

* Add CONTRIBUTING.md

* Skip ament_copyright check in Humble distribution

* Use AMENT_LINT_AUTO_EXCLUDE variable
* Add ament_cpplint test

# Conflicts:
#	package.xml

* Fix most of cpplint errors

# Conflicts:
#	include/web_video_server/h264_streamer.hpp
#	include/web_video_server/image_streamer.hpp
#	include/web_video_server/jpeg_streamers.hpp
#	include/web_video_server/libav_streamer.hpp
#	include/web_video_server/multipart_stream.hpp
#	include/web_video_server/png_streamers.hpp
#	include/web_video_server/ros_compressed_streamer.hpp
#	include/web_video_server/vp9_streamer.hpp
#	include/web_video_server/web_video_server.hpp
#	src/web_video_server.cpp

* Add throttled logs

* Remove redundant TODOs

* Replace header guards with pragma once
* Use std::shared_ptr instead of boost::shared_ptr

* Use std::mutex instead of boost::mutex

* Replace boost::lexical_cast with std::to_string

* Use C++11 foreach loop and auto

* Update boost linking

* Reformat

* Fix cpplint errors

* Replace boost::bind with lambda in std::partition

* Reformat
* Update changelog

* 2.0.0
* Update changelog

* 2.0.1
…bTools#168)

* Separate web_video_server into a component and an executable

The [ROS 2 (Humble)
docs](https://docs.ros.org/en/humble/Concepts/Intermediate/About-Composition.html#writing-a-component)
recommend writing applications as components:

> By making the process layout a deploy-time decision the user can
> choose between:
>
> * running multiple nodes in separate processes with the benefits
> of process/fault isolation as well as easier debugging of individual
> nodes and
>
> * running multiple nodes in a single process with the lower overhead
> and optionally more efficient communication.

The default deployment scheme for the `web_video_server` node remains
the same: i.e., using
`ros2 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.
* Use chrono steady_clock for frame timing

* Fix formatting for humble

* Use chrono in png snapshot streamer

* Don't use std::optional
* [CHG] Enabling compile warnings

Warnings enabled as errors

* [CHG] Removing unused variables in functions

* [CHG] Correcting initialization order

* [CHG] Removing unused variables

* [CHG] Removing -Werror flag

* Update src/libav_streamer.cpp

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>

---------

Co-authored-by: mth_sousa <matheus.soares@jacto.com.br>
Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
* Updated README

* Fix typo

* Add correct branch for ROS1

* Add bash-syntax to installation command

* Updated build instruction

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
bjsowa and others added 12 commits May 21, 2025 14:23
Co-authored-by: Alexis Tsogias <a.tsogias@cellumation.com>
* signature for function libavformat/avio.h avio_alloc_context, parameter write_packet has changed from
(void *opaque, uint8_t *buf, int buf_size) to (void *opaque, const uint8_t *buf, int buf_size)
This was previously deprecated, but removed on March 07, 2024.
Please see FFmpeg/FFmpeg@02aea61
for details.
This commit reflects that change.

* Update src/libav_streamer.cpp

---------

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
* Update changelog

* 2.1.1
…ctor (RobotWebTools#192)

* Reorganize files

* Clean up include directives by including only what's used

* Clean up package.xml depend tags

* Load streamer plugins using pluginlib

* Move checking for compressed topics to the plugin itself

* Add snapshot streamer plugins

* Add ros_compressed snapshot streamer plugin

* Detect content type in ros_compressed snapshot streamer

* Fix libav streamer factory

* Update listing available topics

* List snapshot streamers

* Add missing includes

* Revise class naming conventions

* Move base classes to web_video_server_streamers library

* Reformat for humble

* Add some docstrings

* Use snake_case for method names

* boundry -> boundary

* decodeImage -> decode_image

* Move base streamer classes to streamers namespace

* Reduce duplicated code

* Add virtual destructor

* Include what you use

* Update copyright headers

* Export project dependencies

* Add missing copyright header

* Pass reference to get_available_topics

* Remove redundant ImageTransport object

* Fix restream frames feature

* Pass weak node pointer to streamers to avoid cyclic dependency

* Fix formatting for humble

* Add myself to authors

* Update README, add custom streamer plugin tutorial

* Fix compressed topic filtering

* Add StreamerBase class
* chore: Add ament_clang_tidy check for rolling

* chore: Add CMAKE_ARGS to enable compile commands in CI workflow

* Configure clang-tidy to check naming conventions

* Fix naming convention errors

* Add misc-include-cleaner check

* Enable google checks

* Enable other readability checks

* Remove cpplint

* Enable other misc checks

* Reformat

* Set clang-tidy jobs to processor count

* Fix formatting

* Suppress clang-analyzer warning caused by pluginlib

* Fix uncrustify for humble

* Add ENABLE_CLANG_TIDY option to CMake and update CI

* Update CI workflow

* Try to use single step for industrial ci
* Update Changelog

* 3.0.0
…RobotWebTools#194)

* feat: add /shutdown endpoint to stop active streams (resolves RobotWebTools#193)

Implements the feature requested in issue RobotWebTools#193: a client-callable HTTP
endpoint that gracefully closes alive MJPEG/stream connections server-side,
preventing lingering TCP sockets when UI components unmount.

Changes:
- StreamerInterface: add virtual stop() (no-op default) and get_client_id()
- StreamerBase: implement stop() (marks inactive, releases connection) and
  get_client_id(); populate client_id_ from 'client_id' query param
- WebVideoServer: register /shutdown route and implement handle_shutdown()
  which stops all streams for a topic, or a single named stream if
  client_id is provided; returns plain-text 'stopped=<count>'
- README: document /shutdown endpoint, parameters, and client_id usage

Rewrite of PR RobotWebTools#194 adapted to the pluginlib-based architecture introduced
in RobotWebTools#192 and the naming/style conventions enforced by RobotWebTools#195.

* Update include/web_video_server/streamer.hpp

make pure virtual

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>

* Update include/web_video_server/streamer.hpp

make pure virtual

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>

* feat-193: fixed client_id empty logging

---------

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
Web Video Server subscriber now automatically detects publisher QoS when
no qos_profile query parameter is specified (defaults to "auto").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.