This node provides a WebRTC peer that can be configured to stream a ROS image topic and receive a stream that is published to a ROS image topic. The node hosts a webserver that serves a simple test page and offers a websocket server that can be used to create and configure a WebRTC peer.
For full documentation, see the ROS wiki.
This project is released as part of the Robot Web Tools effort.
To install webrtc_ros
, you will need to have ROS installed on your system and the following dependencies:
- async_web_server_cpp:
sudo apt-get install ros-noetic-async-web-server-cpp
. You can also install it withrosdep
from your workspace after cloning the repository:rosdep install --from-paths src --ignore-src -r -y
- WebRTC library installed and built.
[!TIP] The WebRTC library can be add the unstable PPA of the MRS group to your system. This will add the
webrtc
package to your system.curl https://ctu-mrs.github.io/ppa-unstable/add_ppa.sh | bash sudo apt-get install ros-noetic-webrtc
Clone the repository into your ROS workspace and build it:
cd ~/<your_workspace>/src
git clone https://github.com/fly4future/webrtc_ros.git
cd ~/<your_workspace>
catkin build webrtc_ros # or catkin_make if you don't use catkin tools
source devel/setup.bash
To use this package, you will need to have a ROS environment set up and run the launch file:
roslaunch webrtc_ros webrtc_ros.launch
This will start the webrtc_ros node and the webserver. You can then navigate to http://localhost:9090
in your web browser to see the test page.
Note
The default port is 8080, but it can be changed by setting the port
parameter in the launch file.
To create a custom WebRTC client, you could follow the WebRTC in js/browser tutorial or take a look at the web folder with the web page used by the web server.
webrtc_ros is released with a BSD license. For full terms and conditions, see the LICENSE file.
See the AUTHORS file for a full list of contributors.