lagadic / vision_visp

ViSP stack for ROS
http://wiki.ros.org/vision_visp
GNU General Public License v2.0
181 stars 88 forks source link

howto run with kinect one (V2) as camera stream ? #51

Closed flobotics closed 7 years ago

flobotics commented 8 years ago

hi, i want to use kinect one (V2) camera stream and camera_info for visp_auto_tracker, but dont know right howto do it.

if some more infos needed i will provide them

fspindle commented 8 years ago

Try the following

  <!-- Launch visp_auto_tracker node -->
  <node pkg="visp_auto_tracker" type="visp_auto_tracker" name="visp_auto_tracker" output="screen">
    <param name="model_path" value="$(find visp_auto_tracker)/models" />
    <param name="model_name" value="pattern" />
    <param name="debug_display" value="True" />

    <remap from="/visp_auto_tracker/camera_info" to="/kinect2/hd/camera_info"/>
    <remap from="/visp_auto_tracker/image_raw" to="/kinect2/hd/image_mono"/>
  </node>
flobotics commented 8 years ago

thanks, that works.

but,

thanks

fspindle commented 8 years ago

Sounds not clear to me. Could you send me a video

flobotics commented 8 years ago

https://www.youtube.com/watch?v=5xYyCqz5Ruc
the resizing-thing is around 1:13

why does it not recognize the qr-code correct?

fspindle commented 8 years ago

1/ The QR code should be large enough in the image to get a valid detection. 2/ The complete target (QRcode + black square) is not well printed. It should be in the middle of the paper with enough white border arround the external black. With your printing, one side of the black border is cutted. Black region should be square nor rectangle as yours.

flobotics commented 8 years ago

oh, my printer did not correctly printed it in the middle. i printed it new and here is the result https://www.youtube.com/watch?v=2WJsd6y7dTo

thanks for help

fspindle commented 8 years ago

1/ It will be worse if the QRcode is smaller. I notice that detection works better if the target is parallel to the image plane. If you want to detect the target when you are far, the only way I see is to print a larger target (just apply a scale to qrcode + back square)

2/ Your framerate is to low. That's why once a detection is valid, the tracking initialised from the detection fails after few images when you apply a displacement to the target. Find a way to acquire at least at 20/30 Hz. If not possible, you could try to increase the range in models/pattern.xml, but not sure it will be enough:

    <range>
        <tracking>15</tracking>
    </range>
flobotics commented 8 years ago

the qr-code even needs to be bigger? oh, thats not working for me, perhaps i must test the model-based tracking, because in the online videos they track a tea-pack, which is a little smaller than my qr-code. i would like to track a cube of 2x2 cm

fspindle commented 7 years ago

Closed since the initial issue seems fixed