Taking Depth images in certain times slots
Hi,
I want to run an experiment with D435. I want to know wether it is possible to set the camera to take pictures every 3 minutes? How can I set that? Is there any timestamp for each photo?
Thanks,
-
This is a tricky question. One approach would be to use a sleep timer in ROS:
https://answers.ros.org/question/233331/timesleep-in-a-node/
Another approach would be to put the camera thread to sleep for a certain amount of milliseconds with an instruction like the one below.
this_thread::sleep_for(std::chrono::milliseconds(x))
Where 'x' should be substituted for the value in milliseconds that you want the camera to sleep for.
It can be used in a 'while loop' that determines when the camera thread is allowed to sleep. Example:
while (!frameArrived) { std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::cout << "Waiting for depth frame" << std::endl; }
Please sign in to leave a comment.
Comments
1 comment