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

Convert pcl::PointCloud or sensor_msgs::PointCloud2 to Zivid::PointCloud #73

Open
Levaru opened this issue Jul 19, 2022 · 1 comment
Open

Comments

@Levaru
Copy link

Levaru commented Jul 19, 2022

I'm currently writing a handeye calibration program using your cpp example. But I would like to use your ros driver package instead of interfacing with the camera directly inside my program.

The calibration requires the Zivid::PointCloud type but your service will of course return a sensor_msgs::PointCloud2 type. What would be the best way to convert it back into the Zivid format?

@apartridge
Copy link
Collaborator

apartridge commented Sep 3, 2022

Hi @Levaru. Sorry for the late response. Currently we don't have any way to convert from sensor_msgs::PointCloud2 to Zivid::PointCloud. The Zivid ROS driver is not really designed to be used together with the C++ API at the same time. I am not sure how well this will work in practice. Unfortunately we also do not have hand-eye calibration support in our ROS driver directly.

However we have an open PR (#68) which will allow you to use the ROS driver to capture and save to a .zdf file on disk, that you can then load again into a Zivid::Frame and then you can call frame.pointCloud(). This PR has been on hold for a while, but we will get it finished soon and then merged.

If the capture_and_save solution does not work for you, I think you might need to have the calibration be done in a separate process independent of the ROS driver, and then only after hand-eye calibration you use the Zivid ROS driver for normal operation.

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

No branches or pull requests

2 participants