-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Implementation of the iterator 'OctreeFixedDepthIterator'. #1983
Implementation of the iterator 'OctreeFixedDepthIterator'. #1983
Conversation
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.
Please add Open Perception (after Willow garage) to the copyright note of the files you edited. These changes are substantial enough.
* Copyright (c) 2017-, Open Perception, Inc.
The pull requests introducing new functionality need to be complemented by unit tests. Thus, it would be great if you can extend already existing test case with a couple of assertions regarding the new iterator. There is not a lot to test, really, so should not take much effort.
* \author Fabien Rozar (fabien.rozar@gmail.com) | ||
*/ | ||
template<typename OctreeT> | ||
class OctreeBreadthFirstAtDepthIterator : public OctreeBreadthFirstIterator<OctreeT> |
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.
Please shift this whole class definition left by two spaces to fix the alignment.
(I know the other classes in this file are misaligned. But we have a policy that the old code stays as it is, and the new code should follow the style guide.)
explicit | ||
OctreeBreadthFirstAtDepthIterator (OctreeT* octree_arg, unsigned int depth_arg = 0); | ||
|
||
/** \brief Empty deconstructor. */ |
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.
This is a pointless docstring, and also not correct, because this is called destructor, not deconstructor.
(Yes, I know you copy-pasted this, but same as the previous comment, we want the new code to be good.)
inline OctreeBreadthFirstAtDepthIterator& | ||
operator = (const OctreeBreadthFirstAtDepthIterator& src) | ||
{ | ||
OctreeBreadthFirstIterator<OctreeT>::operator=(src); |
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.
Missing space
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.
If you're defining copy assignment, you should define as well the copy constructor, otherwise the compiler will generate one for you which probably doesn't do exactly what you want.
Edit: Also, don't you need to return *this
?
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.
Assuming your member depth_ will be const, what happens if you're copying from an iterator with a different depth? Assuming your depth_ won't be const, you should also copy it.
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.
As you expected, the member depth_
cannot be a const member because of the operator =
(I get the compilation error: assignment of read-only member).
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.
A copy constructor is also implemented.
inline OctreeBreadthFirstAtDepthIterator | ||
operator++ (int) | ||
{ | ||
OctreeBreadthFirstAtDepthIterator _Tmp = *this; |
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.
Local variables should be called tmp
, no camel case and no underscores.
using OctreeBreadthFirstIterator<OctreeT>::FIFO_; | ||
|
||
/** \brief Given level of the node to be iterated */ | ||
unsigned int depth_; |
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.
Can be const
to make it explicit that depth can not be changed.
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.
As an alternative, consider also what I wrote about the reset method and let's decide what fits best.
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.
For the reason I gave in the operator=
comment, the member depth_
cannot be const.
tools/octree_viewer.cpp
Outdated
pcl::octree::OctreePointCloudVoxelCentroid<pcl::PointXYZ>::Iterator tree_it; | ||
pcl::octree::OctreePointCloudVoxelCentroid<pcl::PointXYZ>::Iterator tree_it_end = octree.end(); | ||
pcl::octree::OctreePointCloudVoxelCentroid<pcl::PointXYZ>::BreadthFirstAtDepthIterator tree_it; | ||
pcl::octree::OctreePointCloudVoxelCentroid<pcl::PointXYZ>::BreadthFirstAtDepthIterator tree_it_end = octree.breadth_at_depth_end(); |
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.
Missing space
tools/octree_viewer.cpp
Outdated
|
||
pcl::PointXYZ pt; | ||
std::cout << "===== Extracting data at depth " << depth << "... " << std::flush; | ||
double start = pcl::getTime (); | ||
|
||
for (tree_it = octree.begin(depth); tree_it!=tree_it_end; ++tree_it) | ||
for (tree_it = octree.breadth_at_depth_begin(depth); tree_it!=tree_it_end; ++tree_it) |
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.
Missing space before braces and around operator !=
.
OctreeBreadthFirstIterator<OctreeT>::reset (); | ||
|
||
// Set the current_state_ to the right depth | ||
while( this->current_state_ && ( this->getCurrentOctreeDepth () != depth_ ) ) { |
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.
Missing space after while
, extra spaces within braces. {
should go to the new line
// Octree breadth iterators at a given depth | ||
typedef OctreeBreadthFirstAtDepthIterator<OctreeT> BreadthFirstAtDepthIterator; | ||
typedef const OctreeBreadthFirstAtDepthIterator<OctreeT> ConstBreadthFirstAtDepthIterator; | ||
BreadthFirstAtDepthIterator breadth_at_depth_begin(unsigned int depth_arg = 0) {return BreadthFirstAtDepthIterator(this, depth_arg);}; |
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.
Missing space after the function name(s). Missing spaces after {
and before }
.
typedef OctreeBreadthFirstAtDepthIterator<OctreeT> BreadthFirstAtDepthIterator; | ||
typedef const OctreeBreadthFirstAtDepthIterator<OctreeT> ConstBreadthFirstAtDepthIterator; | ||
BreadthFirstAtDepthIterator breadth_at_depth_begin(unsigned int depth_arg = 0) {return BreadthFirstAtDepthIterator(this, depth_arg);}; | ||
const BreadthFirstAtDepthIterator breadth_at_depth_end() {return BreadthFirstAtDepthIterator();}; |
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.
Same as previous comment
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.
I've been trying to figure out how exactly this iterator end()
is working and it seems a little different than what one would normally expect. So semantically, end()
should point to the element right after the last one, but it seems that in this case we set the iterator to an "unitialized state" with no octree attached to it. Is my assessment correct?
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.
When I run pcl_octree_viewer
with a debugger to understand (again) what's happen, on the call to the method breadth_at_depth_end()
, I get the following call stack (I delete the template paramters):
#0 pcl::octree::OctreeIteratorBase::OctreeIteratorBase (this=0x7fffffffddd0, max_depth_arg=0) at /home/frozar/soft/pcl/octree/include/pcl/octree/octree_iterator.h:91
#1 pcl::octree::OctreeBreadthFirstIterator::OctreeBreadthFirstIterator (this=0x7fffffffddd0, max_depth_arg=0) at /home/frozar/soft/pcl/octree/include/pcl/octree/impl/octree_iterator.hpp:181
#2 pcl::octree::OctreeBreadthFirstAtDepthIterator::OctreeBreadthFirstAtDepthIterator (this=0x7fffffffddd0, depth_arg=0) at /home/frozar/soft/pcl/octree/include/pcl/octree/impl/octree_iterator.hpp:288
#3 pcl::octree::OctreeBase::breadth_at_depth_end (this=0x7fffffffe268) at /home/frozar/soft/pcl/octree/include/pcl/octree/octree_base.h:110
So calling breadth_at_depth_end()
finally hits the constructor OctreeIteratorBase (max_depth_arg=0)
. So the iterator is in a "sentinal state" if I can say. In my opinion it's not an "unitialized state", but still, this doesn't mean it's the good way to do it.
Actually, for an iterator the really matter is to check that after enough call to operator++
, will it be equal to the "end iterator"? In this case, the OctreeBreadthFirstAtDepthIterator
iterator implementation relies almost completly on the OctreeBreadthFirstIterator
iterator. The implementation I propose mimic the behavior of OctreeBreadthFirstIterator
iterator for this point.
What do you think about this behavior?
/** \brief @b Octree iterator class | ||
* \note This class implements a forward iterator for traversing octrees in a breadth-first manner. | ||
* It only returns the node at a given depth in the octree, if any. | ||
* \ingroup octree |
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.
Can you switch the description to "Iterator over all existing nodes at a given depth". I only understood the intent of this iterator after seeing Sergey's comment about the constness of the depth parameter. I would even suggest renaming the iterator to something like OctreeFixedDepthIterator
but I leave this suggestion to your scrutiny regarding its adoption or not.
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.
I update the description.
I keep the class name as is for the moment because I feel that it will clutter the review, but I keep it in mind as a TODO.
|
||
// public typedefs | ||
typedef typename OctreeBreadthFirstIterator<OctreeT>::BranchNode BranchNode; | ||
typedef typename OctreeBreadthFirstIterator<OctreeT>::LeafNode LeafNode; |
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.
It's a matter of style but you can switch the typedefs to using
. It's semantically more correct.
OctreeBreadthFirstAtDepthIterator<OctreeT>::OctreeBreadthFirstAtDepthIterator (unsigned int depth_arg) : | ||
OctreeBreadthFirstIterator<OctreeT> (depth_arg), depth_(depth_arg) | ||
{ | ||
OctreeBreadthFirstIterator<OctreeT>::reset (); |
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.
OctreeBreadthFirstAtDepthIterator<OctreeT>::reset()
already calls OctreeBreadthFirstIterator<OctreeT>::reset ()
so this is useless.
OctreeBreadthFirstAtDepthIterator<OctreeT>::OctreeBreadthFirstAtDepthIterator (OctreeT* octree_arg, unsigned int depth_arg) : | ||
OctreeBreadthFirstIterator<OctreeT> (octree_arg, depth_arg), depth_(depth_arg) | ||
{ | ||
OctreeBreadthFirstIterator<OctreeT>::reset (); |
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.
same comment as above.
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.
I didn't manage to complete the review but addressing the points I mentioned should be enough. I also think it would be good to have some unit tests to test the functionality. I'm sure you wrote some code to test that this was working properly :)
/** \brief Reset the iterator to the first node at the depth given initially of the octree | ||
*/ | ||
void | ||
reset (); |
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.
I think it's useful to allow specifying the intended depth on reset. If you don't specify any argument it just resets to the first node of the current set depth, but if you do it switches the iterator to the first node of the new depth value.
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.
I make a try and I let you check it.
@taketwo : All your comments have been taken into account. I think the coding style should be good now. |
@@ -317,7 +317,8 @@ namespace pcl | |||
OctreeBreadthFirstIterator<OctreeT>::reset (); | |||
|
|||
// Set the current_state_ to the right depth | |||
while( this->current_state_ && ( this->getCurrentOctreeDepth () != depth_ ) ) { | |||
while ( this->current_state_ && ( this->getCurrentOctreeDepth () != depth_ ) ) |
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.
I'm afraid we still have style problems here :D
There shouldn't be spaces inside brackets, i.e.
while (this->current_state_ && (this->getCurrentOctreeDepth () != depth_))
// public typedefs | ||
typedef typename OctreeIteratorBase<OctreeT>::BranchNode BranchNode; | ||
typedef typename OctreeIteratorBase<OctreeT>::LeafNode LeafNode; | ||
template<typename OctreeT> |
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.
We have a policy that we do not reformat existing code (unless we make other meaningful edits to it), the reason being that git blame
won't show relevant commit anymore.
So please remove this restyling of the existing code (OctreeBreadthFirstIterator
).
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.
I understand why existing code should not be touch. In this case, I do a tiny edit: I put the keyword public:
just above the typedef
lines. Should I still remove my restyling? (For the git blame
reason, I'll understand if you say "yes"...)
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.
I removed the restyle of this class.
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.
Adding public:
is a needed, meaningful change, we should keep it. It does not affect git blame
, because git blame
reports the author on line-by-line basis. If in future we have problems with this line, git blame
will tell us that you are the one to blame 😆
Now as for the style changes, for example indentation fixes, if in future we discover that a certain line does something strange and we try to understand where it comes from and who are the author, git blame
will again point at you. But this won't give us anything, because your change was only about the indentation.
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.
I rewrite the history for the git blame
matter. If you do this command:
git blame octree/include/pcl/octree/octree_iterator.h
you'll see that I touch only the public:
keyword line in the class OctreeBreadthFirstIterator
.
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.
Right, if you just run git blame
on a file you get only your last edit. What I meant was rather the feature offered by GitHub, e.g. here. You can see the last commit for each and every line. So if you scroll down you will easily see that public:
is added by you, but other lines come from Julius.
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.
I didn't know this tool. It's pretty cool, thank you.
class OctreeBreadthFirstAtDepthIterator : public OctreeBreadthFirstIterator<OctreeT> | ||
{ | ||
public: | ||
template<typename OctreeT> |
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.
I probably was not clear enough. The template
line was properly indented. But the class
line and all following lines are shifted two spaces right with respect to it. So I asked to "unshift" them, i.e. remove two extra spaces.
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.
I hope I get it right now.
} | ||
|
||
/** \brief Reset the iterator to the first node at the depth given initially of the octree | ||
*/ | ||
void | ||
reset (); | ||
|
||
/** \brief Reset the iterator to the first node at the depth given initially of the octree |
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.
Update the docstring to match the reality.
0625c20
to
5b3cf3f
Compare
Thanks for the changes. Besides a missing unit test this looks fine for me. |
5b3cf3f
to
3140148
Compare
After my rebase, this branch seems to be broken (not the correct display, segfault if one tries to look at the level 0 of the octree). |
Any idea why? |
Currently I don't know why because I don't have the time right now to check. Until the 6th october, my schedule is full. Also, I have an idea to build a non regression test for this feature, but I'm busy. I'll fix it later. |
1d9da0a
to
61d4c53
Compare
Hey @frozar. Do you mind rebasing this with the current master? We cleaned a number of warnings and I want to make sure we're not adding any with this PR. Edit: Just noticed we're still missing that unit test. |
In short: you cannot set When you said:
OK, but what does it mean for the Previously I said :
This concerns the
Let imagine that you never fill the octree (the octree contains only the root node) given as input to this iterator, and you supply a In the test where you fill the octree after initialisation and then you call the reset method of the iterator, you expect to reach the first node of the depth=1 of the octree, right? This is the behavior of the current Personally, I find the current implement good, because it is semantically correct and it well reuses the parent methods such that |
81dd85f
to
15cf4b9
Compare
Semantically this makes sense for me.
Yes. But I could also cap the "fixed_depth_" at 0 and warn the user "You can't set that depth level because your tree has only depth zero". I'm ok in merging this but I still believe it could be pulled off without |
Here's my working proof of concept SergioRAgostinho@a17d63e Test results: cases.
[----------] Global test environment set-up.
[----------] 2 tests from OctreeIteratorBaseTest
[ RUN ] OctreeIteratorBaseTest.CopyConstructor
[ OK ] OctreeIteratorBaseTest.CopyConstructor (0 ms)
[ RUN ] OctreeIteratorBaseTest.CopyAssignment
[ OK ] OctreeIteratorBaseTest.CopyAssignment (0 ms)
[----------] 2 tests from OctreeIteratorBaseTest (0 ms total)
[----------] 2 tests from OctreeIteratorTest/0, where TypeParam = pcl::octree::OctreeDepthFirstIterator<pcl::octree::OctreeBase<int, pcl::octree::OctreeContainerEmpty> >
[ RUN ] OctreeIteratorTest/0.CopyConstructor
[ OK ] OctreeIteratorTest/0.CopyConstructor (0 ms)
[ RUN ] OctreeIteratorTest/0.CopyAssignment
[ OK ] OctreeIteratorTest/0.CopyAssignment (0 ms)
[----------] 2 tests from OctreeIteratorTest/0 (0 ms total)
[----------] 2 tests from OctreeIteratorTest/1, where TypeParam = pcl::octree::OctreeBreadthFirstIterator<pcl::octree::OctreeBase<int, pcl::octree::OctreeContainerEmpty> >
[ RUN ] OctreeIteratorTest/1.CopyConstructor
[ OK ] OctreeIteratorTest/1.CopyConstructor (0 ms)
[ RUN ] OctreeIteratorTest/1.CopyAssignment
[ OK ] OctreeIteratorTest/1.CopyAssignment (0 ms)
[----------] 2 tests from OctreeIteratorTest/1 (0 ms total)
[----------] 2 tests from OctreeIteratorTest/2, where TypeParam = pcl::octree::OctreeLeafNodeIterator<pcl::octree::OctreeBase<int, pcl::octree::OctreeContainerEmpty> >
[ RUN ] OctreeIteratorTest/2.CopyConstructor
[ OK ] OctreeIteratorTest/2.CopyConstructor (0 ms)
[ RUN ] OctreeIteratorTest/2.CopyAssignment
[ OK ] OctreeIteratorTest/2.CopyAssignment (0 ms)
[----------] 2 tests from OctreeIteratorTest/2 (0 ms total)
[----------] 2 tests from OctreeIteratorTest/3, where TypeParam = pcl::octree::OctreeFixedDepthIterator<pcl::octree::OctreeBase<int, pcl::octree::OctreeContainerEmpty> >
[ RUN ] OctreeIteratorTest/3.CopyConstructor
[ OK ] OctreeIteratorTest/3.CopyConstructor (0 ms)
[ RUN ] OctreeIteratorTest/3.CopyAssignment
[ OK ] OctreeIteratorTest/3.CopyAssignment (0 ms)
[----------] 2 tests from OctreeIteratorTest/3 (0 ms total)
[----------] 8 tests from OctreeBaseBeginEndIteratorsTest
[ RUN ] OctreeBaseBeginEndIteratorsTest.Begin
[ OK ] OctreeBaseBeginEndIteratorsTest.Begin (1 ms)
[ RUN ] OctreeBaseBeginEndIteratorsTest.End
[ OK ] OctreeBaseBeginEndIteratorsTest.End (0 ms)
[ RUN ] OctreeBaseBeginEndIteratorsTest.LeafBegin
[ OK ] OctreeBaseBeginEndIteratorsTest.LeafBegin (0 ms)
[ RUN ] OctreeBaseBeginEndIteratorsTest.LeafEnd
[ OK ] OctreeBaseBeginEndIteratorsTest.LeafEnd (0 ms)
[ RUN ] OctreeBaseBeginEndIteratorsTest.DepthBegin
[ OK ] OctreeBaseBeginEndIteratorsTest.DepthBegin (0 ms)
[ RUN ] OctreeBaseBeginEndIteratorsTest.DepthEnd
[ OK ] OctreeBaseBeginEndIteratorsTest.DepthEnd (0 ms)
[ RUN ] OctreeBaseBeginEndIteratorsTest.BreadthBegin
[ OK ] OctreeBaseBeginEndIteratorsTest.BreadthBegin (0 ms)
[ RUN ] OctreeBaseBeginEndIteratorsTest.BreadthEnd
[ OK ] OctreeBaseBeginEndIteratorsTest.BreadthEnd (0 ms)
[----------] 8 tests from OctreeBaseBeginEndIteratorsTest (1 ms total)
[----------] 5 tests from OctreeBaseIteratorsForLoopTest
[ RUN ] OctreeBaseIteratorsForLoopTest.DefaultIterator
[ OK ] OctreeBaseIteratorsForLoopTest.DefaultIterator (0 ms)
[ RUN ] OctreeBaseIteratorsForLoopTest.LeafNodeIterator
[ OK ] OctreeBaseIteratorsForLoopTest.LeafNodeIterator (0 ms)
[ RUN ] OctreeBaseIteratorsForLoopTest.DepthFirstIterator
[ OK ] OctreeBaseIteratorsForLoopTest.DepthFirstIterator (0 ms)
[ RUN ] OctreeBaseIteratorsForLoopTest.BreadthFirstIterator
[ OK ] OctreeBaseIteratorsForLoopTest.BreadthFirstIterator (0 ms)
[ RUN ] OctreeBaseIteratorsForLoopTest.FixedDepthIterator
[ OK ] OctreeBaseIteratorsForLoopTest.FixedDepthIterator (0 ms)
[----------] 5 tests from OctreeBaseIteratorsForLoopTest (0 ms total)
[----------] 5 tests from OctreeBaseIteratorsPrePostTest
[ RUN ] OctreeBaseIteratorsPrePostTest.DefaultIterator
[ OK ] OctreeBaseIteratorsPrePostTest.DefaultIterator (0 ms)
[ RUN ] OctreeBaseIteratorsPrePostTest.LeafNodeIterator
[ OK ] OctreeBaseIteratorsPrePostTest.LeafNodeIterator (0 ms)
[ RUN ] OctreeBaseIteratorsPrePostTest.DepthFirstIterator
[ OK ] OctreeBaseIteratorsPrePostTest.DepthFirstIterator (0 ms)
[ RUN ] OctreeBaseIteratorsPrePostTest.BreadthFirstIterator
[ OK ] OctreeBaseIteratorsPrePostTest.BreadthFirstIterator (0 ms)
[ RUN ] OctreeBaseIteratorsPrePostTest.FixedDepthIterator
[ OK ] OctreeBaseIteratorsPrePostTest.FixedDepthIterator (1 ms)
[----------] 5 tests from OctreeBaseIteratorsPrePostTest (1 ms total)
[----------] 8 tests from OctreePointCloudAdjacencyBeginEndIteratorsTest
[ RUN ] OctreePointCloudAdjacencyBeginEndIteratorsTest.LeafBegin
[ OK ] OctreePointCloudAdjacencyBeginEndIteratorsTest.LeafBegin (0 ms)
[ RUN ] OctreePointCloudAdjacencyBeginEndIteratorsTest.LeafEnd
[ OK ] OctreePointCloudAdjacencyBeginEndIteratorsTest.LeafEnd (1 ms)
[ RUN ] OctreePointCloudAdjacencyBeginEndIteratorsTest.DepthBegin
[ OK ] OctreePointCloudAdjacencyBeginEndIteratorsTest.DepthBegin (0 ms)
[ RUN ] OctreePointCloudAdjacencyBeginEndIteratorsTest.DepthEnd
[ OK ] OctreePointCloudAdjacencyBeginEndIteratorsTest.DepthEnd (1 ms)
[ RUN ] OctreePointCloudAdjacencyBeginEndIteratorsTest.BreadthBegin
[ OK ] OctreePointCloudAdjacencyBeginEndIteratorsTest.BreadthBegin (1 ms)
[ RUN ] OctreePointCloudAdjacencyBeginEndIteratorsTest.BreadthEnd
[ OK ] OctreePointCloudAdjacencyBeginEndIteratorsTest.BreadthEnd (0 ms)
[ RUN ] OctreePointCloudAdjacencyBeginEndIteratorsTest.FixedDepthBegin
[ OK ] OctreePointCloudAdjacencyBeginEndIteratorsTest.FixedDepthBegin (1 ms)
[ RUN ] OctreePointCloudAdjacencyBeginEndIteratorsTest.FixedDepthEnd
[ OK ] OctreePointCloudAdjacencyBeginEndIteratorsTest.FixedDepthEnd (1 ms)
[----------] 8 tests from OctreePointCloudAdjacencyBeginEndIteratorsTest (5 ms total)
[----------] 5 tests from OctreePointCloudSierpinskiTest
[ RUN ] OctreePointCloudSierpinskiTest.DefaultIterator
[ OK ] OctreePointCloudSierpinskiTest.DefaultIterator (69 ms)
[ RUN ] OctreePointCloudSierpinskiTest.LeafNodeIterator
[ OK ] OctreePointCloudSierpinskiTest.LeafNodeIterator (67 ms)
[ RUN ] OctreePointCloudSierpinskiTest.DepthFirstIterator
[ OK ] OctreePointCloudSierpinskiTest.DepthFirstIterator (67 ms)
[ RUN ] OctreePointCloudSierpinskiTest.BreadthFirstIterator
[ OK ] OctreePointCloudSierpinskiTest.BreadthFirstIterator (68 ms)
[ RUN ] OctreePointCloudSierpinskiTest.FixedDepthIterator
[ OK ] OctreePointCloudSierpinskiTest.FixedDepthIterator (69 ms)
[----------] 5 tests from OctreePointCloudSierpinskiTest (342 ms total)
[----------] Global test environment tear-down
[==========] 41 tests from 10 test cases ran. (349 ms total)
[ PASSED ] 41 tests. |
@SergioRAgostinho It seems good. I look at the diff and I see that you have to modify the behavior of If you want to update the code in this way, I would say, why not. |
I assumed from the beginning I was not getting something in your explanation, I just didn't know exactly what. It became clear now.
It still needs cleanup but let's gather opinions @PointCloudLibrary/maintainers . |
No opinion, really. |
How many people are in @PointCloudLibrary/maintainers? |
Hover the link with the mouse, it will show 4 people. |
Nothing suspicious here (whistles) . AFAIK there are two settings that influence one's ability to visualize members of an organization:
If you access https://github.com/orgs/PointCloudLibrary/people without credentials you won't see for instance Sergey, although he's definitely in it. |
I forgot to add the most important comment: I have a weak preference of not having |
I was not aware of this visibility setting. From now on the world will know about my affiliation with PCL :) |
Hi all, |
@NPatch can you open a new issue and post a self contained code snippet/procedure exemplifying what is failing? |
I will. But it's nothing custom. PCL binary installer and then copy paste the octree_viewer code to test it out. |
Add an octree iterator to walk over the
OctreeBranch
at the same depth. The code relies really on the iteratorOctreeBreadthFirstIterator
.The file
octree_viewer.cpp
has been updated to use this iterator.To maintain to homogenity for the different octree class, more things should be done I think. Wait for checking.