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

Transformation on point cloud throws an error #409

Closed
dhuettig opened this issue Oct 19, 2020 · 3 comments
Closed

Transformation on point cloud throws an error #409

dhuettig opened this issue Oct 19, 2020 · 3 comments

Comments

@dhuettig
Copy link

Hi,
I'm using the provided example code to test a transformation on a point cloud but I get the runtime error Bus error: 10. I'm using the same file examples/data/car_cloud400.csv as in the example description.

I had to change the line rigidTrans = PM::get().REG(Transformation).create("RigidTransformation"); to rigidTrans = PM::get().REG(Transformation).create("RigidTransformation").get();, otherwise the compiler throws the following error:

error: assigning to 'PM::Transformation *' from incompatible type 'std::shared_ptr<Transformation>'
        rigidTrans = PM::get().REG(Transformation).create("RigidTransformation");
@pomerlef
Copy link
Collaborator

@AlexandreG87 or @simonpierredeschenes is that caused by the latest change for shared pointers?

@dhuettig The correction is only to change to code example? If that is the case 5a72892 should resolve the issue.

@aguenette
Copy link
Member

@pomerlef It seems that the example code in the documentation hasn't be updated when @simonpierredeschenes change the raw pointers to shared pointers in this PR #284. So, for now, I suggest @dhuettig to change PM::Transformation* to std::shared_ptr<PM::Transformation> instead.

I'll fix the doc and submit a PR.

@dhuettig
Copy link
Author

Thank you for the replies.

@pomerlef using PM::get().REG(Transformation).create("RigidTransformation").get(); doesn't resolve the issue since then the compiler throws a bus error 10.

@AlexandreG87 using std::shared_ptr<PM::Transformation> worked and the transformation can be applied.

pomerlef added a commit that referenced this issue Oct 19, 2020
Fixed the differences between examples and documentation (#409)
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

No branches or pull requests

3 participants