-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add likelihood field 3d model version #440
base: main
Are you sure you want to change the base?
Conversation
Added a ROS point cloud interface for float data type and it respective testcase Signed-off-by: Pablo Vela <[email protected]>
Changed description names to be more natural and specified pointcloud requirements Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Added new testcases to cover all the cases Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @pvela2017! As I said offline, we are likely moving OpenVDB out of Beluga core (solely because OpenVDB packaging is terrible). I'll take it from here.
In the meantime, CC'ing @nahueespinosa for another take.
return [this, pointcloud_size, points = std::move(transformed_points)](const state_type& state) -> weight_type { | ||
std::vector<float> distances; | ||
distances.reserve(pointcloud_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 nit: we can fetch pointcloud_size
as points.size()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
[[nodiscard]] auto operator()(measurement_type&& measurement) const { | ||
const size_t pointcloud_size = measurement.points().size(); | ||
// Transform each point from the sensor frame to the origin frame | ||
auto transformed_points = ranges::views::all(measurement.points()) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ranges::views::all
should not be needed. The transform view will do the conversion.
auto transformed_points = ranges::views::all(measurement.points()) | | |
auto transformed_points = measurement.points() | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 2aabb60
beluga/include/beluga/sensor.hpp
Outdated
@@ -54,6 +54,7 @@ | |||
* | |||
* \section SensorModelLinks See also | |||
* - beluga::LikelihoodFieldModel | |||
* - beluga::Likelihood3DFieldModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* - beluga::Likelihood3DFieldModel | |
* - beluga::LikelihoodFieldModel3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 2aabb60
ranges::to<std::vector>(); | ||
|
||
return [this, pointcloud_size, points = std::move(transformed_points)](const state_type& state) -> weight_type { | ||
std::vector<float> distances; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta: It doesn't seem like we need to dynamically allocate the distances since we will iterate over them only once. Non-blocking though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 2aabb60
edit: I was thinking, if we dont allocate memory for the distances, wouldn't it loose performance since everytime the vector is getting full it would have to allocate more memory? Since there are a lot of points this would happen several time or would this be negligible?
/// Parameter type that the constructor uses to configure the likelihood field model. | ||
using param_type = LikelihoodFieldModel3Param; | ||
|
||
/// Constructs a Likelihood3DFieldModel instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other instances that need replacement.
/// Constructs a Likelihood3DFieldModel instance. | |
/// Constructs a LikelihoodFieldModel3 instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 2aabb60
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Pablo Vela <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
Ready to go once pvela2017#2 goes in. FYI @glpuga @nahueespinosa. |
I forgot that setting the checker as What should we do? It is nice to have the checker but I don't think it is mandatory.
PD: I commented this before, but it seems it didn't generate a notification |
@pvela2017 Michel will be out on PTO for a couple of weeks. If you give us more context maybe @nahueespinosa a me can help you. |
Whops! I hope he doesnt get the notifications then. Sure, in the testcase for beluga_vdb we use an OpenVDB object to check if the background of the level set is right. Originally, it was without So, what would be better remove this checking or just leave it without Thank you! |
The problem seems to be that that Leave it as non-const. |
Signed-off-by: Pablo Vela <[email protected]>
Ok, I pushed the changes! |
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Type of change
💥 Breaking change! Explain why a non-backwards compatible change is necessary or remove this line entirely if not applicable.
Checklist
Put an
x
in the boxes that apply. This is simply a reminder of what we will require before merging your code.Additional comments
Anything worth mentioning to the reviewers.