OpenPTrack / open_ptrack_v2

OPT v2 "Gnocchi" - adding object tracking and pose recognition
BSD 3-Clause "New" or "Revised" License
220 stars 65 forks source link

3rd camera dies during multi-camera pose tracking #132

Open muella91 opened 4 years ago

muella91 commented 4 years ago

Hello,

When I try to do multi-camera pose tracking, my third camera always dies. At first I thought it was because the camera is broken (loose contact or something similar). But now this also happens with another camera which is also connected to another computer system.

Thats the error on the sensor node computer:

[ INFO] [1586352821.870572177]: [Kinect2Bridge::callbackStatus] no clients connected. stopping device...
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
**[rtpose_neo-10] process has died [pid 1365, exit code -6, cmd /root/workspace/ros/devel/lib/rtpose_wrapper/rtpose /detector/skeletons:=/detector/skeletons /detector/skeleton_image:=/neo/skeleton_image /detector/skeletons_depth_image:=/neo/skeleton_depth_image __name:=rtpose_neo __log:=/root/.ros/log/fad351ba-799c-11ea-a4dc-4ccc6ade50f6/rtpose_neo-10.log].
log file: /root/.ros/log/fad351ba-799c-11ea-a4dc-4ccc6ade50f6/rtpose_neo-10*.log**
[rtpose_neo-10] restarting process

If I tried to read the log file, but if I open the log folder /root/.ros/log/fad351ba-799c-11ea-a4dc-4ccc6ade50f6/ , there is no rtpose_neo-10*.log** file. Neither in the other folders.

When the camera dies, also RVIZ viewer on the master dies. Thats the error on the master:

[ INFO] [1586354315.413771278]: is not validated and > sec_fake 0
Track 1 DELETED
sizeof(poses):32
[rviz-13] process has died [pid 10044, exit code -6, cmd /opt/ros/kinetic/lib/rviz/rviz -d /root/workspace/ros/src/open_ptrack/tracking/conf/MultiCameraTracking.rviz __name:=rviz __log:=/root/.ros/log/946f10ae-79a0-11ea-81ca-4ccc6ade50f6/rviz-13.log].
log file: /root/.ros/log/946f10ae-79a0-11ea-81ca-4ccc6ade50f6/rviz-13*.log
sizeof(poses):32
Track 2 VALIDATED

There is only a rviz-13-stdout.log file, which contains only default logs (like complied against QT, ... etc)

Of course I started the system several times. But it always dies when it comes to tracking with 3 cameras. By the way, multi-camera calibrations works so far with three cameras.

I have already done several times multi-camera pose tracking with two cameras, never had a problem there.

Do you had this problem before?

Thank you!

MikoyChinese commented 4 years ago

For Kinect, one PC only can transfer 1 Kinect data, because the usb bandwidth is not enough. If you want to connect more than 2 Kinect device, please visit the github libfreenect2 website to find answer.

And if you connect each Kinect for each PC, you need to ensure the Kinects can open by libfreenect bin. And if it's no problem, you maybe try to find the camera name about every launch file you run, make sure all Kinects have own unique camera name in launch file.

muella91 commented 4 years ago

Thank you for your answer.

<?xml version="1.0"?>
<!-- SESSION ID: 1586417290 -->
<launch>

  <arg name="enable_people_tracking" default="true" />
  <arg name="enable_pose" default="true" />
  <arg name="enable_object" default="true" />
  <arg name="sensor_name" default="morpheus" />

  <!-- true  = Munaro Based OPT Detection -->
  <!-- false = YOLO Based Detection (Must Have YOLO installed to use)-->
  <arg name="munaro_detection_enabled"         default="true" />

  <!-- Launch the sensor -->
  <include file="$(find kinect2_bridge)/launch/kinect2_bridge_ir.launch">
    <arg name="sensor_name"         value="$(arg sensor_name)" />
    <arg name="publish_frame"       value="true" />
  </include>

  <!-- Detection node -->
  <group if="$(arg enable_people_tracking)" >
      <group if="$(arg munaro_detection_enabled)">
          <include file="$(find detection)/launch/detector_kinect2.launch">
            <arg name="rgb_camera_info_url"     value="file://$(find opt_calibration)/camera_info/rgb_$(arg sensor_name).yaml" />
              <arg name="sensor_name"             value="$(arg sensor_name)" />
              <arg name="ground_from_calibration" value="true" />
          </include>
      </group>
      <group unless="$(arg munaro_detection_enabled)" >
            <include file="$(find yolo_detector)/launch/detector_yolo_kinect.launch">
                <arg name="sensor_name"             value="$(arg sensor_name)" />
                <arg name="standalone"              value="false" />
            </include>
      </group>
  </group>

  <!-- Skeleton Detection node -->
  <group if="$(arg enable_pose)">
    <include file="$(find detection)/launch/skeleton_detector.launch">
      <arg name="sensor_name"             value="$(arg sensor_name)" />
      <arg name="ground_from_calibration" value="true" />
    </include>

  </group>

  <!-- Object Detection node -->
  <group if="$(arg enable_object)">
    <include file="$(find yolo_detector)/launch/detect_yolo_object_kinect_network.launch">
      <arg name="sensor_name"             value="$(arg sensor_name)" />
    </include>

  </group>

</launch>

I appreciate you help and I am open for any others suggestions.

MikoyChinese commented 4 years ago

Ok, then you need to find the problem step by step.

Firstly, you chang you launch file and turn off enable_people_tracking, enable_pose, enable_object. And launch it again, then you should get the original ros Kinect message. And you run the cmd rostopic list on your terminal which will show you all ros topics published. Find your Kinect topic and run rostopic echo <kinect_topic_name> to check it available.

Secondly, if your all kinect devices can echo the topic message no problem, you can turn on tracking, pose, object one by one. Check which step will break your program. Then I will try to solve your problem.

Have a good luck.