-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix dh parameter labels and add method for calculating covariance in tangent space #99
Fix dh parameter labels and add method for calculating covariance in tangent space #99
Conversation
It turns out that some of the code assumes the vector of parameter blocks returned from ceres would be in the same order as when they were added. This is not the case because ceres is storing it in a map and when requested it iterates over the map and create a vector using the key so the order may not be the same. |
It also now prints out the parameters as shown below and it can be seen in this case ceres has the Target DH parameters listed first. Target DH Parameters:
- Constant
Camera DH Parameters:
- j1_d
- j2_d
- j3_d
- j4_d
- j5_d
- j6_d
- j1_theta
- j2_theta
- j3_theta
- j4_theta
- j5_theta
- j6_theta
- j1_r
- j2_r
- j3_r
- j4_r
- j5_r
- j6_r
- j1_alpha
- j2_alpha
- j3_alpha
- j4_alpha
- j5_alpha
- j6_alpha
Camera Mount to Camera Position Parameters:
- camera_mount_to_camera_x
- camera_mount_to_camera_y
- camera_mount_to_camera_z
Camera Mount to Camera Orientation Parameters:
- camera_mount_to_camera_rx
- camera_mount_to_camera_ry
- camera_mount_to_camera_rz
Target Mount to Target Position Parameters:
- target_mount_to_target_x
- target_mount_to_target_y
- target_mount_to_target_z
Target Mount to Target Orientation Parameters:
- target_mount_to_target_rx
- target_mount_to_target_ry
- target_mount_to_target_rz
Camera Chain Base to Target Chain Base Position Parameters:
- camera_base_to_target_x
- camera_base_to_target_y
- camera_base_to_target_z
Camera Chain Base to Target Chain Base Orientation Parameters:
- camera_base_to_target_rx
- camera_base_to_target_ry
- camera_base_to_target_rz |
b861eba
to
98ac988
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I'm on board with this change. I think it's worth looking into a simpler way extracting the covariance of the tangent space though
rct_optimizations/src/rct_optimizations/covariance_analysis.cpp
Outdated
Show resolved
Hide resolved
@marip8 Do you think all the function should be updated to return this as the covariance or keep it as a separate? |
@marip8 It should be ready for another look. |
@marip8 you good with me merging this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had a chance to fully look through this yet; I'll look at it in more detail tonight. One thought though: does it ever make sense not to compute the covariance in the tangent space? It seems like covariance between static variables is not valid
rct_optimizations/src/rct_optimizations/covariance_analysis.cpp
Outdated
Show resolved
Hide resolved
rct_optimizations/src/rct_optimizations/dh_chain_kinematic_calibration.cpp
Show resolved
Hide resolved
Yea, that was my thought is it is not needed. If you wanted the full covariance you would just pass it an empty masks. If you onboard I can just remove the new function and update the documentation on the other functions. Let me know if you agree and I will make the change. |
I think that makes sense; I'm on board with doing that. Like you mentioned, if you want the full covariance you can just pass empty masks (or we could make that the default value for that argument) |
I have updated computeCovariance to take a mask with the default being empty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this PR is making 5 sets of unrelated changes:
- Removing the Xenial build
- Fix for YAML include
- Moving print headers to
rct_common
- Adding a helper to the DH chain to get a relative transform
- Updating the covariance calculation
I'm okay with making these changes, but I would really prefer if we merged them as separate PRs in the order above. It makes it hard to look back and understand where changes were introduced if too many unrelated ones are made in the same PR
rct_optimizations/include/rct_optimizations/covariance_analysis.h
Outdated
Show resolved
Hide resolved
rct_optimizations/include/rct_optimizations/covariance_analysis.h
Outdated
Show resolved
Hide resolved
rct_optimizations/include/rct_optimizations/covariance_analysis.h
Outdated
Show resolved
Hide resolved
rct_optimizations/include/rct_optimizations/covariance_analysis.h
Outdated
Show resolved
Hide resolved
rct_optimizations/include/rct_optimizations/covariance_analysis.h
Outdated
Show resolved
Hide resolved
I wound not agree these are unrelated changes. These were all necessary to get something that was broken tested and fixed. I will clean up the commit history but I am not going to separate them into different PRs. In the end the only thing that is important is that the commit history reflect these changes. |
6a9b9cc
to
51a331b
Compare
I will follow up with a different PR to add a clang format file, CI Job and format the entire repo. |
That's fine; the main thing is being able to see the individual changes |
Sorry, I reread my comment. Please don't take it the wrong way. I understand your point but in this case I needed all of these changes with the exception of the moving the print utils in one branch for everything to work on a machine. The CI change was also need because some change I made broke the xenial build and I did not want to spend time fixing it for something that was EOL. |
51a331b
to
084d651
Compare
I think everything is address except the formatting issues, which I will fix in a followup PR using clang format. |
Can you remove the empty extrinsic data header file? It still looks to be added in this PR. Otherwise I think it should be ready to merge |
084d651
to
f92dcac
Compare
@marip8 I removed that file. |
@marip8 Thanks for reviewing this! |
This addresses two things and exposes one issue
and not sure how to fix.