Giter Site home page Giter Site logo

Time stamp on images incorrect about o3d3xx-ros HOT 7 OPEN

ifm avatar ifm commented on August 21, 2024
Time stamp on images incorrect

from o3d3xx-ros.

Comments (7)

shaun-edwards avatar shaun-edwards commented on August 21, 2024

FYI @GarrettPlace.

from o3d3xx-ros.

tpanzarella avatar tpanzarella commented on August 21, 2024

How accurate and granular do you need this to be Shaun? The camera sends back a time stamp (seconds + nanoseconds) for each image chunk header. So, each individual image in your configured PCIC schema will have a stamp from the camera. However, the camera clock will not be synchronized with the host clock. So, for ultimate accuracy and granularity, 1) a homebrew clock sync scheme would need to be implemented by the driver and 2) a stamp for each image type in the image buffer would need to be kept. The latter is necessary to generalize to the cases for when you dynamically change the PCIC schema you are streaming back from the camera yet reusing the same ImageBuffer.

You are correct in your statement that there is some latency between when the image was actually acquired and how we are stamping it in the ROS code. To get a sense of the calculations you need to contemplate to estimate the true latency, this comment may be helpful.

Realize that since the ROS interface is calling the underlying driver's WaitForFrame, the latency between when the bytes are received by the host and when they are stamped by the ROS code should be minimal -- albeit, I have not measured it, so cannot comment other than qualitatively at the moment.

from o3d3xx-ros.

shaun-edwards avatar shaun-edwards commented on August 21, 2024

I understand 1), does the sensor interface have a way to get the current sensor clock? 2) is a little bit above my head since I haven't dug into the driver details, but I'll take your word for it.

Other camera drivers assume a one frame latency or allow the user to set the latency (via ROS parameter). Would you consider this solution, which I admit is a little bit hacky. The Windows software provides a good estimate of the latency (if you assume one frame).

My use case involves syncing an external 2D camera via the time stamp. I notices that the 2D and 3D images didn't quite match up.

from o3d3xx-ros.

tpanzarella avatar tpanzarella commented on August 21, 2024

I think I'd be more apt to try to get the time stamp as close to correct as possible. My constraint right now will be finding the time to implement this.

In the meantime, if you wanted to fork and do the ROS parameter thing, I'd be happy to take a look at a diff to see if it is reasonable to mainline (i.e., we can default the behavior to work as it does today, but if you wanted this extra knob to turn for special cases like yours, it is available to you).

from o3d3xx-ros.

graugans avatar graugans commented on August 21, 2024

We'll having a NTP feature for the upcoming firmware releases. Maybe this can solve your issue @shaun-edwards with the upcoming firmware you'll able to adjust the camera time by an XML-RPC call. Which maybe needs to be repeated in an regular intervall due to the different drifts of the time sources in your system. I have no idea when and how this could be integrated into the ROS driver.

from o3d3xx-ros.

tpanzarella avatar tpanzarella commented on August 21, 2024

from o3d3xx-ros.

graugans avatar graugans commented on August 21, 2024

@tpanzarella yes it is intended to be consistent across all cameras. I have to check the details and give some examples. Have to kick out a software release for the 2D cameras first.

from o3d3xx-ros.

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.