1. 背景:
在ros系统中有发布摄像头的相关驱动rgb数据,需求端需要将rgb数据可以直接在网页上去显示。
问题解决:
web_video_server功能包,相关链接:
2. 下载,安装和编译:
由于我们项目使用的是ros2系统,所以下载web video server在ros2的分支,可以根据自己的实际需求来下载:
git clone https://github.com/RobotWebTools/web_video_server.git
下载之后可以查看分支,并且编译代码:
cindy@ubuntu:~/web_video_server$ git branch
develop
* ros2
cindy@ubuntu:~/web_video_server$ colcon build --packages-select web_video_server
Starting >>> web_video_server
--- stderr: web_video_server
CMake Error at CMakeLists.txt:6 (find_package):
By not providing "Findasync_web_server_cpp.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"async_web_server_cpp", but CMake did not find one.
Could not find a package configuration file provided by
"async_web_server_cpp" with any of the following names:
async_web_server_cppConfig.cmake
async_web_server_cpp-config.cmake
Add the installation prefix of "async_web_server_cpp" to CMAKE_PREFIX_PATH
or set "async_web_server_cpp_DIR" to a directory containing one of the
above files. If "async_web_server_cpp" provides a separate development
package or SDK, be sure it has been installed.
---
Failed <<< web_video_server [1.22s, exited with code 1]
Summary: 0 packages finished [1.49s]
1 package failed: web_video_server
1 package had stderr output: web_video_server
cindy@ubuntu:~/web_video_server$
可以看到编译的过程中无法找到async_web_server_cpp的数据包:
Could not find a package configuration file provided by
"async_web_server_cpp"
3. async_web_server_cpp的下载,安装
后面要安装async_web_server_cpp的相关服务包:
代码下载:
git clone https://github.com/fkie/async_web_server_cpp.git
cindy@ubuntu:~/ros2_ws$ git clone https://github.com/fkie/async_web_server_cpp.git
Cloning into 'async_web_server_cpp'...
remote: Enumerating objects: 594, done.
remote: Counting objects: 100% (110/110), done.
remote: Compressing objects: 100% (64/64), done.
remote: Total 594 (delta 52), reused 76 (delta 35), pack-reused 484
Receiving objects: 100% (594/594), 113.65 KiB | 440.00 KiB/s, done.
Resolving deltas: 100% (358/358), done.
(1)首先,确保您已经安装了git和