Problem launching two openni_camera/OpenNINodelet with two Kinect connected

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem launching two openni_camera/OpenNINodelet with two Kinect connected

fberga
Hi,
I have to merge pointclouds from two Kinect at runtime. To do so, I'm trying to launch two openni_camera nodelets one for each Kinect. But there are some problems.

With openni_ros stack there wasn't any problem, the two nodelets did their work. When I tried to move to the openni_kinect stack with openni_camera stable, it gave this output



[ INFO] [1308303787.775217888]: Loading nodelet /Kinect1 of type openni_camera/OpenNINodelet to manager manager with the following remappings:
[ INFO] [1308303787.778629897]: Loading nodelet /Rototranslation of type viewer/ViewerNodelet to manager manager with the following remappings:
[ INFO] [1308303787.778699180]: /k1 -> /kinect2/rgb/points
[ INFO] [1308303787.778724068]: /k2 -> /kinect1/rgb/points
[ INFO] [1308303787.779804870]: Loading nodelet /Kinect2 of type openni_camera/OpenNINodelet to manager manager with the following remappings:
[ INFO] [1308303787.780761867]: waitForService: Service [/manager/load_nodelet] has not been advertised, waiting...
[ INFO] [1308303787.796441331]: waitForService: Service [/manager/load_nodelet] has not been advertised, waiting...
[ INFO] [1308303787.796842554]: waitForService: Service [/manager/load_nodelet] has not been advertised, waiting...
[ INFO] [1308303787.801473335]: waitForService: Service [/manager/load_nodelet] is now available.
[ INFO] [1308303787.817717034]: waitForService: Service [/manager/load_nodelet] is now available.
[ INFO] [1308303787.817911634]: waitForService: Service [/manager/load_nodelet] is now available.
[ INFO] [1308303791.121934776]: [/Kinect1] Number devices connected: 2
[ INFO] [1308303791.122159531]: [/Kinect1] 1. device on bus 001:26 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
[ INFO] [1308303791.122209011]: [/Kinect1] 2. device on bus 001:18 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
[ INFO] [1308303791.124482589]: [/Kinect1] searching for device with serial number = A00364907959051A
[ INFO] [1308303791.163914404]: [/Kinect1] Opened 'Xbox NUI Camera' on bus 1:18 with serial number 'A00364907959051A'
[ INFO] [1308303791.176684366]: rgb_frame_id = '/openni_rgb_optical_frame'
[ INFO] [1308303791.178508719]: depth_frame_id = '/openni_depth_optical_frame'
terminate called after throwing an instance of 'openni_wrapper::OpenNIException'
  what():  unsigned int openni_wrapper::OpenNIDriver::updateDeviceList() @ /tmp/buildd/ros-diamondback-openni-kinect-0.2.1/debian/ros-diamondback-openni-kinect/opt/ros/diamondback/stacks/openni_kinect/openni_camera/src/openni_driver.cpp @ 120 : number of streams and devices does not match: 3 devices, 4 depth streams, 4 image streams


So I moved to the openni_camera_unstable package and the output is the following...


[ INFO] [1308302364.222578975]: [/Kinect1] Number devices connected: 2
[ INFO] [1308302364.222809829]: [/Kinect1] 1. device on bus 001:26 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
[ INFO] [1308302364.222865906]: [/Kinect1] 2. device on bus 001:18 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
[ INFO] [1308302364.225022445]: [/Kinect1] searching for device with serial number = A00364907959051A
[ INFO] [1308302364.271140658]: [/Kinect1] Opened 'Xbox NUI Camera' on bus 1:18 with serial number 'A00364907959051A'
[ INFO] [1308302364.298155716]: rgb_frame_id = '/openni_rgb_optical_frame'
[ INFO] [1308302364.299902851]: depth_frame_id = '/openni_depth_optical_frame'
[ INFO] [1308302364.687453231]: [/Kinect2] Number devices connected: 5
[ INFO] [1308302364.687551458]: [/Kinect2] 1. device on bus 001:18 is a SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device2'
[ INFO] [1308302364.687602722]: [/Kinect2] 2. device on bus 001:18 is a SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device1'
[ INFO] [1308302364.687651620]: [/Kinect2] 3. device on bus 001:26 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
[ INFO] [1308302364.687694939]: [/Kinect2] 4. device on bus 001:18 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
[manager-2] process has died [pid 28786, exit code -11].
log files: /home/iaslab/.ros/log/e221454c-98c2-11e0-8b63-782bcb97fb78/manager-2*.log



When openni_device is initialized, two more virtual devices (the SensorV2 from PrimeSense devices) are instantiated in the same bus of the real one and this seems to be a problem for the wrapper...

What kind of problem could it be??

Thanks in advance,
Filippo
Reply | Threaded
Open this post in threaded view
|

Re: [Ros-kinect] Problem launching two openni_camera/OpenNINodelet with two Kinect connected

Wim Meeussen
Filippo,

How are you bringing up the two cameras?  If you simply launch the
openni.launch file twice, things won't work because you will launch
the same nodes with the same names twice. You have to pass a camera
namespace argument to the launch file. For openni_camera_unstable,
this would look like:

roslaunch openni_camera_unstable openni.launch camera:=kinect_1
roslaunch openni_camera_unstable openni.launch camera:=kinect_2

Or, if you want to create your own launch file:

<launch>
    <include file="$(find openni_camera_unstable)/launch/openni.launch">
       <arg name="camera" value="kinect_1" />
    </include>

    <include file="$(find openni_camera_unstable)/launch/openni.launch">
       <arg name="camera" value="kinect_2" />
    </include>
</launch>



Would you mind posting this same question on answers.ros.org to help
people that will have the same problem in the future? I'll then attach
my answer.


Hope this helps.

Wim





On Fri, Jun 17, 2011 at 2:55 AM, fberga <[hidden email]> wrote:

> Hi,
> I have to merge pointclouds from two Kinect at runtime. To do so, I'm trying
> to launch two openni_camera nodelets one for each Kinect. But there are some
> problems.
>
> With openni_ros stack there wasn't any problem, the two nodelets did their
> work. When I tried to move to the openni_kinect stack with openni_camera
> stable, it gave this output
>
>
>
> [ INFO] [1308303787.775217888]: Loading nodelet /Kinect1 of type
> openni_camera/OpenNINodelet to manager manager with the following
> remappings:
> [ INFO] [1308303787.778629897]: Loading nodelet /Rototranslation of type
> viewer/ViewerNodelet to manager manager with the following remappings:
> [ INFO] [1308303787.778699180]: /k1 -> /kinect2/rgb/points
> [ INFO] [1308303787.778724068]: /k2 -> /kinect1/rgb/points
> [ INFO] [1308303787.779804870]: Loading nodelet /Kinect2 of type
> openni_camera/OpenNINodelet to manager manager with the following
> remappings:
> [ INFO] [1308303787.780761867]: waitForService: Service
> [/manager/load_nodelet] has not been advertised, waiting...
> [ INFO] [1308303787.796441331]: waitForService: Service
> [/manager/load_nodelet] has not been advertised, waiting...
> [ INFO] [1308303787.796842554]: waitForService: Service
> [/manager/load_nodelet] has not been advertised, waiting...
> [ INFO] [1308303787.801473335]: waitForService: Service
> [/manager/load_nodelet] is now available.
> [ INFO] [1308303787.817717034]: waitForService: Service
> [/manager/load_nodelet] is now available.
> [ INFO] [1308303787.817911634]: waitForService: Service
> [/manager/load_nodelet] is now available.
> [ INFO] [1308303791.121934776]: [/Kinect1] Number devices connected: 2
> [ INFO] [1308303791.122159531]: [/Kinect1] 1. device on bus 001:26 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
> [ INFO] [1308303791.122209011]: [/Kinect1] 2. device on bus 001:18 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
> [ INFO] [1308303791.124482589]: [/Kinect1] searching for device with serial
> number = A00364907959051A
> [ INFO] [1308303791.163914404]: [/Kinect1] Opened 'Xbox NUI Camera' on bus
> 1:18 with serial number 'A00364907959051A'
> [ INFO] [1308303791.176684366]: rgb_frame_id = '/openni_rgb_optical_frame'
> [ INFO] [1308303791.178508719]: depth_frame_id =
> '/openni_depth_optical_frame'
> terminate called after throwing an instance of
> 'openni_wrapper::OpenNIException'
>  what():  unsigned int openni_wrapper::OpenNIDriver::updateDeviceList() @
> /tmp/buildd/ros-diamondback-openni-kinect-0.2.1/debian/ros-diamondback-openni-kinect/opt/ros/diamondback/stacks/openni_kinect/openni_camera/src/openni_driver.cpp
> @ 120 : number of streams and devices does not match: 3 devices, 4 depth
> streams, 4 image streams
>
>
> So I moved to the openni_camera_unstable package and the output is the
> following...
>
>
> [ INFO] [1308302364.222578975]: [/Kinect1] Number devices connected: 2
> [ INFO] [1308302364.222809829]: [/Kinect1] 1. device on bus 001:26 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
> [ INFO] [1308302364.222865906]: [/Kinect1] 2. device on bus 001:18 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
> [ INFO] [1308302364.225022445]: [/Kinect1] searching for device with serial
> number = A00364907959051A
> [ INFO] [1308302364.271140658]: [/Kinect1] Opened 'Xbox NUI Camera' on bus
> 1:18 with serial number 'A00364907959051A'
> [ INFO] [1308302364.298155716]: rgb_frame_id = '/openni_rgb_optical_frame'
> [ INFO] [1308302364.299902851]: depth_frame_id =
> '/openni_depth_optical_frame'
> [ INFO] [1308302364.687453231]: [/Kinect2] Number devices connected: 5
> [ INFO] [1308302364.687551458]: [/Kinect2] 1. device on bus 001:18 is a
> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device2'
> [ INFO] [1308302364.687602722]: [/Kinect2] 2. device on bus 001:18 is a
> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device1'
> [ INFO] [1308302364.687651620]: [/Kinect2] 3. device on bus 001:26 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
> [ INFO] [1308302364.687694939]: [/Kinect2] 4. device on bus 001:18 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
> [manager-2] process has died [pid 28786, exit code -11].
> log files:
> /home/iaslab/.ros/log/e221454c-98c2-11e0-8b63-782bcb97fb78/manager-2*.log
>
>
>
> When openni_device is initialized, two more virtual devices (the SensorV2
> from PrimeSense devices) are instantiated in the same bus of the real one
> and this seems to be a problem for the wrapper...
>
> What kind of problem could it be??
>
> Thanks in advance,
> Filippo
>
> --
> View this message in context: http://kinect-with-ros.976505.n3.nabble.com/Problem-launching-two-openni-camera-OpenNINodelet-with-two-Kinect-connected-tp3075599p3075599.html
> Sent from the Kinect with ROS mailing list archive at Nabble.com.
> _______________________________________________
> Ros-kinect mailing list
> [hidden email]
> https://code.ros.org/mailman/listinfo/ros-kinect
>



--
--
Wim Meeussen
Willow Garage Inc.
<http://www.willowgarage.com)
_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect
Reply | Threaded
Open this post in threaded view
|

Re: [Ros-kinect] Problem launching two openni_camera/OpenNINodelet with two Kinect connected

Suat Gedikli
Hi,

are both devices on the same USB bus? If so, please connect them on different ones, since the bandwith is not enough to handle two kinects with two streams each.

-Suat

On Fri, Jun 17, 2011 at 8:57 AM, Wim Meeussen <[hidden email]> wrote:
Filippo,

How are you bringing up the two cameras?  If you simply launch the
openni.launch file twice, things won't work because you will launch
the same nodes with the same names twice. You have to pass a camera
namespace argument to the launch file. For openni_camera_unstable,
this would look like:

roslaunch openni_camera_unstable openni.launch camera:=kinect_1
roslaunch openni_camera_unstable openni.launch camera:=kinect_2

Or, if you want to create your own launch file:

<launch>
   <include file="$(find openni_camera_unstable)/launch/openni.launch">
      <arg name="camera" value="kinect_1" />
   </include>

   <include file="$(find openni_camera_unstable)/launch/openni.launch">
      <arg name="camera" value="kinect_2" />
   </include>
</launch>



Would you mind posting this same question on answers.ros.org to help
people that will have the same problem in the future? I'll then attach
my answer.


Hope this helps.

Wim





On Fri, Jun 17, 2011 at 2:55 AM, fberga <[hidden email]> wrote:
> Hi,
> I have to merge pointclouds from two Kinect at runtime. To do so, I'm trying
> to launch two openni_camera nodelets one for each Kinect. But there are some
> problems.
>
> With openni_ros stack there wasn't any problem, the two nodelets did their
> work. When I tried to move to the openni_kinect stack with openni_camera
> stable, it gave this output
>
>
>
> [ INFO] [1308303787.775217888]: Loading nodelet /Kinect1 of type
> openni_camera/OpenNINodelet to manager manager with the following
> remappings:
> [ INFO] [1308303787.778629897]: Loading nodelet /Rototranslation of type
> viewer/ViewerNodelet to manager manager with the following remappings:
> [ INFO] [1308303787.778699180]: /k1 -> /kinect2/rgb/points
> [ INFO] [1308303787.778724068]: /k2 -> /kinect1/rgb/points
> [ INFO] [1308303787.779804870]: Loading nodelet /Kinect2 of type
> openni_camera/OpenNINodelet to manager manager with the following
> remappings:
> [ INFO] [1308303787.780761867]: waitForService: Service
> [/manager/load_nodelet] has not been advertised, waiting...
> [ INFO] [1308303787.796441331]: waitForService: Service
> [/manager/load_nodelet] has not been advertised, waiting...
> [ INFO] [1308303787.796842554]: waitForService: Service
> [/manager/load_nodelet] has not been advertised, waiting...
> [ INFO] [1308303787.801473335]: waitForService: Service
> [/manager/load_nodelet] is now available.
> [ INFO] [1308303787.817717034]: waitForService: Service
> [/manager/load_nodelet] is now available.
> [ INFO] [1308303787.817911634]: waitForService: Service
> [/manager/load_nodelet] is now available.
> [ INFO] [1308303791.121934776]: [/Kinect1] Number devices connected: 2
> [ INFO] [1308303791.122159531]: [/Kinect1] 1. device on bus 001:26 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
> [ INFO] [1308303791.122209011]: [/Kinect1] 2. device on bus 001:18 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
> [ INFO] [1308303791.124482589]: [/Kinect1] searching for device with serial
> number = A00364907959051A
> [ INFO] [1308303791.163914404]: [/Kinect1] Opened 'Xbox NUI Camera' on bus
> 1:18 with serial number 'A00364907959051A'
> [ INFO] [1308303791.176684366]: rgb_frame_id = '/openni_rgb_optical_frame'
> [ INFO] [1308303791.178508719]: depth_frame_id =
> '/openni_depth_optical_frame'
> terminate called after throwing an instance of
> 'openni_wrapper::OpenNIException'
>  what():  unsigned int openni_wrapper::OpenNIDriver::updateDeviceList() @
> /tmp/buildd/ros-diamondback-openni-kinect-0.2.1/debian/ros-diamondback-openni-kinect/opt/ros/diamondback/stacks/openni_kinect/openni_camera/src/openni_driver.cpp
> @ 120 : number of streams and devices does not match: 3 devices, 4 depth
> streams, 4 image streams
>
>
> So I moved to the openni_camera_unstable package and the output is the
> following...
>
>
> [ INFO] [1308302364.222578975]: [/Kinect1] Number devices connected: 2
> [ INFO] [1308302364.222809829]: [/Kinect1] 1. device on bus 001:26 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
> [ INFO] [1308302364.222865906]: [/Kinect1] 2. device on bus 001:18 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
> [ INFO] [1308302364.225022445]: [/Kinect1] searching for device with serial
> number = A00364907959051A
> [ INFO] [1308302364.271140658]: [/Kinect1] Opened 'Xbox NUI Camera' on bus
> 1:18 with serial number 'A00364907959051A'
> [ INFO] [1308302364.298155716]: rgb_frame_id = '/openni_rgb_optical_frame'
> [ INFO] [1308302364.299902851]: depth_frame_id =
> '/openni_depth_optical_frame'
> [ INFO] [1308302364.687453231]: [/Kinect2] Number devices connected: 5
> [ INFO] [1308302364.687551458]: [/Kinect2] 1. device on bus 001:18 is a
> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device2'
> [ INFO] [1308302364.687602722]: [/Kinect2] 2. device on bus 001:18 is a
> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device1'
> [ INFO] [1308302364.687651620]: [/Kinect2] 3. device on bus 001:26 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
> [ INFO] [1308302364.687694939]: [/Kinect2] 4. device on bus 001:18 is a Xbox
> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
> [manager-2] process has died [pid 28786, exit code -11].
> log files:
> /home/iaslab/.ros/log/e221454c-98c2-11e0-8b63-782bcb97fb78/manager-2*.log
>
>
>
> When openni_device is initialized, two more virtual devices (the SensorV2
> from PrimeSense devices) are instantiated in the same bus of the real one
> and this seems to be a problem for the wrapper...
>
> What kind of problem could it be??
>
> Thanks in advance,
> Filippo
>
> --
> View this message in context: http://kinect-with-ros.976505.n3.nabble.com/Problem-launching-two-openni-camera-OpenNINodelet-with-two-Kinect-connected-tp3075599p3075599.html
> Sent from the Kinect with ROS mailing list archive at Nabble.com.
> _______________________________________________
> Ros-kinect mailing list
> [hidden email]
> https://code.ros.org/mailman/listinfo/ros-kinect
>



--
--
Wim Meeussen
Willow Garage Inc.
<http://www.willowgarage.com)
_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect


_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect
Suat
Reply | Threaded
Open this post in threaded view
|

Re: [Ros-kinect] Problem launching two openni_camera/OpenNINodelet with two Kinect connected

fberga
In reply to this post by Wim Meeussen
Hi Wim,
thanks for your reply!!

2011/6/17 Wim Meeussen <[hidden email]>:

> Filippo,
>
> How are you bringing up the two cameras?  If you simply launch the
> openni.launch file twice, things won't work because you will launch
> the same nodes with the same names twice. You have to pass a camera
> namespace argument to the launch file. For openni_camera_unstable,
> this would look like:
>
> roslaunch openni_camera_unstable openni.launch camera:=kinect_1
> roslaunch openni_camera_unstable openni.launch camera:=kinect_2
>
> Or, if you want to create your own launch file:
>
> <launch>
>    <include file="$(find openni_camera_unstable)/launch/openni.launch">
>       <arg name="camera" value="kinect_1" />
>    </include>
>
>    <include file="$(find openni_camera_unstable)/launch/openni.launch">
>       <arg name="camera" value="kinect_2" />
>    </include>
> </launch>
>

 No, I'm not launching the openni.launch file twice. I'm trying to
launch, in this manner, the two nodelets:

<launch>
        <node pkg="nodelet" type="nodelet" name="mng"  args="manager"
output="screen"/>
       
  <node pkg="nodelet" type="nodelet" name="Kinect1" args="load
openni_camera/OpenNINodelet mng" output="screen">
            <param name="device_id" value="A00364907959051A"/>
            <remap from="camera" to="kinect1" />
            <rosparam command="load" file="$(find
Viewer)/info/k1/kinect_params.yaml" />
            <param name="rgb_frame_id" value="/openni_rgb_optical_frame" />
            <param name="depth_frame_id" value="/openni_depth_optical_frame" />
            <param name="depth_registration" value="true" />
            <param name="image_mode" value="2" />
            <param name="depth_mode" value="2" />
            <param name="debayering" value="0" />
            <param name="depth_time_offset" value="0" />
            <param name="image_time_offset" value="0" />
        </node>
       
        <node pkg="nodelet" type="nodelet" name="Kinect2" args="load
openni_camera/OpenNINodelet mng" output="screen">
            <param name="device_id" value="A00361810132047A"/>
            <remap from="camera" to="kinect2" />
            <rosparam command="load" file="$(find
Viewer)/info/k2/kinect_params.yaml" />
            <param name="rgb_frame_id" value="/openni_rgb_optical_frame" />
            <param name="depth_frame_id" value="/openni_depth_optical_frame" />
            <param name="depth_registration" value="true" />
            <param name="image_mode" value="2" />
            <param name="depth_mode" value="2" />
            <param name="debayering" value="0" />
            <param name="depth_time_offset" value="0" />
            <param name="image_time_offset" value="0" />
        </node>
</launch>


>
>
> Would you mind posting this same question on answers.ros.org to help
> people that will have the same problem in the future? I'll then attach
> my answer.
>
>
> Hope this helps.
>
> Wim
>
>
>
>
>
> On Fri, Jun 17, 2011 at 2:55 AM, fberga <[hidden email]> wrote:
>> Hi,
>> I have to merge pointclouds from two Kinect at runtime. To do so, I'm trying
>> to launch two openni_camera nodelets one for each Kinect. But there are some
>> problems.
>>
>> With openni_ros stack there wasn't any problem, the two nodelets did their
>> work. When I tried to move to the openni_kinect stack with openni_camera
>> stable, it gave this output
>>
>>
>>
>> [ INFO] [1308303787.775217888]: Loading nodelet /Kinect1 of type
>> openni_camera/OpenNINodelet to manager manager with the following
>> remappings:
>> [ INFO] [1308303787.778629897]: Loading nodelet /Rototranslation of type
>> viewer/ViewerNodelet to manager manager with the following remappings:
>> [ INFO] [1308303787.778699180]: /k1 -> /kinect2/rgb/points
>> [ INFO] [1308303787.778724068]: /k2 -> /kinect1/rgb/points
>> [ INFO] [1308303787.779804870]: Loading nodelet /Kinect2 of type
>> openni_camera/OpenNINodelet to manager manager with the following
>> remappings:
>> [ INFO] [1308303787.780761867]: waitForService: Service
>> [/manager/load_nodelet] has not been advertised, waiting...
>> [ INFO] [1308303787.796441331]: waitForService: Service
>> [/manager/load_nodelet] has not been advertised, waiting...
>> [ INFO] [1308303787.796842554]: waitForService: Service
>> [/manager/load_nodelet] has not been advertised, waiting...
>> [ INFO] [1308303787.801473335]: waitForService: Service
>> [/manager/load_nodelet] is now available.
>> [ INFO] [1308303787.817717034]: waitForService: Service
>> [/manager/load_nodelet] is now available.
>> [ INFO] [1308303787.817911634]: waitForService: Service
>> [/manager/load_nodelet] is now available.
>> [ INFO] [1308303791.121934776]: [/Kinect1] Number devices connected: 2
>> [ INFO] [1308303791.122159531]: [/Kinect1] 1. device on bus 001:26 is a Xbox
>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>> [ INFO] [1308303791.122209011]: [/Kinect1] 2. device on bus 001:18 is a Xbox
>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>> [ INFO] [1308303791.124482589]: [/Kinect1] searching for device with serial
>> number = A00364907959051A
>> [ INFO] [1308303791.163914404]: [/Kinect1] Opened 'Xbox NUI Camera' on bus
>> 1:18 with serial number 'A00364907959051A'
>> [ INFO] [1308303791.176684366]: rgb_frame_id = '/openni_rgb_optical_frame'
>> [ INFO] [1308303791.178508719]: depth_frame_id =
>> '/openni_depth_optical_frame'
>> terminate called after throwing an instance of
>> 'openni_wrapper::OpenNIException'
>>  what():  unsigned int openni_wrapper::OpenNIDriver::updateDeviceList() @
>> /tmp/buildd/ros-diamondback-openni-kinect-0.2.1/debian/ros-diamondback-openni-kinect/opt/ros/diamondback/stacks/openni_kinect/openni_camera/src/openni_driver.cpp
>> @ 120 : number of streams and devices does not match: 3 devices, 4 depth
>> streams, 4 image streams
>>
>>
>> So I moved to the openni_camera_unstable package and the output is the
>> following...
>>
>>
>> [ INFO] [1308302364.222578975]: [/Kinect1] Number devices connected: 2
>> [ INFO] [1308302364.222809829]: [/Kinect1] 1. device on bus 001:26 is a Xbox
>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>> [ INFO] [1308302364.222865906]: [/Kinect1] 2. device on bus 001:18 is a Xbox
>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>> [ INFO] [1308302364.225022445]: [/Kinect1] searching for device with serial
>> number = A00364907959051A
>> [ INFO] [1308302364.271140658]: [/Kinect1] Opened 'Xbox NUI Camera' on bus
>> 1:18 with serial number 'A00364907959051A'
>> [ INFO] [1308302364.298155716]: rgb_frame_id = '/openni_rgb_optical_frame'
>> [ INFO] [1308302364.299902851]: depth_frame_id =
>> '/openni_depth_optical_frame'
>> [ INFO] [1308302364.687453231]: [/Kinect2] Number devices connected: 5
>> [ INFO] [1308302364.687551458]: [/Kinect2] 1. device on bus 001:18 is a
>> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device2'
>> [ INFO] [1308302364.687602722]: [/Kinect2] 2. device on bus 001:18 is a
>> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device1'
>> [ INFO] [1308302364.687651620]: [/Kinect2] 3. device on bus 001:26 is a Xbox
>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>> [ INFO] [1308302364.687694939]: [/Kinect2] 4. device on bus 001:18 is a Xbox
>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>> [manager-2] process has died [pid 28786, exit code -11].
>> log files:
>> /home/iaslab/.ros/log/e221454c-98c2-11e0-8b63-782bcb97fb78/manager-2*.log
>>
>>
>>
>> When openni_device is initialized, two more virtual devices (the SensorV2
>> from PrimeSense devices) are instantiated in the same bus of the real one
>> and this seems to be a problem for the wrapper...
>>
>> What kind of problem could it be??
>>
>> Thanks in advance,
>> Filippo
>>
>> --
>> View this message in context: http://kinect-with-ros.976505.n3.nabble.com/Problem-launching-two-openni-camera-OpenNINodelet-with-two-Kinect-connected-tp3075599p3075599.html
>> Sent from the Kinect with ROS mailing list archive at Nabble.com.
>> _______________________________________________
>> Ros-kinect mailing list
>> [hidden email]
>> https://code.ros.org/mailman/listinfo/ros-kinect
>>
>
>
>
> --
> --
> Wim Meeussen
> Willow Garage Inc.
> <http://www.willowgarage.com)
> _______________________________________________
> Ros-kinect mailing list
> [hidden email]
> https://code.ros.org/mailman/listinfo/ros-kinect
>


Are there something wrong in my launch file?
Thanks a lot


--

Filippo Bergamin
_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect
Reply | Threaded
Open this post in threaded view
|

Re: [Ros-kinect] Problem launching two openni_camera/OpenNINodelet with two Kinect connected

fberga
In reply to this post by Suat Gedikli
Hi Suat,

2011/6/18 Suat Gedikli <[hidden email]>:
> Hi,
> are both devices on the same USB bus? If so, please connect them on
> different ones, since the bandwith is not enough to handle two kinects with
> two streams each.

No, they are in different bus!!



> -Suat
>
> On Fri, Jun 17, 2011 at 8:57 AM, Wim Meeussen <[hidden email]>
> wrote:
>>
>> Filippo,
>>
>> How are you bringing up the two cameras?  If you simply launch the
>> openni.launch file twice, things won't work because you will launch
>> the same nodes with the same names twice. You have to pass a camera
>> namespace argument to the launch file. For openni_camera_unstable,
>> this would look like:
>>
>> roslaunch openni_camera_unstable openni.launch camera:=kinect_1
>> roslaunch openni_camera_unstable openni.launch camera:=kinect_2
>>
>> Or, if you want to create your own launch file:
>>
>> <launch>
>>    <include file="$(find openni_camera_unstable)/launch/openni.launch">
>>       <arg name="camera" value="kinect_1" />
>>    </include>
>>
>>    <include file="$(find openni_camera_unstable)/launch/openni.launch">
>>       <arg name="camera" value="kinect_2" />
>>    </include>
>> </launch>
>>
>>
>>
>> Would you mind posting this same question on answers.ros.org to help
>> people that will have the same problem in the future? I'll then attach
>> my answer.
>>
>>
>> Hope this helps.
>>
>> Wim
>>
>>
>>
>>
>>
>> On Fri, Jun 17, 2011 at 2:55 AM, fberga <[hidden email]> wrote:
>> > Hi,
>> > I have to merge pointclouds from two Kinect at runtime. To do so, I'm
>> > trying
>> > to launch two openni_camera nodelets one for each Kinect. But there are
>> > some
>> > problems.
>> >
>> > With openni_ros stack there wasn't any problem, the two nodelets did
>> > their
>> > work. When I tried to move to the openni_kinect stack with openni_camera
>> > stable, it gave this output
>> >
>> >
>> >
>> > [ INFO] [1308303787.775217888]: Loading nodelet /Kinect1 of type
>> > openni_camera/OpenNINodelet to manager manager with the following
>> > remappings:
>> > [ INFO] [1308303787.778629897]: Loading nodelet /Rototranslation of type
>> > viewer/ViewerNodelet to manager manager with the following remappings:
>> > [ INFO] [1308303787.778699180]: /k1 -> /kinect2/rgb/points
>> > [ INFO] [1308303787.778724068]: /k2 -> /kinect1/rgb/points
>> > [ INFO] [1308303787.779804870]: Loading nodelet /Kinect2 of type
>> > openni_camera/OpenNINodelet to manager manager with the following
>> > remappings:
>> > [ INFO] [1308303787.780761867]: waitForService: Service
>> > [/manager/load_nodelet] has not been advertised, waiting...
>> > [ INFO] [1308303787.796441331]: waitForService: Service
>> > [/manager/load_nodelet] has not been advertised, waiting...
>> > [ INFO] [1308303787.796842554]: waitForService: Service
>> > [/manager/load_nodelet] has not been advertised, waiting...
>> > [ INFO] [1308303787.801473335]: waitForService: Service
>> > [/manager/load_nodelet] is now available.
>> > [ INFO] [1308303787.817717034]: waitForService: Service
>> > [/manager/load_nodelet] is now available.
>> > [ INFO] [1308303787.817911634]: waitForService: Service
>> > [/manager/load_nodelet] is now available.
>> > [ INFO] [1308303791.121934776]: [/Kinect1] Number devices connected: 2
>> > [ INFO] [1308303791.122159531]: [/Kinect1] 1. device on bus 001:26 is a
>> > Xbox
>> > NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>> > [ INFO] [1308303791.122209011]: [/Kinect1] 2. device on bus 001:18 is a
>> > Xbox
>> > NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>> > [ INFO] [1308303791.124482589]: [/Kinect1] searching for device with
>> > serial
>> > number = A00364907959051A
>> > [ INFO] [1308303791.163914404]: [/Kinect1] Opened 'Xbox NUI Camera' on
>> > bus
>> > 1:18 with serial number 'A00364907959051A'
>> > [ INFO] [1308303791.176684366]: rgb_frame_id =
>> > '/openni_rgb_optical_frame'
>> > [ INFO] [1308303791.178508719]: depth_frame_id =
>> > '/openni_depth_optical_frame'
>> > terminate called after throwing an instance of
>> > 'openni_wrapper::OpenNIException'
>> >  what():  unsigned int openni_wrapper::OpenNIDriver::updateDeviceList()
>> > @
>> >
>> > /tmp/buildd/ros-diamondback-openni-kinect-0.2.1/debian/ros-diamondback-openni-kinect/opt/ros/diamondback/stacks/openni_kinect/openni_camera/src/openni_driver.cpp
>> > @ 120 : number of streams and devices does not match: 3 devices, 4 depth
>> > streams, 4 image streams
>> >
>> >
>> > So I moved to the openni_camera_unstable package and the output is the
>> > following...
>> >
>> >
>> > [ INFO] [1308302364.222578975]: [/Kinect1] Number devices connected: 2
>> > [ INFO] [1308302364.222809829]: [/Kinect1] 1. device on bus 001:26 is a
>> > Xbox
>> > NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>> > [ INFO] [1308302364.222865906]: [/Kinect1] 2. device on bus 001:18 is a
>> > Xbox
>> > NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>> > [ INFO] [1308302364.225022445]: [/Kinect1] searching for device with
>> > serial
>> > number = A00364907959051A
>> > [ INFO] [1308302364.271140658]: [/Kinect1] Opened 'Xbox NUI Camera' on
>> > bus
>> > 1:18 with serial number 'A00364907959051A'
>> > [ INFO] [1308302364.298155716]: rgb_frame_id =
>> > '/openni_rgb_optical_frame'
>> > [ INFO] [1308302364.299902851]: depth_frame_id =
>> > '/openni_depth_optical_frame'
>> > [ INFO] [1308302364.687453231]: [/Kinect2] Number devices connected: 5
>> > [ INFO] [1308302364.687551458]: [/Kinect2] 1. device on bus 001:18 is a
>> > SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device2'
>> > [ INFO] [1308302364.687602722]: [/Kinect2] 2. device on bus 001:18 is a
>> > SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device1'
>> > [ INFO] [1308302364.687651620]: [/Kinect2] 3. device on bus 001:26 is a
>> > Xbox
>> > NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>> > [ INFO] [1308302364.687694939]: [/Kinect2] 4. device on bus 001:18 is a
>> > Xbox
>> > NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>> > [manager-2] process has died [pid 28786, exit code -11].
>> > log files:
>> >
>> > /home/iaslab/.ros/log/e221454c-98c2-11e0-8b63-782bcb97fb78/manager-2*.log
>> >
>> >
>> >
>> > When openni_device is initialized, two more virtual devices (the
>> > SensorV2
>> > from PrimeSense devices) are instantiated in the same bus of the real
>> > one
>> > and this seems to be a problem for the wrapper...
>> >
>> > What kind of problem could it be??
>> >
>> > Thanks in advance,
>> > Filippo
>> >
>> > --
>> > View this message in context:
>> > http://kinect-with-ros.976505.n3.nabble.com/Problem-launching-two-openni-camera-OpenNINodelet-with-two-Kinect-connected-tp3075599p3075599.html
>> > Sent from the Kinect with ROS mailing list archive at Nabble.com.
>> > _______________________________________________
>> > Ros-kinect mailing list
>> > [hidden email]
>> > https://code.ros.org/mailman/listinfo/ros-kinect
>> >
>>
>>
>>
>> --
>> --
>> Wim Meeussen
>> Willow Garage Inc.
>> <http://www.willowgarage.com)
>> _______________________________________________
>> Ros-kinect mailing list
>> [hidden email]
>> https://code.ros.org/mailman/listinfo/ros-kinect
>
>
> _______________________________________________
> Ros-kinect mailing list
> [hidden email]
> https://code.ros.org/mailman/listinfo/ros-kinect
>
>


Thanks

--

Filippo Bergamin
_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect
Reply | Threaded
Open this post in threaded view
|

Re: [Ros-kinect] Problem launching two openni_camera/OpenNINodelet with two Kinect connected

Wim Meeussen
In reply to this post by fberga
Filippo,

You are running both openni nodelets in the same manager.  I also
can't run this successfully. For some reason the openni driver does
not like to get instantiated twice in the same process. Maybe they use
global variables or so? Could you file a ticket for this problem on
<https://kforge.ros.org/openni/trac>?

Thanks,

Wim



On Sat, Jun 18, 2011 at 4:01 AM, Filippo Bergamin <[hidden email]> wrote:

> Hi Wim,
> thanks for your reply!!
>
> 2011/6/17 Wim Meeussen <[hidden email]>:
>> Filippo,
>>
>> How are you bringing up the two cameras?  If you simply launch the
>> openni.launch file twice, things won't work because you will launch
>> the same nodes with the same names twice. You have to pass a camera
>> namespace argument to the launch file. For openni_camera_unstable,
>> this would look like:
>>
>> roslaunch openni_camera_unstable openni.launch camera:=kinect_1
>> roslaunch openni_camera_unstable openni.launch camera:=kinect_2
>>
>> Or, if you want to create your own launch file:
>>
>> <launch>
>>    <include file="$(find openni_camera_unstable)/launch/openni.launch">
>>       <arg name="camera" value="kinect_1" />
>>    </include>
>>
>>    <include file="$(find openni_camera_unstable)/launch/openni.launch">
>>       <arg name="camera" value="kinect_2" />
>>    </include>
>> </launch>
>>
>
>  No, I'm not launching the openni.launch file twice. I'm trying to
> launch, in this manner, the two nodelets:
>
> <launch>
>        <node pkg="nodelet" type="nodelet" name="mng"  args="manager"
> output="screen"/>
>
>        <node pkg="nodelet" type="nodelet" name="Kinect1" args="load
> openni_camera/OpenNINodelet mng" output="screen">
>            <param name="device_id" value="A00364907959051A"/>
>            <remap from="camera" to="kinect1" />
>            <rosparam command="load" file="$(find
> Viewer)/info/k1/kinect_params.yaml" />
>            <param name="rgb_frame_id" value="/openni_rgb_optical_frame" />
>            <param name="depth_frame_id" value="/openni_depth_optical_frame" />
>            <param name="depth_registration" value="true" />
>            <param name="image_mode" value="2" />
>            <param name="depth_mode" value="2" />
>            <param name="debayering" value="0" />
>            <param name="depth_time_offset" value="0" />
>            <param name="image_time_offset" value="0" />
>        </node>
>
>        <node pkg="nodelet" type="nodelet" name="Kinect2" args="load
> openni_camera/OpenNINodelet mng" output="screen">
>            <param name="device_id" value="A00361810132047A"/>
>            <remap from="camera" to="kinect2" />
>            <rosparam command="load" file="$(find
> Viewer)/info/k2/kinect_params.yaml" />
>            <param name="rgb_frame_id" value="/openni_rgb_optical_frame" />
>            <param name="depth_frame_id" value="/openni_depth_optical_frame" />
>            <param name="depth_registration" value="true" />
>            <param name="image_mode" value="2" />
>            <param name="depth_mode" value="2" />
>            <param name="debayering" value="0" />
>            <param name="depth_time_offset" value="0" />
>            <param name="image_time_offset" value="0" />
>        </node>
> </launch>
>
>
>>
>>
>> Would you mind posting this same question on answers.ros.org to help
>> people that will have the same problem in the future? I'll then attach
>> my answer.
>>
>>
>> Hope this helps.
>>
>> Wim
>>
>>
>>
>>
>>
>> On Fri, Jun 17, 2011 at 2:55 AM, fberga <[hidden email]> wrote:
>>> Hi,
>>> I have to merge pointclouds from two Kinect at runtime. To do so, I'm trying
>>> to launch two openni_camera nodelets one for each Kinect. But there are some
>>> problems.
>>>
>>> With openni_ros stack there wasn't any problem, the two nodelets did their
>>> work. When I tried to move to the openni_kinect stack with openni_camera
>>> stable, it gave this output
>>>
>>>
>>>
>>> [ INFO] [1308303787.775217888]: Loading nodelet /Kinect1 of type
>>> openni_camera/OpenNINodelet to manager manager with the following
>>> remappings:
>>> [ INFO] [1308303787.778629897]: Loading nodelet /Rototranslation of type
>>> viewer/ViewerNodelet to manager manager with the following remappings:
>>> [ INFO] [1308303787.778699180]: /k1 -> /kinect2/rgb/points
>>> [ INFO] [1308303787.778724068]: /k2 -> /kinect1/rgb/points
>>> [ INFO] [1308303787.779804870]: Loading nodelet /Kinect2 of type
>>> openni_camera/OpenNINodelet to manager manager with the following
>>> remappings:
>>> [ INFO] [1308303787.780761867]: waitForService: Service
>>> [/manager/load_nodelet] has not been advertised, waiting...
>>> [ INFO] [1308303787.796441331]: waitForService: Service
>>> [/manager/load_nodelet] has not been advertised, waiting...
>>> [ INFO] [1308303787.796842554]: waitForService: Service
>>> [/manager/load_nodelet] has not been advertised, waiting...
>>> [ INFO] [1308303787.801473335]: waitForService: Service
>>> [/manager/load_nodelet] is now available.
>>> [ INFO] [1308303787.817717034]: waitForService: Service
>>> [/manager/load_nodelet] is now available.
>>> [ INFO] [1308303787.817911634]: waitForService: Service
>>> [/manager/load_nodelet] is now available.
>>> [ INFO] [1308303791.121934776]: [/Kinect1] Number devices connected: 2
>>> [ INFO] [1308303791.122159531]: [/Kinect1] 1. device on bus 001:26 is a Xbox
>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>>> [ INFO] [1308303791.122209011]: [/Kinect1] 2. device on bus 001:18 is a Xbox
>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>>> [ INFO] [1308303791.124482589]: [/Kinect1] searching for device with serial
>>> number = A00364907959051A
>>> [ INFO] [1308303791.163914404]: [/Kinect1] Opened 'Xbox NUI Camera' on bus
>>> 1:18 with serial number 'A00364907959051A'
>>> [ INFO] [1308303791.176684366]: rgb_frame_id = '/openni_rgb_optical_frame'
>>> [ INFO] [1308303791.178508719]: depth_frame_id =
>>> '/openni_depth_optical_frame'
>>> terminate called after throwing an instance of
>>> 'openni_wrapper::OpenNIException'
>>>  what():  unsigned int openni_wrapper::OpenNIDriver::updateDeviceList() @
>>> /tmp/buildd/ros-diamondback-openni-kinect-0.2.1/debian/ros-diamondback-openni-kinect/opt/ros/diamondback/stacks/openni_kinect/openni_camera/src/openni_driver.cpp
>>> @ 120 : number of streams and devices does not match: 3 devices, 4 depth
>>> streams, 4 image streams
>>>
>>>
>>> So I moved to the openni_camera_unstable package and the output is the
>>> following...
>>>
>>>
>>> [ INFO] [1308302364.222578975]: [/Kinect1] Number devices connected: 2
>>> [ INFO] [1308302364.222809829]: [/Kinect1] 1. device on bus 001:26 is a Xbox
>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>>> [ INFO] [1308302364.222865906]: [/Kinect1] 2. device on bus 001:18 is a Xbox
>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>>> [ INFO] [1308302364.225022445]: [/Kinect1] searching for device with serial
>>> number = A00364907959051A
>>> [ INFO] [1308302364.271140658]: [/Kinect1] Opened 'Xbox NUI Camera' on bus
>>> 1:18 with serial number 'A00364907959051A'
>>> [ INFO] [1308302364.298155716]: rgb_frame_id = '/openni_rgb_optical_frame'
>>> [ INFO] [1308302364.299902851]: depth_frame_id =
>>> '/openni_depth_optical_frame'
>>> [ INFO] [1308302364.687453231]: [/Kinect2] Number devices connected: 5
>>> [ INFO] [1308302364.687551458]: [/Kinect2] 1. device on bus 001:18 is a
>>> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device2'
>>> [ INFO] [1308302364.687602722]: [/Kinect2] 2. device on bus 001:18 is a
>>> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device1'
>>> [ INFO] [1308302364.687651620]: [/Kinect2] 3. device on bus 001:26 is a Xbox
>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>>> [ INFO] [1308302364.687694939]: [/Kinect2] 4. device on bus 001:18 is a Xbox
>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>>> [manager-2] process has died [pid 28786, exit code -11].
>>> log files:
>>> /home/iaslab/.ros/log/e221454c-98c2-11e0-8b63-782bcb97fb78/manager-2*.log
>>>
>>>
>>>
>>> When openni_device is initialized, two more virtual devices (the SensorV2
>>> from PrimeSense devices) are instantiated in the same bus of the real one
>>> and this seems to be a problem for the wrapper...
>>>
>>> What kind of problem could it be??
>>>
>>> Thanks in advance,
>>> Filippo
>>>
>>> --
>>> View this message in context: http://kinect-with-ros.976505.n3.nabble.com/Problem-launching-two-openni-camera-OpenNINodelet-with-two-Kinect-connected-tp3075599p3075599.html
>>> Sent from the Kinect with ROS mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Ros-kinect mailing list
>>> [hidden email]
>>> https://code.ros.org/mailman/listinfo/ros-kinect
>>>
>>
>>
>>
>> --
>> --
>> Wim Meeussen
>> Willow Garage Inc.
>> <http://www.willowgarage.com)
>> _______________________________________________
>> Ros-kinect mailing list
>> [hidden email]
>> https://code.ros.org/mailman/listinfo/ros-kinect
>>
>
>
> Are there something wrong in my launch file?
> Thanks a lot
>
>
> --
>
> Filippo Bergamin
> _______________________________________________
> Ros-kinect mailing list
> [hidden email]
> https://code.ros.org/mailman/listinfo/ros-kinect
>



--
--
Wim Meeussen
Willow Garage Inc.
<http://www.willowgarage.com)
_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect
Reply | Threaded
Open this post in threaded view
|

Re: [Ros-kinect] Problem launching two openni_camera/OpenNINodelet with two Kinect connected

fberga
Hi Wim,
thanks so much for the reply.

Me too I thought it was a problem of the drivers... So I followed your
example of launcher and I wrote this one:

        <include file="$(find openni_camera_unstable)/launch/openni.launch">
                <arg name="camera" value="kinect1" />
                <arg name="device_id" value="A00364907959051A"/>
                <arg name="rgb_calibration" value="$(find
Viewer)/info/k1/calibration_rgb.yaml" />
                <arg name="depth_calibration" value="$(find
Viewer)/info/k1/calibration_depth.yaml" />
          <arg name="rgb_frame_id"   value="/rgb_optical_frame" />
  <arg name="depth_frame_id" value="/rgb_optical_frame" />
        </include>

        <include file="$(find openni_camera_unstable)/launch/openni.launch">
                <arg name="camera" value="kinect2" />
                <arg name="device_id" value="A00361810132047A"/>
                <arg name="rgb_calibration" value="$(find
Viewer)/info/k2/calibration_rgb.yaml" />
                <arg name="depth_calibration" value="$(find
Viewer)/info/k2/calibration_depth.yaml" />
                <arg name="rgb_frame_id"   value="/rgb_optical_frame" />
  <arg name="depth_frame_id" value="/rgb_optical_frame" />
        </include>

        <node pkg="nodelet" type="nodelet" name="mng"  args="manager"
output="screen"/>
        <node pkg="nodelet" type="nodelet" name="Rototranslation"
args="load viewer/ViewerNodelet mng" output="screen">
                <remap from="/k1" to="/kinect2/depth/points" />
                <remap from="/k2" to="/kinect1/depth/points" />
                <rosparam command="load" file="$(find
Viewer)/info/stereo/stereo_params.yaml" />
        </node>

My package is called Viewer, and simply capture the two pointclouds
which, after a roto-translation, are merged and republished. But there
are some other problems with the kinect1(or
kinect2)/depth_registered/points topic. I couldn't capture data from
this topic while from kinect1(or kinect2)/depth/points yes (although
with many crashes).

In any case, some error messages are given in output. They are similar
to this one:

[ERROR] [1308747626.000815175]: Tried to advertise a service that is
already advertised in this node
[/kinect1/depth_registered/image_rect_raw/compressed/set_parameters]

But I don't think this is a problem.

What could it be? Why can't I see the flows of depth_registered??

Thanks again
Filippo



2011/6/20 Wim Meeussen [via Kinect with ROS]
<[hidden email]>:

> Filippo,
>
> You are running both openni nodelets in the same manager.  I also
> can't run this successfully. For some reason the openni driver does
> not like to get instantiated twice in the same process. Maybe they use
> global variables or so? Could you file a ticket for this problem on
> <https://kforge.ros.org/openni/trac>?
>
> Thanks,
>
> Wim
>
>
>
> On Sat, Jun 18, 2011 at 4:01 AM, Filippo Bergamin <[hidden email]> wrote:
>> Hi Wim,
>> thanks for your reply!!
>>
>> 2011/6/17 Wim Meeussen <[hidden email]>:
>>> Filippo,
>>>
>>> How are you bringing up the two cameras?  If you simply launch the
>>> openni.launch file twice, things won't work because you will launch
>>> the same nodes with the same names twice. You have to pass a camera
>>> namespace argument to the launch file. For openni_camera_unstable,
>>> this would look like:
>>>
>>> roslaunch openni_camera_unstable openni.launch camera:=kinect_1
>>> roslaunch openni_camera_unstable openni.launch camera:=kinect_2
>>>
>>> Or, if you want to create your own launch file:
>>>
>>> <launch>
>>>    <include file="$(find openni_camera_unstable)/launch/openni.launch">
>>>       <arg name="camera" value="kinect_1" />
>>>    </include>
>>>
>>>    <include file="$(find openni_camera_unstable)/launch/openni.launch">
>>>       <arg name="camera" value="kinect_2" />
>>>    </include>
>>> </launch>
>>>
>>
>>  No, I'm not launching the openni.launch file twice. I'm trying to
>> launch, in this manner, the two nodelets:
>>
>> <launch>
>>        <node pkg="nodelet" type="nodelet" name="mng"  args="manager"
>> output="screen"/>
>>
>>        <node pkg="nodelet" type="nodelet" name="Kinect1" args="load
>> openni_camera/OpenNINodelet mng" output="screen">
>>            <param name="device_id" value="A00364907959051A"/>
>>            <remap from="camera" to="kinect1" />
>>            <rosparam command="load" file="$(find
>> Viewer)/info/k1/kinect_params.yaml" />
>>            <param name="rgb_frame_id" value="/openni_rgb_optical_frame" />
>>            <param name="depth_frame_id"
>> value="/openni_depth_optical_frame" />
>>            <param name="depth_registration" value="true" />
>>            <param name="image_mode" value="2" />
>>            <param name="depth_mode" value="2" />
>>            <param name="debayering" value="0" />
>>            <param name="depth_time_offset" value="0" />
>>            <param name="image_time_offset" value="0" />
>>        </node>
>>
>>        <node pkg="nodelet" type="nodelet" name="Kinect2" args="load
>> openni_camera/OpenNINodelet mng" output="screen">
>>            <param name="device_id" value="A00361810132047A"/>
>>            <remap from="camera" to="kinect2" />
>>            <rosparam command="load" file="$(find
>> Viewer)/info/k2/kinect_params.yaml" />
>>            <param name="rgb_frame_id" value="/openni_rgb_optical_frame" />
>>            <param name="depth_frame_id"
>> value="/openni_depth_optical_frame" />
>>            <param name="depth_registration" value="true" />
>>            <param name="image_mode" value="2" />
>>            <param name="depth_mode" value="2" />
>>            <param name="debayering" value="0" />
>>            <param name="depth_time_offset" value="0" />
>>            <param name="image_time_offset" value="0" />
>>        </node>
>> </launch>
>>
>>
>>>
>>>
>>> Would you mind posting this same question on answers.ros.org to help
>>> people that will have the same problem in the future? I'll then attach
>>> my answer.
>>>
>>>
>>> Hope this helps.
>>>
>>> Wim
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Jun 17, 2011 at 2:55 AM, fberga <[hidden email]> wrote:
>>>> Hi,
>>>> I have to merge pointclouds from two Kinect at runtime. To do so, I'm
>>>> trying
>>>> to launch two openni_camera nodelets one for each Kinect. But there are
>>>> some
>>>> problems.
>>>>
>>>> With openni_ros stack there wasn't any problem, the two nodelets did
>>>> their
>>>> work. When I tried to move to the openni_kinect stack with openni_camera
>>>> stable, it gave this output
>>>>
>>>>
>>>>
>>>> [ INFO] [1308303787.775217888]: Loading nodelet /Kinect1 of type
>>>> openni_camera/OpenNINodelet to manager manager with the following
>>>> remappings:
>>>> [ INFO] [1308303787.778629897]: Loading nodelet /Rototranslation of type
>>>> viewer/ViewerNodelet to manager manager with the following remappings:
>>>> [ INFO] [1308303787.778699180]: /k1 -> /kinect2/rgb/points
>>>> [ INFO] [1308303787.778724068]: /k2 -> /kinect1/rgb/points
>>>> [ INFO] [1308303787.779804870]: Loading nodelet /Kinect2 of type
>>>> openni_camera/OpenNINodelet to manager manager with the following
>>>> remappings:
>>>> [ INFO] [1308303787.780761867]: waitForService: Service
>>>> [/manager/load_nodelet] has not been advertised, waiting...
>>>> [ INFO] [1308303787.796441331]: waitForService: Service
>>>> [/manager/load_nodelet] has not been advertised, waiting...
>>>> [ INFO] [1308303787.796842554]: waitForService: Service
>>>> [/manager/load_nodelet] has not been advertised, waiting...
>>>> [ INFO] [1308303787.801473335]: waitForService: Service
>>>> [/manager/load_nodelet] is now available.
>>>> [ INFO] [1308303787.817717034]: waitForService: Service
>>>> [/manager/load_nodelet] is now available.
>>>> [ INFO] [1308303787.817911634]: waitForService: Service
>>>> [/manager/load_nodelet] is now available.
>>>> [ INFO] [1308303791.121934776]: [/Kinect1] Number devices connected: 2
>>>> [ INFO] [1308303791.122159531]: [/Kinect1] 1. device on bus 001:26 is a
>>>> Xbox
>>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>>>> [ INFO] [1308303791.122209011]: [/Kinect1] 2. device on bus 001:18 is a
>>>> Xbox
>>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>>>> [ INFO] [1308303791.124482589]: [/Kinect1] searching for device with
>>>> serial
>>>> number = A00364907959051A
>>>> [ INFO] [1308303791.163914404]: [/Kinect1] Opened 'Xbox NUI Camera' on
>>>> bus
>>>> 1:18 with serial number 'A00364907959051A'
>>>> [ INFO] [1308303791.176684366]: rgb_frame_id =
>>>> '/openni_rgb_optical_frame'
>>>> [ INFO] [1308303791.178508719]: depth_frame_id =
>>>> '/openni_depth_optical_frame'
>>>> terminate called after throwing an instance of
>>>> 'openni_wrapper::OpenNIException'
>>>>  what():  unsigned int openni_wrapper::OpenNIDriver::updateDeviceList()
>>>> @
>>>>
>>>> /tmp/buildd/ros-diamondback-openni-kinect-0.2.1/debian/ros-diamondback-openni-kinect/opt/ros/diamondback/stacks/openni_kinect/openni_camera/src/openni_driver.cpp
>>>> @ 120 : number of streams and devices does not match: 3 devices, 4 depth
>>>> streams, 4 image streams
>>>>
>>>>
>>>> So I moved to the openni_camera_unstable package and the output is the
>>>> following...
>>>>
>>>>
>>>> [ INFO] [1308302364.222578975]: [/Kinect1] Number devices connected: 2
>>>> [ INFO] [1308302364.222809829]: [/Kinect1] 1. device on bus 001:26 is a
>>>> Xbox
>>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>>>> [ INFO] [1308302364.222865906]: [/Kinect1] 2. device on bus 001:18 is a
>>>> Xbox
>>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>>>> [ INFO] [1308302364.225022445]: [/Kinect1] searching for device with
>>>> serial
>>>> number = A00364907959051A
>>>> [ INFO] [1308302364.271140658]: [/Kinect1] Opened 'Xbox NUI Camera' on
>>>> bus
>>>> 1:18 with serial number 'A00364907959051A'
>>>> [ INFO] [1308302364.298155716]: rgb_frame_id =
>>>> '/openni_rgb_optical_frame'
>>>> [ INFO] [1308302364.299902851]: depth_frame_id =
>>>> '/openni_depth_optical_frame'
>>>> [ INFO] [1308302364.687453231]: [/Kinect2] Number devices connected: 5
>>>> [ INFO] [1308302364.687551458]: [/Kinect2] 1. device on bus 001:18 is a
>>>> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device2'
>>>> [ INFO] [1308302364.687602722]: [/Kinect2] 2. device on bus 001:18 is a
>>>> SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device1'
>>>> [ INFO] [1308302364.687651620]: [/Kinect2] 3. device on bus 001:26 is a
>>>> Xbox
>>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'
>>>> [ INFO] [1308302364.687694939]: [/Kinect2] 4. device on bus 001:18 is a
>>>> Xbox
>>>> NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'
>>>> [manager-2] process has died [pid 28786, exit code -11].
>>>> log files:
>>>>
>>>> /home/iaslab/.ros/log/e221454c-98c2-11e0-8b63-782bcb97fb78/manager-2*.log
>>>>
>>>>
>>>>
>>>> When openni_device is initialized, two more virtual devices (the
>>>> SensorV2
>>>> from PrimeSense devices) are instantiated in the same bus of the real
>>>> one
>>>> and this seems to be a problem for the wrapper...
>>>>
>>>> What kind of problem could it be??
>>>>
>>>> Thanks in advance,
>>>> Filippo
>>>>
>>>> --
>>>> View this message in context:
>>>> http://kinect-with-ros.976505.n3.nabble.com/Problem-launching-two-openni-camera-OpenNINodelet-with-two-Kinect-connected-tp3075599p3075599.html
>>>> Sent from the Kinect with ROS mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> Ros-kinect mailing list
>>>> [hidden email]
>>>> https://code.ros.org/mailman/listinfo/ros-kinect
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Wim Meeussen
>>> Willow Garage Inc.
>>> <http://www.willowgarage.com)
>>> _______________________________________________
>>> Ros-kinect mailing list
>>> [hidden email]
>>> https://code.ros.org/mailman/listinfo/ros-kinect
>>>
>>
>>
>> Are there something wrong in my launch file?
>> Thanks a lot
>>
>>
>> --
>>
>> Filippo Bergamin
>> _______________________________________________
>> Ros-kinect mailing list
>> [hidden email]
>> https://code.ros.org/mailman/listinfo/ros-kinect
>>
>
>
> --
> --
> Wim Meeussen
> Willow Garage Inc.
> <http://www.willowgarage.com)
> _______________________________________________
> Ros-kinect mailing list
> [hidden email]
> https://code.ros.org/mailman/listinfo/ros-kinect
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://kinect-with-ros.976505.n3.nabble.com/Problem-launching-two-openni-camera-OpenNINodelet-with-two-Kinect-connected-tp3075599p3087191.html
> To unsubscribe from Problem launching two openni_camera/OpenNINodelet with
> two Kinect connected, click here.



--

Filippo Bergamin