ubuntu 使用webrtc_ros 编译linux webrtc库
webrtc_ros 使用WebRTC流式传输ROS图像主题 该节点提供了一个WebRTC对等方,可以将其配置为流ROS图像主题并接收发布到ROS图像主题的流。 该节点托管一个提供简单测试页面的Web服务器,并提供可用于创建和配置WebRTC对等方的Websocket服务器。 有关完整文档,请参见 。 该项目是努力的一部分而发布。
克隆
https://github.com/RobotWebTools/webrtc_ros
catkin_make
报错:
Could not find a package configuration file provided by "webrtc" with any
of the following names:
webrtcConfig.cmake
webrtc-config.cmake
Add the installation prefix of "webrtc" to CMAKE_PREFIX_PATH or set
"webrtc_DIR" to a directory containing one of the above files. If "webrtc"
provides a separate development package or SDK, be sure it has been
installed.
安装依赖
sudo apt-get update
sudo apt-get install build-essential libssl-dev libasound2-dev libpulse-dev libjpeg-dev libxv-dev libgtk-3-dev libxtst-dev libwebp-dev
sudo apt-get install libglib2.0-dev
sudo apt-get update 报错时出现同样问题参考:
https://blog.csdn.net/qq_15204179/article/details/134612954?spm=1001.2014.3001.5501
mkdir /webrtc
cd webrtc
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/home/sukai/3rdparty/webrtc/depot_tools
git clone https://github.com/crow-misia/libwebrtc-bin
cd libwebrtc-bin/build
make USE_H264=1 linux-x64
编译时间比较长:
出现这个要耐心等等,不要以为程序进入了死循环,过一段时间会显示进度的.
[0:07:48] Still working on:
[0:07:48] src/third_party
[0:07:48] src/tools
静待编译完成, 最后在libwebrtc-bin目录中有各package目录,其中包含了include lib libwebrtc-linux-x64-h264.tar.xz NOTICE VERSION等几个目录,lib目录中为编译后的 .a库,相关的头文件在include目录中。
/home/sukai/3rdparty/webrtc/libwebrtc-bin/package/include /home/sukai/3rdparty/webrtc/libwebrtc-bin/package/lib
法二:
cd ~
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
sudo vim ~/.bashrc
export PATH="$PATH:~/depot_tools"
source ~/.bashrcmkdir webrtc-checkout
cd webrtc-checkout
fetch --nohooks webrtc
gclient sync
安装
./build/install-build-deps.sh