Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to multiple cameras simultaneously using index #28

Open
joshvillbrandt opened this issue Jan 26, 2016 · 5 comments
Open

Comments

@joshvillbrandt
Copy link
Contributor

I implemented the missing index functionality (libuvc #36, libuvc_ros #27) and am able to select a camera with an index. However, when I try to launch two instances of libuvc_camera simultaneously, the libuvc_camera instance that was started second always gets hung up somewhere in uvc_start_streaming(). Any ideas?

My launch file looks like this:

<?xml version="1.0"?>

<launch>
  <arg name="width" default="1280" />
  <arg name="height" default="720" />
  <arg name="video_mode" default="mjpeg" />
  <arg name="frame_rate" default="60" />

  <!-- start the left camera -->
  <node pkg="libuvc_camera" type="camera_node" name="left" ns="stereo/left">

    <!-- Parameters used to find the camera -->
    <param name="vendor" value="0x05a3"/>
    <param name="product" value="0x9230"/>
    <param name="index" value="0"/>

    <!-- Image size and type -->
    <param name="width" value="$(arg width)"/>
    <param name="height" value="$(arg height)"/>
    <param name="video_mode" value="$(arg video_mode)"/>
    <param name="frame_rate" value="$(arg frame_rate)"/>
  </node>

  <!-- start the right camera -->
  <node pkg="libuvc_camera" type="camera_node" name="right" ns="stereo/right">

    <!-- Parameters used to find the camera -->
    <param name="vendor" value="0x05a3"/>
    <param name="product" value="0x9230"/>
    <param name="index" value="1"/>

    <!-- Image size and type -->
    <param name="width" value="$(arg width)"/>
    <param name="height" value="$(arg height)"/>
    <param name="video_mode" value="$(arg video_mode)"/>
    <param name="frame_rate" value="$(arg frame_rate)"/>
  </node>
</launch>
@joshvillbrandt
Copy link
Contributor Author

I have verified that both of the node sections in the previously mentioned launch file work independently. I also also verified that both camera work simultaneously with identical video settings using different drivers (so USB bus bandwidth shouldn't be the problem.)

@cyborg-x1
Copy link

I can confirm this as well, I have two cheap chinese laptop camera modules here, both with serial set to 0, even if index is set differently it does always try to open the same camera.

@stwirth
Copy link

stwirth commented Mar 15, 2016

Same for me. I've connected four cameras (all same vendor/product) and cannot select them by index. The driver always opens the first one. Even invalid indices (like 100) don't given an error.

@givip
Copy link

givip commented May 2, 2019

Same for me, anything changed after 3 years?

@gr8jam
Copy link

gr8jam commented May 16, 2019

I am also interested if any progress was made regarding this topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants