add property to keep NaN values in Pointcloud#1
Open
tknobi wants to merge 2 commits intorock-perception:masterfrom
Open
add property to keep NaN values in Pointcloud#1tknobi wants to merge 2 commits intorock-perception:masterfrom
tknobi wants to merge 2 commits intorock-perception:masterfrom
Conversation
|
Ping |
chhtz
requested changes
Mar 2, 2026
Member
chhtz
left a comment
There was a problem hiding this comment.
I guess nobody felt responsible answering here.
Assuming this is still relevant, I'd be ok merging this (once conflicts are resolved).
Comment on lines
+40
to
42
| pc.colors.push_back(Eigen::Vector4d(0,0,0,1.0f)); | ||
| } | ||
| continue; |
Member
There was a problem hiding this comment.
Maybe just } else {continue;} instead of coloring invalid pixels black?
| for(int x = 0; x<frame_sample->width;x++){ | ||
| if(!frame_sample->getScenePoint(x,y,v)){ | ||
| if(keepNAN) { | ||
| v<<base::NaN<double>(),base::NaN<double>(),base::NaN<double>(); |
Member
There was a problem hiding this comment.
Slightly shorter: v.setConstant(base::NaN<double>()); (same in the other loop).
| if (! DepthImage2PointcloudBase::configureHook()) | ||
| return false; | ||
|
|
||
| keepNAN=_keepNAN.get(); |
Member
There was a problem hiding this comment.
For these simple flags, which don't actually require configuring I'd usually prefer just reading them inside the update-hook (i.e., into a local bool variable, before doing the loop).
I don't know if there is any kind of guideline/best practice if/when this is acceptable in Rock.
chhtz
pushed a commit
that referenced
this pull request
Mar 3, 2026
feat: configure thread amount on OpenCV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The result is a organized pointcloud with a static size. This is necessary for some algorithms.