Skip to content

Improved manual registration - #5530

Merged
mvieth merged 20 commits into
PointCloudLibrary:masterfrom
themightyoarfish:better-manual-registration
Apr 3, 2023
Merged

Improved manual registration#5530
mvieth merged 20 commits into
PointCloudLibrary:masterfrom
themightyoarfish:better-manual-registration

Conversation

@themightyoarfish

Copy link
Copy Markdown
Contributor

I find the manual registration tool very useful. This modification has the following features

  • Unused buttons and callbacks removed
  • Automatic refinement via ICP added
  • A modal popup to inspect the generated alignment
  • Visual aides for selected points to have feedback on what exactly is used for computing the transform

@themightyoarfish
themightyoarfish force-pushed the better-manual-registration branch from 5d3e0ef to 437218a Compare November 25, 2022 16:41
@themightyoarfish
themightyoarfish force-pushed the better-manual-registration branch from 437218a to c89cc79 Compare November 26, 2022 06:12
@themightyoarfish

Copy link
Copy Markdown
Contributor Author
manureg.mp4

@themightyoarfish

Copy link
Copy Markdown
Contributor Author

Would someone kindly take a peek at this? I'd like to get it into master.

@larshg

larshg commented Dec 2, 2022

Copy link
Copy Markdown
Contributor

We won't merge anything unless its broken, since we are mid-release of 1.13. So there will be a while before it will be merged.

@larshg

larshg commented Jan 5, 2023

Copy link
Copy Markdown
Contributor

Looks good - but why did you change from PointXYZRGBA to PointXYZ?

@themightyoarfish

themightyoarfish commented Jan 5, 2023 via email

Copy link
Copy Markdown
Contributor Author

@larshg

larshg commented Jan 5, 2023

Copy link
Copy Markdown
Contributor

Well I was just curious, but I think it makes good sense. Also since the color is not used for the registration, nor in ICP, I'm fine with it being XYZ.

@larshg

larshg commented Jan 5, 2023

Copy link
Copy Markdown
Contributor

I have opened a PR towards your PR - mainly removing the two timers, to avoid the heavy re-rendering every 5 ms in main app and every 10 ms in the modal dialog.
Try them out and see if you agree 😄

@themightyoarfish
themightyoarfish force-pushed the better-manual-registration branch from 9a8cd50 to d8614c4 Compare January 12, 2023 11:50
@themightyoarfish

Copy link
Copy Markdown
Contributor Author

Tested and it still works.

@themightyoarfish

Copy link
Copy Markdown
Contributor Author

Might someone hit the button on this?

larshg
larshg previously approved these changes Jan 28, 2023
@larshg larshg added this to the pcl-1.13.1 milestone Jan 28, 2023
@larshg larshg added the changelog: enhancement Meta-information for changelog generation label Jan 28, 2023
@larshg
larshg requested a review from mvieth January 28, 2023 12:22
<!-- <string>Undo</string> -->
<!-- </property> -->
<!-- </widget> -->
<!-- </item> -->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still useful for some purpose, or why did you keep it around?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

pcl::registration::TransformationEstimationSVD<pcl::PointXYZ, pcl::PointXYZ> tfe;
tfe.estimateRigidTransformation(src_pc_, dst_pc_, transform_);
std::cout << "Transform : " << std::endl << transform_ << std::endl;
PCL_INFO("Calculated tranform:\n%1.5f %1.5f %1.5f %1.5f\n%1.5f %1.5f %1.5f "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about PCL_INFO_STREAM("Calculated transform" << std::endl << transform_ << std::endl);
It is more compact and Eigen can take care of formatting, alignment of decimal points etc. (one more in refinePressed)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be better, i just copied what the original code already used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in eea0068.

however, I have noticed that swichting to this method now subjects the output to some terminal color shenanigans, which didnt happen before. E.g. in my solarized iterm the output now looks like this

Screenshot 2023-03-22 at 17 03 26

Presumably because that macro has this in it pcl::console::change_text_color(CSTR, pcl::console::ATTR, pcl::console::FG);, while the PCL_INFO() and friends print without this.

refreshView();
PCL_INFO("Refining transform ...\n");
VoxelGrid<PointT> grid_filter;
grid_filter.setLeafSize(0.05, 0.05, 0.05);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that these parameters (and the ones of icp below) seem to be optimised for your used case, with no possibility to change them, e.g. from the command line. But I am okay with this for now, we can deal with it if someone actually has a problem with the parameters.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since its an GUI app I would prefer a field to set them in 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, it just increases the complexity of the change. Considering the feature was previously not even implemented … I'd still say it's better than before.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still say it's better than before.

@themightyoarfish I agree, that is why I am fine if you don't make the parameters configurable at runtime. But please address my other two review comments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in d6324f4

@larshg
larshg self-requested a review February 1, 2023 21:06
@themightyoarfish
themightyoarfish requested review from larshg and mvieth and removed request for larshg and mvieth March 22, 2023 16:08

@mvieth mvieth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mvieth
mvieth merged commit 07ef7ee into PointCloudLibrary:master Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: enhancement Meta-information for changelog generation module: apps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants