Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
eb9af5f
Add QoS profile query parameters (#133)
sea-bass Jun 28, 2024
ea298d6
allow topic searches to continue past invalid multi-type topics. (#146)
rjb0026 Sep 20, 2024
3a5432b
Update package maintainer
bjsowa Sep 29, 2024
576dd6d
Add CI workflow and ament_lint tests (#148)
bjsowa Sep 30, 2024
e9ec498
Don't install headers
bjsowa Sep 30, 2024
36cf453
Use target_link_libraries instead of ament_target_dependencies where …
bjsowa Sep 30, 2024
07c936c
Use cv_bridge hpp headers when available (#149)
bjsowa Sep 30, 2024
6d76f92
(actions) also run on feature branches (#152)
MatthijsBurgh Oct 2, 2024
1f6a5b7
Fix usage of deprecated libavcodec functions (#150)
bjsowa Oct 2, 2024
da1f1bb
Fix declaring and retrieving node parameters (#154)
bjsowa Oct 2, 2024
9fc0d63
Replace nh with node (#155)
bjsowa Oct 2, 2024
cadc7c2
Fix request logging, remove global parameters (#156)
bjsowa Oct 2, 2024
ff6a8e6
Use hpp extension for headers (#157)
bjsowa Oct 2, 2024
140ff53
Reformat the code with uncrustify (#158)
bjsowa Oct 3, 2024
375fd06
Add support for jpg compression format (backport #142) (#159)
bjsowa Oct 3, 2024
bc92480
Add link to /stream in stream list (backport #118) (#160)
bjsowa Oct 3, 2024
c8bdc7a
Add support for alpha pngs by adding per stream type decode functions…
bjsowa Oct 6, 2024
02743ab
Add license headers to all C++ source files, update copyrights (#161)
bjsowa Oct 8, 2024
59e827e
Add ament_cpplint test, resolve TODOs (#162)
bjsowa Oct 10, 2024
1ba7ce4
Replace boost with std (#164)
bjsowa Oct 10, 2024
f478479
Release 2.0.0 (#165)
bjsowa Oct 11, 2024
48215bb
Add ros_environment to test dependencies (#166)
bjsowa Oct 17, 2024
654fe26
Release 2.0.1 (#167)
bjsowa Oct 26, 2024
f3d5f94
Separate web_video_server into a component and an executable (#168)
jwdinius Nov 2, 2024
27d0d0a
Add pkg-config dependency (#175)
TheDelus Nov 19, 2024
965ed73
Use chrono steady clock for frame timing (#173)
bjsowa Nov 20, 2024
29e684c
Fix compile warnings (#176)
Mat198 Dec 26, 2024
95f9b70
Remove iron distro from Github workflow
bjsowa Feb 12, 2025
c17a9b4
Update README (#180)
larsll Apr 23, 2025
1578b77
Use target_link_libraries instead of ament_target_dependencies (#182)
bjsowa May 8, 2025
f6d856e
Update changelog
bjsowa May 21, 2025
3ecc1fc
2.1.0
bjsowa May 21, 2025
462acec
Fix -Wmaybe-uninitialized warning (#185)
jmachowinski May 23, 2025
ef682a4
Add Kilted workflow (#183)
bjsowa May 28, 2025
8c3e5f4
Update package.xml to include necessary lib boost (#186)
TheDelus Jul 1, 2025
00d7b56
Fix build with the current FFmpeg avformat (#190)
jfrancis71 Sep 2, 2025
9eaa343
Release 2.1.1 (#191)
bjsowa Sep 2, 2025
7deefe4
feat: Use pluginlib to load streamer plugins at runtime, general refa…
bjsowa Dec 12, 2025
eef3dc2
refactor: Add clang-tidy checks (#195)
bjsowa Jan 12, 2026
02a5ffc
Release 3.0.0 (#196)
bjsowa Jan 30, 2026
9cdc6b2
feat: Add shutdown handler for client to call and close alive sockets…
varunverlencar Feb 19, 2026
5e4b1b4
Fixed issue with first visualization mask not being received by the UI
kineticsystem Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
Checks: >
clang-analyzer-*,
-clang-analyzer-optin.cplusplus.VirtualCall,
clang-diagnostic-*,
google-*,
misc-*,
-misc-non-private-member-variables-in-classes,
readability-*,
-readability-identifier-length,
-readability-magic-numbers,

CheckOptions:
misc-include-cleaner.IgnoreHeaders: bits/chrono.h
readability-function-cognitive-complexity.IgnoreMacros: true
readability-identifier-naming.ClassCase: CamelCase
readability-identifier-naming.ClassMemberCase: lower_case
readability-identifier-naming.ConstexprVariableCase: CamelCase
readability-identifier-naming.EnumCase: CamelCase
readability-identifier-naming.EnumConstantCase: CamelCase
readability-identifier-naming.FunctionCase: lower_case
readability-identifier-naming.GlobalConstantCase: CamelCase
readability-identifier-naming.StaticConstantCase: lower_case
readability-identifier-naming.StaticVariableCase: lower_case
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
readability-identifier-naming.MacroDefinitionIgnoredRegexp: '^[A-Z]+(_[A-Z]+)*_$'
readability-identifier-naming.PrivateMemberCase: lower_case
readability-identifier-naming.ProtectedMemberCase: lower_case
readability-identifier-naming.PublicMemberCase: lower_case
readability-identifier-naming.PrivateMemberSuffix: _
readability-identifier-naming.ProtectedMemberSuffix: _
readability-identifier-naming.PublicMemberSuffix: ''
readability-identifier-naming.NamespaceCase: lower_case
readability-identifier-naming.ParameterCase: lower_case
readability-identifier-naming.TypeAliasCase: CamelCase
readability-identifier-naming.TypedefCase: CamelCase
readability-identifier-naming.VariableCase: lower_case
readability-identifier-naming.IgnoreMainLikeFunctions: true
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
workflow_dispatch:
push:
branches-ignore:
- ros1*
pull_request:
branches-ignore:
- ros1*

jobs:
industrial_ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble, jazzy, kilted, rolling]
ROS_REPO: [testing, main]
env:
ROS_DISTRO: ${{ matrix.ROS_DISTRO }}
ROS_REPO: ${{ matrix.ROS_REPO }}
CMAKE_ARGS: ${{ matrix.ROS_DISTRO == 'rolling' && '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_CLANG_TIDY=ON' || '' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Source tests
uses: "ros-industrial/industrial_ci@master"
11 changes: 5 additions & 6 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Original Authors
----------------
# Original Authors

* Mitchell Wills (mwills@wpi.edu)
* Mitchell Wills <mwills@wpi.edu>

Contributors
------------
# Contributors

* [Russell Toris](http://users.wpi.edu/~rctoris/) (rctoris@wpi.edu)
* Russell Toris <rctoris@wpi.edu>
* Błażej Sowa <blazej@fictionlab.pl>
53 changes: 53 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,59 @@
Changelog for package web_video_server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.0.0 (2026-01-30)
------------------
* refactor: Add clang-tidy checks (#195)
* feat: Use pluginlib to load streamer plugins at runtime, general refactor (#192)
* Contributors: Błażej Sowa

2.1.1 (2025-09-02)
------------------
* Fix build with the current FFmpeg avformat (#190)
* Update package.xml to include necessary lib boost (#186)
* Add Kilted workflow (#183)
* Fix -Wmaybe-uninitialized warning (#185)
* Contributors: Błażej Sowa, Fabian Freihube, Janosch Machowinski, Alexis Tsogias, Julian Francis

2.1.0 (2025-05-21)
------------------
* Use target_link_libraries instead of ament_target_dependencies (#182)
* Fix compile warnings (#176)
* Use chrono steady clock for frame timing (#173)
* Add pkg-config dependency (#175)
* Separate web_video_server into a component and an executable (#168)
* Contributors: Błażej Sowa, Fabian Freihube, Joe Dinius, Ph.D., Lars Lorentz Ludvigsen, Mat198

2.0.1 (2024-10-26)
------------------
* Add ros_environment to test dependencies (#166)
* Contributors: Błażej Sowa

2.0.0 (2024-10-11)
------------------
* Replace boost with std (#164)
* Add ament_cpplint test, resolve TODOs (#162)
* Add license headers to all C++ source files, update copyrights (#161)
* Add support for alpha pngs by adding per stream type decode functions (backport #106) (#163)
* Add link to /stream in stream list (backport #118) (#160)
* Add support for jpg compression format (backport #142) (#159)
* Reformat the code with uncrustify (#158)
* Use hpp extension for headers (#157)
* Fix request logging, remove global parameters (#156)
* Replace nh with node (#155)
* Fix declaring and retrieving node parameters (#154)
* Fix usage of deprecated libavcodec functions (#150)
* Use cv_bridge hpp headers when available (#149)
* Use target_link_libraries instead of ament_target_dependencies where applicable
* Don't install headers
* Add CI workflow and ament_lint tests (#148)
* Update package maintainer
* allow topic searches to continue past invalid multi-type topics. (#146)
* Add QoS profile query parameters (#133)
* Fix build for ROS2 Humble (#129)
* Fix build for ROS2 Foxy (#111)
* Contributors: Błażej Sowa, Domenic Rodriguez, Robert Brothers, Sebastian Castro, Tina Tian, TobinHall, Matthew Bries

1.0.0 (2019-09-20)
------------------
* Port to ROS 2
Expand Down
159 changes: 130 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
cmake_minimum_required(VERSION 3.5)
project(web_video_server)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake_ros REQUIRED)

find_package(async_web_server_cpp REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(image_transport REQUIRED)
find_package(pluginlib REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_components REQUIRED)
find_package(rmw REQUIRED)
find_package(sensor_msgs REQUIRED)

find_package(OpenCV REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread)
find_package(Boost REQUIRED COMPONENTS system)

find_package(PkgConfig REQUIRED)
pkg_check_modules(avcodec libavcodec REQUIRED)
Expand All @@ -30,54 +37,148 @@ endif()
## Build ##
###########

## Specify additional locations of header files
include_directories(include
${Boost_INCLUDE_DIRS}
${avcodec_INCLUDE_DIRS}
${avformat_INCLUDE_DIRS}
${avutil_INCLUDE_DIRS}
${swscale_INCLUDE_DIRS}
)
if(${cv_bridge_VERSION} VERSION_LESS "3.3.0")
add_compile_definitions(CV_BRIDGE_USES_OLD_HEADERS)
endif()

## Declare a cpp executable
add_executable(${PROJECT_NAME}
## Declare a cpp library
add_library(${PROJECT_NAME} SHARED
src/web_video_server.cpp
src/image_streamer.cpp
src/libav_streamer.cpp
src/vp8_streamer.cpp
src/h264_streamer.cpp
src/vp9_streamer.cpp
src/multipart_stream.cpp
src/ros_compressed_streamer.cpp
src/jpeg_streamers.cpp
src/png_streamers.cpp
src/streamer.cpp
src/utils.cpp
)

ament_target_dependencies(${PROJECT_NAME}
async_web_server_cpp cv_bridge image_transport rclcpp sensor_msgs)
target_include_directories(${PROJECT_NAME}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
)

## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}
${Boost_LIBRARIES}
PUBLIC
async_web_server_cpp::async_web_server_cpp
pluginlib::pluginlib
rclcpp::rclcpp
rmw::rmw
Boost::boost
PRIVATE
rclcpp_components::component
)

add_library(${PROJECT_NAME}_streamers SHARED
src/streamers/image_transport_streamer.cpp
src/streamers/libav_streamer.cpp
src/streamers/h264_streamer.cpp
src/streamers/jpeg_streamers.cpp
src/streamers/png_streamers.cpp
src/streamers/ros_compressed_streamer.cpp
src/streamers/vp8_streamer.cpp
src/streamers/vp9_streamer.cpp
)

target_include_directories(${PROJECT_NAME}_streamers
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
${avcodec_INCLUDE_DIRS}
${avformat_INCLUDE_DIRS}
${avutil_INCLUDE_DIRS}
${swscale_INCLUDE_DIRS}
)

target_link_libraries(${PROJECT_NAME}_streamers
${PROJECT_NAME}
async_web_server_cpp::async_web_server_cpp
cv_bridge::cv_bridge
image_transport::image_transport
pluginlib::pluginlib
rclcpp::rclcpp
${sensor_msgs_TARGETS}
Boost::boost
Boost::system
${OpenCV_LIBS}
${avcodec_LIBRARIES}
${avformat_LIBRARIES}
${avutil_LIBRARIES}
${swscale_LIBRARIES}
)

## Declare a cpp executable
add_executable(${PROJECT_NAME}_node
src/web_video_server_node.cpp
)

target_link_libraries(${PROJECT_NAME}_node
${PROJECT_NAME}
)

rclcpp_components_register_nodes(${PROJECT_NAME} "web_video_server::WebVideoServer")

pluginlib_export_plugin_description_file(web_video_server plugins.xml)

#############
## Install ##
#############

## Mark executables and/or libraries for installation
install(TARGETS ${PROJECT_NAME}
DESTINATION lib/${PROJECT_NAME}
install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
)

install(
TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_streamers
EXPORT export_${PROJECT_NAME}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
)
ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_dependencies(
async_web_server_cpp
cv_bridge
image_transport
pluginlib
rclcpp
rmw
sensor_msgs
)

install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include/${PROJECT_NAME}
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp"
set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
install(
TARGETS ${PROJECT_NAME}_node
DESTINATION lib/${PROJECT_NAME}
)

ament_package()
###########
## Tests ##
###########

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)

# Skip ament_copyright check for humble
if($ENV{ROS_DISTRO} STREQUAL "humble")
list(APPEND AMENT_LINT_AUTO_EXCLUDE
ament_cmake_copyright
)
endif()

option(ENABLE_CLANG_TIDY "Enable ament_clang_tidy test" OFF)
if(ENABLE_CLANG_TIDY)
include(ProcessorCount)
processorcount(N)
set(ament_cmake_clang_tidy_JOBS ${N})
else()
list(APPEND AMENT_LINT_AUTO_EXCLUDE
ament_cmake_clang_tidy
)
endif()

ament_lint_auto_find_test_dependencies()
endif()

ament_package(
CONFIG_EXTRAS "config-extras.cmake"
)
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Any contribution that you make to this repository will
be under the 3-Clause BSD License, as dictated by that
[license](https://opensource.org/licenses/BSD-3-Clause).
Loading