0
$\begingroup$

Rosanswers logo

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....

Originally posted by asps946701 on ROS Answers with karma: 3 on 2022-10-03

Post score: 0


Original comments

Comment by ravijoshi on 2022-10-03:
The webrtc_ros depends on webrtc. Make sure webrtc is installed properly.

Comment by asps946701 on 2022-10-03:
I will install webrtc. Thanks you !!

Comment by asps946701 on 2022-10-06:
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_refptrwebrtc::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);

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by ravijoshi with karma: 1744 on 2022-10-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by asps946701 on 2022-10-13:
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!

Comment by ravijoshi on 2022-10-14:
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.

Comment by asps946701 on 2022-10-14:
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

Comment by ravijoshi on 2022-10-14:\

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.

Comment by asps946701 on 2022-10-14:
OK Thanks you very much !

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.