Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indigo onCalibrateTopic: stuck in infinite loop #4

Open
AndyZe opened this issue Mar 29, 2017 · 2 comments
Open

Indigo onCalibrateTopic: stuck in infinite loop #4

AndyZe opened this issue Mar 29, 2017 · 2 comments

Comments

@AndyZe
Copy link

AndyZe commented Mar 29, 2017

I'm getting stuck in this while loop of node.cpp:

    sync.registerCallback(boost::bind(&synchronizationCallback, boost::ref(promise), _1, _2));

    // Run a background spinner for the callback queue.
    ros::AsyncSpinner spinner(1, &queue);
    spinner.start();

    ROS_INFO_STREAM("Done creating background spinner.");

    while (true) {  **<== I get stuck here**
    if (!node_handle.ok()) return false;
    if (future.wait_for(boost::chrono::milliseconds(100)) == boost::future_status::ready) break;
    }
    ROS_INFO_STREAM("Done waiting for the future.");

The synchronizationCallback is never called. I think this means the node is not receiving the cloud_topic and image_topic messages, but I've double-checked that the camera_pose_calibration node is subscribed correctly and the camera topics are active. I have a fork of the repo here if you want to see exactly what my service client looks like.

@de-vri-es
Copy link
Contributor

de-vri-es commented Mar 29, 2017

My best guess is that the synchronization callback is never called, presumably because the synchronizer fails to find a point cloud and a color (or grayscale) image with close enough timestamps. Are your point clouds and color images being published with different timestamps?

In any case, it probably means we should switch to a policy based synchronizer [1] and expose the parameters. Maybe we should even allow disabling synchronization completely for static scenes.

[1] http://wiki.ros.org/message_filters#Policy-Based_Synchronizer_.5BROS_1.1.2B-.5D

@tassos
Copy link
Contributor

tassos commented Sep 6, 2019

I am sorry for necromancing this thread, but if you are still interested, I can confirm that your implementation for allowing approximate synchronisation does not work.

I had the same issue as @AndyZe , and after going through the code for a couple of hours, I realised it's a synchronisation issue. It seems that even if the timestamps are slightly different, the calibration method is stuck in an infinite loop.

I did solve the issue by using an ApproximateTime policy, but I did not implement it in a flexible way to allow different policies without changing the code.

tassos@380f90a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants