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

I have a problem about the relpose. #34

Open
Freeskylover opened this issue Nov 22, 2019 · 3 comments
Open

I have a problem about the relpose. #34

Freeskylover opened this issue Nov 22, 2019 · 3 comments

Comments

@Freeskylover
Copy link

double InformationMatrixCalculator::calc_fitness_score(const pcl::PointCloud::ConstPtr& cloud1, const pcl::PointCloud::ConstPtr& cloud2, const Eigen::Isometry3d& relpose, double max_range) {
pcl::search::KdTree::Ptr tree_(new pcl::search::KdTree());
tree_->setInputCloud(cloud1);

double fitness_score = 0.0;

// Transform the input dataset using the final transformation
pcl::PointCloud input_transformed;
pcl::transformPointCloud (*cloud2, input_transformed, relpose.cast());

I have a question about the relpose. Under my understanding, the relpose is the transformation from clould1 frame to cloud2 frame. so in my thinking, it should exchange cloud1 with cloud2.
for example: tree_->setInputCloud(cloud2);
pcl::transformPointCloud (*cloud1, input_transformed, relpose.cast());
I am not very sure it , so i am looking for your reply.

@koide3
Copy link
Owner

koide3 commented Nov 25, 2019

Hi @Freeskylover ,
Here, "relpose" is the transformation from cloud2 frame to cloud1 frame. So, the code is fine. If you have further questions, please open a new issue in hdl_graph_slam repository which is relevant to this topic.

@Freeskylover
Copy link
Author

Eigen::Isometry3d relative_pose = keyframe->odom.inverse() * prev_keyframe->odom;
Eigen::MatrixXd information = inf_calclator->calc_information_matrix(prev_keyframe->cloud, keyframe->cloud, relative_pose);
but here is from cloud1 to cloud2 for the relpose.

@koide3
Copy link
Owner

koide3 commented Nov 25, 2019

Hi @Freeskylover ,
It seems that code is wrong. It should be:

Eigen::MatrixXd information = inf_calclator->calc_information_matrix(keyframe->cloud, prev_keyframe->cloud, relative_pose);

I'll test and update it later. Thank you for reporting it :)

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

2 participants