Giter VIP home page Giter VIP logo

Comments (6)

sgorsten avatar sgorsten commented on May 9, 2024

This is a somewhat tricky issue. The behavior of rs_wait_for_frames(...) is to block until a coherent frameset is available. However, there are also a class of hardware errors which prevent further streaming and which are only portably detectable by the fact that new frames stop arriving over the UVC connection, so rs_wait_for_frames(...) is also responsible for detecting this scenario and raising an error in that case.

The timing and synchronization code is due for a bit of an overhaul, though, and if there's interest, we could add a second method (rs_check_for_frames(...), perhaps?) with a user specifiable timeout and a return value to indicate if new data is available.

As an aside, if you have a use case that seems to be frequently triggering the timeout, please open it as a second issue, and we'll see if we can do something to improve the reliability of streaming for that use case.

from librealsense.

lukier avatar lukier commented on May 9, 2024

I thought it might be tricky with multiple streams from multiple devices (/dev/videoX) etc.

I was mostly worried about while(true) loops in wait_all_streams consuming CPU core looping, either until next frame (15-30 ms) or in error condition until 5 second timeout, but it seems not that bad - I suppose thanks to the atomics in triple_buffer.

BTW are the sensors (RGB/Depth) in F200/R200 hardware synchronized? Either by sharing pixel clock or exposure timestamped to a common HW timer? I see something related in stream_buffer::frame::timestamp so I was hopeful that the cameras have proper timing, not like Kinect with two separate free running sensors.

from librealsense.

ddiakopoulos avatar ddiakopoulos commented on May 9, 2024

Both F200 and R200 have internal sync mechanism to trigger the sensors on a common clock. These are exposed to software via frame-counters, and we provide matched frame sets in librealsense. The SR300 has a revised timing architecture (via frame metadata in the UVC protocol) that provides additional timing information, and we'll expose that as a feature when SR300 reaches general availability.

from librealsense.

lukier avatar lukier commented on May 9, 2024

Awesome, that's proper camera engineering right there :) If only these cameras had GPIO trigger in/out to synchronize other things as well (think IMU, robot's odometry etc).

from librealsense.

floe avatar floe commented on May 9, 2024

๐Ÿ‘ for trigger I/O (or at least for a hint on where to solder :-)

from librealsense.

muzafferkal avatar muzafferkal commented on May 9, 2024

Trigger IO would be awesome; please?

from librealsense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.