Skip to content

CPose3DPDFGaussian composition broken in Python #1281

Description

@ihadzic

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions