网页显示摄像头数据的方法---基于web video server

1. 背景:

在ros系统中有发布摄像头的相关驱动rgb数据,需求端需要将rgb数据可以直接在网页上去显示。

问题解决:

web_video_server功能包,相关链接:

web_video_server - ROS Wiki

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和

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值