ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Webrtc_ros fatal error: adapted_video_track_source.h: No such file or directory

asked 2022-10-03 03:56:56 -0500

asps946701 gravatar image

updated 2022-10-06 20:50:49 -0500

Can anyone help me solve this problem?

I try using error msg to search on google but have no solution

Thanks !
My system : windows10/ VMWARE/ ubuntu 18.04 / ROS melodic

My webrtc insall step

cd ~
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
sudo vim ~/.bashrc 
export PATH="$PATH:~/depot_tools"
source ~/.bashrc

mkdir webrtc-checkout
cd webrtc-checkout
fetch --nohooks webrtc
gclient sync

My webrtc_ros install step:

cd catkin_ws/src

git clone https://github.com/RobotWebTools/webrtc_ros.git

cd ..

catkin_make -DCATKIN_WHITELIST_PACKAGES="webrtc_ros"

**Below is my error log:** 

[ 64%] Building CXX object webrtc_ros/webrtc_ros/CMakeFiles/webrtc_ros_server.dir/src/ros_video_capturer.cpp.o
In file included from /home/jetbot/catkin_ws/src/webrtc_ros/webrtc_ros/src/ros_video_capturer.cpp:1:0:
/home/jetbot/catkin_ws/src/webrtc_ros/webrtc_ros/include/webrtc_ros/ros_video_capturer.h:6:10: fatal error: webrtc/media/base/adapted_video_track_source.h: No such file or directory
 #include <webrtc/media/base/adapted_video_track_source.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
webrtc_ros/webrtc_ros/CMakeFiles/webrtc_ros_server.dir/build.make:134: recipe for target 'webrtc_ros/webrtc_ros/CMakeFiles/webrtc_ros_server.dir/src/ros_video_capturer.cpp.o' failed
make[2]: *** [webrtc_ros/webrtc_ros/CMakeFiles/webrtc_ros_server.dir/src/ros_video_capturer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /opt/ros/melodic/include/async_web_server_cpp/websocket_connection.hpp:5:0,
                 from /opt/ros/melodic/include/async_web_server_cpp/websocket_request_handler.hpp:5,
                 from /home/jetbot/catkin_ws/src/webrtc_ros/webrtc_ros/src/webrtc_web_server.cpp:11:
/opt/ros/melodic/include/async_web_server_cpp/websocket_message.hpp:15:19: warning: missing terminating ' character
 #    warning I don't know how to create a packed struct with your compiler
                   ^
CMakeFiles/Makefile2:560: recipe for target 'webrtc_ros/webrtc_ros/CMakeFiles/webrtc_ros_server.dir/all' failed
make[1]: *** [webrtc_ros/webrtc_ros/CMakeFiles/webrtc_ros_server.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
edit retag flag offensive close merge delete

Comments

1

The webrtc_ros depends on webrtc. Make sure webrtc is installed properly.

ravijoshi gravatar image ravijoshi  ( 2022-10-03 04:53:28 -0500 )edit
1

I will install webrtc. Thanks you !!

asps946701 gravatar image asps946701  ( 2022-10-03 10:53:30 -0500 )edit
1

Do you have webrtc_ros insatll guide after ros was installed. I was installed webrtc but it got many error. Trying some solution but also fail .Thnaks Part of error : -/opt/ros/melodic/include/webrtc/media/base/adapted_video_track_source.h:16:10: fatal error: absl/types/optional.h: No such file or directory #include "absl/types/optional.h"

-/home/jetbot/catkin_ws/src/webrtc_ros/src/ros_video_renderer.cpp:19:36: error: ‘I420BufferInterface’ is not a member of ‘webrtc’ const rtc::scoped_refptr<webrtc::i420bufferinterface>& buffer = frame.video_frame_buffer()->ToI420();

-/home/jetbot/catkin_ws/src/webrtc_ros/src/ros_video_renderer.cpp:21:22: error: base operand of ‘->’ is not a pointer cv::Mat bgra(buffer->height(), buffer->width(), CV_8UC4);

asps946701 gravatar image asps946701  ( 2022-10-06 20:40:26 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2022-10-07 01:44:07 -0500

ravijoshi gravatar image

Please see the following error:

/home/jetbot/catkin_ws/src/webrtc_ros/webrtc_ros/include/webrtc_ros/ros_video_capturer.h:6:10: fatal error: webrtc/media/base/adapted_video_track_source.h: No such file or directory
 #include <webrtc/media/base/adapted_video_track_source.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Basically, the webrtc_ros depends on webrtc. Therefore, please make sure webrtc is installed before compilation.

On the other hand, I suggest installing pre-built binaries using apt because it automatically takes care of installing dependencies. Please see below:

$ sudo apt install ros-melodic-webrtc
$ sudo apt install ros-melodic-webrtc-ros
edit flag offensive delete link more

Comments

Hi , I used apt install "ros-melodic-webrtc" and "ros-melodic-webrtc-ros" but it got same error.

When I go to path : "/opt/ros/melodic/include/webrtc/media/base/" , I found .h file name is :"adaptedvideotracksource.h".

Should I modify in "ros_video_capturer.h" file : "#include <webrtc media="" base="" adapted_video_track_source.h="">" to "#include <webrtc media="" base="" adaptedvideotracksource.h="">" ?

Thanks!

asps946701 gravatar image asps946701  ( 2022-10-13 20:26:03 -0500 )edit

In the original question, you are trying to install webrtc_ros from the source. I advised installing pre-built binaries using apt. It should work well. However, you are reporting the same error. Therefore, I request you enumerate all of the commands you are using.

ravijoshi gravatar image ravijoshi  ( 2022-10-14 02:29:52 -0500 )edit

Sorry ,I may have misunderstood.

If I use apt to install webrtc_ros , I will not require to build webrtc_ros from source ?

Now I install webrtc_ros from apt command is no problem.

thank you very much

asps946701 gravatar image asps946701  ( 2022-10-14 05:37:04 -0500 )edit

If I use apt to install webrtc_ros , I will not require to build webrtc_ros from source ?

Yes. You are right. You do not need to build from source.

Now I install webrtc_ros from apt command is no problem.

I am glad you made it work. May I request you to click on the check mark symbol, ✔ icon, located at the top left side of this answer? It will mark this question as answered.

ravijoshi gravatar image ravijoshi  ( 2022-10-14 06:30:53 -0500 )edit

OK Thanks you very much !

asps946701 gravatar image asps946701  ( 2022-10-14 09:33:00 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-10-03 03:56:56 -0500

Seen: 125 times

Last updated: Oct 07 '22