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

coordinate transformation #45

Open
li123il opened this issue May 9, 2022 · 6 comments
Open

coordinate transformation #45

li123il opened this issue May 9, 2022 · 6 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@li123il
Copy link

li123il commented May 9, 2022

I want to know the mathematical formula of radar, lidar, camera and world coordinate conversion, but I can't find it in the conversion module. Do you have any suggestions? Thank you, boss.

@daohu527
Copy link
Owner

daohu527 commented May 9, 2022

  1. Do you mean the parameters? there're in modules\perception\production\data\perception.

for example, the camera extrinsic parameters modules\perception\production\data\perception\camera\params\front_6mm_extrinsics.yaml

  1. The transform use Transformation matrix to change different coordinates, A matrix multiplication can solve this problem, e.g.
    Eigen::Affine3d c2n;
    if (!transform_server.QueryTransform(camera_name, "novatel", &c2n)) {
      AINFO << "Failed to query transform from " << camera_name
            << " to novatel";
      return -1;
    }
    frame.camera2world_pose = pose * c2n;    //  here is 

@daohu527 daohu527 self-assigned this May 10, 2022
@daohu527 daohu527 added the help wanted Extra attention is needed label May 10, 2022
@li123il
Copy link
Author

li123il commented May 10, 2022

Yes, I want to know the code of coordinate system transformation in Apollo and the mathematical formula in the transformation process, just like the second example

@daohu527
Copy link
Owner

You should try to find information about transformation matrices. like link

@li123il
Copy link
Author

li123il commented May 10, 2022

I know this part of knowledge, and I may not express it accurately. I want to know which part of apollo's source code is used for conversion. Although the source code is well packaged and relatively large, the corresponding source code is not found, and it is not found in the transform module.

@daohu527
Copy link
Owner

daohu527 commented May 10, 2022

What source code do you need, the source code is in the library Eigen, coordinate transformation is matrix multiplication.

If you want to know apollo how to use it.
Apollo simple use it, and it's scattered all over the place, it's just one line of code, what's the point of finding them.

if you want to know the principle
Why not you to learning about transformation matrices first. The implementation of matrix multiplication is completely 2 different things for you to understand coordinate transformation

@li123il
Copy link
Author

li123il commented May 11, 2022

Thank you for your help. I seem to understand what you mean. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants