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

CPose3DPDFGaussian composition broken in Python #1281

Closed
ihadzic opened this issue Aug 11, 2023 · 1 comment · Fixed by #1283
Closed

CPose3DPDFGaussian composition broken in Python #1281

ihadzic opened this issue Aug 11, 2023 · 1 comment · Fixed by #1283

Comments

@ihadzic
Copy link

ihadzic commented Aug 11, 2023

I am trying to compose two uncertain poses using Jacobian composition. I go from ROS poses to MRPT poses, which seems to work fine:

        p1mrpt = ros_bridge.ROS_PoseWithCovariance_msg_to_CPose3DPDFGaussian(p1)
        p2mrpt = ros_bridge.ROS_PoseWithCovariance_msg_to_CPose3DPDFGaussian(p2)

where p1 and p2 are PoseWithCovariance type from ROS. Printing p1mrpt and p2mrpt gives me correct result.

Then when I try to add p1mrpt and p2mrpt that breaks because __add__ method (and therefore + operator) is missing. Deterministic poses (CPose3DPDF) seem to have + operator and in old bindings + operator also worked for uncertain poses.

I next tried this for a workaround given the methods that are available:

        p1cov, p1mean = p1mrpt.getCovarianceAndMean()
        p2cov, p2mean = p2mrpt.getCovarianceAndMean()
        pmrpt = mrpt.poses.CPose3DPDFGaussian.jacobiansPoseComposition(p1mean, p2mean, p1cov, p2cov)

That returned None type, so that seems to be broken too.

Am I missing something and if it's really a bug, is there a viable workaround?

@jlblancoc
Copy link
Member

I confirm it's an issue, the operators are not being wrapped anymore. I'll fix it asap.

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

Successfully merging a pull request may close this issue.

2 participants