NVIDIA-ISAAC-ROS / NVIDIA-ISAAC-ROS/isaac_ros_pose_estimation

Potential rotation parameter unit mismatch in `MakeRotationGrid` (degrees vs radians)

Open
#73 0 comments 0 reactions 1 assignee View on GitHub

@yuanknv is already working on this.

Since May 20, 2025.

bug
Dominant language
C++
Stars
501
Forks
57
PR merge metrics
No merged PRs in 30d

Description

Hello! Thank you for your excellent work! We are currently migrating the FoundationPose algorithm portion to a non-ROS environment for our use, and during this process, we noticed a potential issue worth verifying.

In the sampling section of FoundationPose, specifically in the MakeRotationGrid function, the current implementation uses Eigen::AngleAxisf(inplane_rot, Eigen::Vector3f::UnitZ()) to specify rotation about the Z-axis. Since inplane_rot appears to be in degrees, while the Eigen::AngleAxisf constructor expects radians (as per Eigen documentation), this might cause misalignment with the Python implementation during model rendering.

After modifying the input to use radians, here are our test results showing improved alignment:

Image

Codes we modified:

std::vector<Eigen::Matrix4f> MakeRotationGrid(const std::vector<std::string>& symmetry_planes, unsigned int n_views = 40, int inplane_step = 60) {
  auto cam_in_obs = SampleViewsIcosphere(n_views);

  std::vector<Eigen::Matrix4f> rot_grid;
  for (unsigned int i = 0; i < cam_in_obs.size(); i++) {
    for (double inplane_rot = 0; inplane_rot < 360; inplane_rot += inplane_step) {
      Eigen::Matrix4f cam_in_ob = cam_in_obs[i];
      auto R_inplane = Eigen::Affine3f::Identity();
      R_inplane.rotate(Eigen::AngleAxisf(0, Eigen::Vector3f::UnitX()))
          .rotate(Eigen::AngleAxisf(0, Eigen::Vector3f::UnitY()))
          .rotate(Eigen::AngleAxisf(inplane_rot / 180.0f * M_PI, Eigen::Vector3f::UnitZ()));

      cam_in_ob = cam_in_ob * R_inplane.matrix();
      Eigen::Matrix4f ob_in_cam = cam_in_ob.inverse();
      rot_grid.push_back(ob_in_cam);
    }
  }

  std::vector<Eigen::Matrix4f> symmetry_tfs = GenerateSymmetricPoses(symmetry_planes);
  symmetry_tfs.push_back(Eigen::Matrix4f::Identity());
  auto clustered_poses = ClusterPoses(30.0, 99999.0, rot_grid, symmetry_tfs);
  GXF_LOG_DEBUG("[FoundationposeSampling] %lu poses left after clustering", clustered_poses.size());
  return std::move(clustered_poses);
}

We would greatly appreciate your insights on this observation. If this is indeed a valid adjustment, we would be happy to submit a pull request with your permission. Please let us know your thoughts when convenient.

Thank you for your time and consideration!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.