это команда, которую я запускаю в терминале, rosrun ros_exploration ros_exploration
после этого я получил неожиданную ошибку, как показано ниже. Следует упомянуть, что примечание GStreamer: cannot put pipeline to play
, вероятно, является ключевым моментом этой проблемы. к сожалению, я не знаю, как мне это исправить.
0:00:04.442429649 3130 0x2071c90 ERROR omx gstomx.c:3249:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/htf/.config:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg:/usr/local/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
0:00:04.990602557 3078 0x7fd5a8002e70 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "Video"
(ros_exploration:3078): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
0:00:04.990762618 3078 0x7fd5a8002e70 ERROR GST_PIPELINE grammar.y:971:priv_gst_parse_yyparse: no source element for URI "/18_09_11-11:44:53-PCL.avi"
GStreamer Plugin: Embedded video playback halted; module filesink0 reported: Could not open file "Video/18_09_11-11:44:53-PCL.avi" for writing.
GStreamer Plugin: Embedded video playback halted; module filesink0 reported: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
OpenCV Error: Unspecified error (GStreamer: cannot put pipeline to play
) in CvVideoWriter_GStreamer::open, file /home/htf/Downloads/opencv-2.4.13.6/modules/highgui/src/cap_gstreamer.cpp, line 1528
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.
terminate called after throwing an instance of 'cv::Exception'
what(): /home/htf/Downloads/opencv-2.4.13.6/modules/highgui/src/cap_gstreamer.cpp:1528: error: (-2) GStreamer: cannot put pipeline to play
in function CvVideoWriter_GStreamer::open
Aborted (core dumped)
Если вы когда-либо использовали GStreamer или сталкивались с соответствующими проблемами и решениями, небольшие подсказки приветствуются.
здесь часть соответствующих кодов,
PCL_VideoWriter.open (. FileName.toAscii () данных (), CV_FOURCC ( 'М', 'Р', '2', 'V'), ФПС, резюме :: Размер (640480));
// MainTimer-> start (viewer_thr-> loop_time);
if(SLAM_IMG_Capture_flag == 1)
{
FileName.clear();
FileName = "Video/"+CurrDateText+"-"+CurrTimeText+"-SLAM"+".avi";
Я пытался перекомпилировать OpenCV-2.4.13. вот мои команды, cmake cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv-2.4.13 -D WITH_FFMPEG=ON ..
& make
&
`sudo make install`
. Тогда я получил это,
Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: YES (ver 2.2.1)
-- FFMPEG: YES
-- avcodec: YES (ver 58.18.100)
-- avformat: YES (ver 58.12.100)
-- avutil: YES (ver 56.14.100)
-- swscale: YES (ver 5.1.100)
-- avresample: YES (ver 1.0.1)
-- GStreamer:
-- base: YES (ver 1.15.0.1)
-- video: YES (ver 1.15.0.1)
-- app: YES (ver 1.15.0.1)
-- riff: YES (ver 1.15.0.1)
-- pbutils: YES (ver 1.15.0.1)
однако ошибка в том, что error: ‘CV_CAP_FFMPEG’ was not declared in this scope
или error: ‘CAP_FFMPEG’ is not a member of ‘cv’
все еще существует.