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

video_stream_opencv video_file.launch does not work

asked 2018-05-30 00:33:51 -0500

Astronaut gravatar image

updated 2018-05-30 23:56:29 -0500

jayess gravatar image

Hi I want to use video_stream_opencv in order to create a bag file from mp4 video file. So I modified the video_file.launch id oder to use it with my video . this is the launch file

<?xml version="1.0"?>
<launch>
   <!-- node name and ros graph name -->
    <arg name="camera_name" value="camera" />
    <!-- full path to the video file -->
    <arg name="video_stream_provider" value="/home/me/Data/video1.mp4" />     
</launch>

then when run the roslaunch video_stream_opencv video_file.launch I got this

logging to /home/bojan/.ros/log/c9f9691a-63c5-11e8-a7c7-2c27d7ea3cdc/roslaunch-bojan-HP-18429.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://bojan-HP:35443/

SUMMARY
PARAMETERS * /rosdistro: kinetic * /rosversion: 1.12.13

NODES

ROS_MASTER_URI=http://localhost:11311

No processes to monitor shutting down processing monitor... ... shutting down processing monitor complete

what is the problem?Im using Ubuntu 16.04 and ROS kinetic

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-05-31 00:03:45 -0500

jayess gravatar image

The problem is that you're not launching a node by

  1. using a <node> tag
  2. including a launch file by using an <include> tag that does launch a node

If you look at your answer, you'll see that you're using method number 2.

edit flag offensive delete link more
0

answered 2018-05-30 01:59:44 -0500

Astronaut gravatar image

updated 2018-05-30 23:54:07 -0500

I got it . The problem was that I modified too much. here ihe good launch file

<?xml version="1.0"?>
<launch>
   <!-- launch video stream -->
   <include file="$(find video_stream_opencv)/launch/camera.launch" >
        <!-- node name and ros graph name -->
        <arg name="camera_name" value="camera" />
        <!-- full path to the video file -->
        <!-- wget http://techslides.com/demos/sample-videos/small.mp4 -O /tmp/small.mp4 -->
        <arg name="video_stream_provider" value="/home/me/Data/video1.mp4" />
        <!-- set camera fps to (video files not affected) -->
        <!-- <arg name="set_camera_fps" value="30"/> -->
        <!-- set buffer queue size of frame capturing to -->
        <arg name="buffer_queue_size" value="1000" />
        <!-- throttling the querying of frames to -->
        <arg name="fps" value="30" />
        <!-- setting frame_id -->
        <arg name="frame_id" value="videofile_frame" />
        <!-- camera info loading, take care as it needs the "file:///" at the start , e.g.:
        "file:///$(find your_camera_package)/config/your_camera.yaml" -->
        <arg name="camera_info_url" value="" />
        <!-- flip the image horizontally (mirror it) -->
        <arg name="flip_horizontal" value="false" />
        <!-- flip the image vertically -->
        <arg name="flip_vertical" value="false" />
        <!-- visualize on an image_view window the stream generated -->
        <arg name="visualize" value="true" />
   </include>
</launch>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-05-30 00:33:51 -0500

Seen: 1,441 times

Last updated: May 31 '18