[transformPointcloud] The fourth entry of point is changed during SE3/SO3 transformation
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
まず、transformPointCloud と transformPointCloudWithNormals を、コミット 04ae840eb43c78f0e348c35271932c5d6d350759 でリンクされている実装と比較し、次に issue に示されている so3() と se3() のエントリポイントを調べます。第 4 の値に強度を格納するカスタムポイント型で動作を再現します; xyz が正しく変換され、その第 4 の値が変更されないことを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
In release 1.9.0, After the commit 04ae840eb43c78f0e348c35271932c5d6d350759, "Improve speed of transformPointCloud/WithNormals() functions by SSE2/AVX intrinsic", the behavior of transformPointCloud is changed.
In the old code, the x,y,z component are transformed, and the fourth entry (w) is not touched.
for (size_t i = 0; i < cloud_out.points.size (); ++i)
{
//cloud_out.points[i].getVector3fMap () = transform * cloud_in.points[i].getVector3fMap ();
Eigen::Matrix<Scalar, 3, 1> pt (cloud_in[i].x, cloud_in[i].y, cloud_in[i].z);
cloud_out[i].x = static_cast<float> (transform (0, 0) * pt.coeffRef (0) + transform (0, 1) * pt.coeffRef (1) + transform (0, 2) * pt.coeffRef (2) + transform (0, 3));
cloud_out[i].y = static_cast<float> (transform (1, 0) * pt.coeffRef (0) + transform (1, 1) * pt.coeffRef (1) + transform (1, 2) * pt.coeffRef (2) + transform (1, 3));
cloud_out[i].z = static_cast<float> (transform (2, 0) * pt.coeffRef (0) + transform (2, 1) * pt.coeffRef (1) + transform (2, 2) * pt.coeffRef (2) + transform (2, 3));
}
But in the above commit, the transformation is unified to a so3() / se3() function. And in those functions, the fourth entry of point is changed to zero or one. Why do we need this change ?
/** Apply SO3 transform (top-left corner of the transform matrix).
* \param[in] src input 3D point (pointer to 3 floats)
* \param[out] tgt output 3D point (pointer to 4 floats), can be the same as input. The fourth element is set to 0. */
void so3 (const float* src, float* tgt) const
{
const Scalar p[3] = { src[0], src[1], src[2] }; // need this when src == tgt
tgt[0] = static_cast<float> (tf (0, 0) * p[0] + tf (0, 1) * p[1] + tf (0, 2) * p[2]);
tgt[1] = static_cast<float> (tf (1, 0) * p[0] + tf (1, 1) * p[1] + tf (1, 2) * p[2]);
tgt[2] = static_cast<float> (tf (2, 0) * p[0] + tf (2, 1) * p[1] + tf (2, 2) * p[2]);
tgt[3] = 0;
}
/** Apply SE3 transform.
* \param[in] src input 3D point (pointer to 3 floats)
* \param[out] tgt output 3D point (pointer to 4 floats), can be the same as input. The fourth element is set to 1. */
void se3 (const float* src, float* tgt) const
{
const Scalar p[3] = { src[0], src[1], src[2] }; // need this when src == tgt
tgt[0] = static_cast<float> (tf (0, 0) * p[0] + tf (0, 1) * p[1] + tf (0, 2) * p[2] + tf (0, 3));
tgt[1] = static_cast<float> (tf (1, 0) * p[0] + tf (1, 1) * p[1] + tf (1, 2) * p[2] + tf (1, 3));
tgt[2] = static_cast<float> (tf (2, 0) * p[0] + tf (2, 1) * p[1] + tf (2, 2) * p[2] + tf (2, 3));
tgt[3] = 1;
}
Normally if a user use the predefined point type in PCL, there will be no different. But I used a customized point type where I pack the intensity value of point into the fourth entry, instead of using the predefined pcl::PointXYZI type where the intensity is stored separately from the four floats of xyzw.
Context
The behavior of transformPointcloud() function changed at release 1.9.0
Expected behavior
The fourth entry of point should not be changed.
Current Behavior
The fourth entry of point is changed to zero or one
To Reproduce
Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. A reproducible example helps to provide faster answers. If you load data e.g. from a PCD or PLY file, please provide the file.
Screenshots/Code snippets
Possible Solution
Just stick to the old behavior ?
- 主要言語
- C++
- スター
- 11.2k
- フォーク
- 4.7k
- 平均マージ
- 5日 12時間
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PointCloudLibrary/pcl のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
PointCloudLibrary/pcl#6509 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
kind: bug status: triage
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
PointCloudLibrary/pcl#6395 ·
メンテナーはふだん 3 日以内に返信
-
[sample_consensus] Migrated the SSE and AVX implementations of countWithinDistance to RISC-V RVV 1.0オープンkind: request status: triage
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
PointCloudLibrary/pcl#6385 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
-
2 tests failオープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
PointCloudLibrary/pcl#6373 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
-
kind: question kind: request
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
PointCloudLibrary/pcl#6370 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
PointCloudLibrary/pcl の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Niko1221/Strata#5560 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
NVIDIA windows
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
要トリアージ 辞書
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
yksr-melt/Meltype#1625 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug priority/medium qa_automation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yugabyte/yugabyte-db#37324 ·
メンテナーはふだん 1 日以内に返信