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

error in gscam

asked 2015-06-19 14:15:36 -0600

Prashant Kumar gravatar image

updated 2015-06-20 11:14:10 -0600

After installing gscam when i run rosrun gscam gscam it shows error as:-

[FATAL] [1434739963.570463587]: Failed to PAUSE stream, check your gstreamer configuration.
[FATAL] [1434739963.570507671]: Failed to initialize gscam stream!

and when i run roslaunch gscam v4l.launch it shows like :

[FATAL] [1434739959.486995125]: Both GSCAM_CONFIG environment variable and 'gscam_config' rosparam are set. Please only define one.
[FATAL] [1434739959.487146853]: Failed to configure gscam!

even bin folder is not getting created as shown in gscam wiki

please help me out.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-06-19 21:23:36 -0600

To rosrun gscam gscam, change your GSCAM_CONFIG by: (you got error because /dev/video2 does not exist)

export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw-rgb,framerate=30/1 ! ffmpegcolorspace"

To roslaunch gscam v4l.launch, modify your v4l.launch to: (you got error because gscam_config was set again in v4l.launch)

<launch>
  <!-- This launchfile should bring up a node that broadcasts a ros image
       transport on /webcam/image_raw -->

  <arg name="DEVICE" default="/dev/video0"/>
  <!-- The GStreamer framerate needs to be an integral fraction -->
  <arg name="FPS" default="30/1"/>
  <arg name="PUBLISH_FRAME" default="false"/>

  <node ns="v4l" name="gscam_driver_v4l" pkg="gscam" type="gscam" output="screen">
    <param name="camera_name" value="default"/>
    <param name="camera_info_url" value="package://gscam/examples/uncalibrated_parameters.ini"/>
    <!--<param name="gscam_config" value="v4l2src device=$(arg DEVICE) ! video/x-raw-rgb,framerate=$(arg FPS) ! ffmpegcolorspace"/>-->
    <param name="frame_id" value="/v4l_frame"/>
    <param name="sync_sink" value="true"/>
  </node>

  <node if="$(arg PUBLISH_FRAME)" name="v4l_transform" pkg="tf" type="static_transform_publisher" args="1 2 3 0 -3.141 0 /world /v4l_frame 10"/>
</launch>
edit flag offensive delete link more

Comments

while trying to modify v4l.launch. it says that I don't have permission to change that file. any ideas?

Prashant Kumar gravatar image Prashant Kumar  ( 2015-06-20 13:48:49 -0600 )edit
1

Weird. Anyway, open a new terminal, do not export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw-rgb,framerate=30/1 ! ffmpegcolorspace", only launch v4l.launch. The point is you cannot set GSCAM_CONFIG twice.

Po-Jen Lai gravatar image Po-Jen Lai  ( 2015-06-20 21:56:04 -0600 )edit
0

answered 2016-09-13 13:38:26 -0600

Jhony Ferreira gravatar image

Failed to PAUSE stream error:

First check your permission on video0 device.
ls -la /dev/video0

It should appear something like this: crw-rw----+ 1 root video 81, 0 Sep 13 11:26 /dev/video0 where your login user must belong to video group users

You should also try to remove the comma of gscam config: export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw-rgb framerate=30/1 ! ffmpegcolorspace"

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-06-19 14:12:44 -0600

Seen: 2,504 times

Last updated: Sep 13 '16