socrob / autonomous_systems

Material used for learning ROS and robotics, as part of the Autonomous Systems course at Instituto Superior Tecnico
34 stars 9 forks source link

getting video stream from phantom robot #8

Open oscar-lima opened 7 years ago

oscar-lima commented 7 years ago

use video_stream_opencv from this website

use this sample launch file:

   <!-- launch video stream -->
   <include file="$(find video_stream_opencv)/launch/camera.launch" >
        <!-- node name and ros graph name -->
        <arg name="camera_name" value="webcam" />
        <!-- means video device 0, /dev/video0 -->
        <arg name="video_stream_provider" value="/home/oscar/Downloads/camera_calibration.mp4" />
        <!-- throttling the querying of frames to -->
        <arg name="fps" value="30" />
        <!-- setting frame_id -->
        <arg name="frame_id" value="webcam" />
        <!-- 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>