Skip to content

robot.payload(m=0, p=zeros) is not a no-op -- RNE result changes #638

Description

@petercorke

Background

Originally reported in #134 (over 5 years ago), maintainer commented at the time: "this is on the list of things to fix, it was a quick hack in the MATLAB version and not really proper." Still true.

Confirmed still broken (2026-08-25)

p560 = rtb.models.DH.Puma560()
q = [45, 70, -100, 60, 25, -140]  # degrees, converted to rad
zero_v = np.zeros(p560.n)
before = p560.rne(q=q, qd=zero_v, qdd=zero_v)
p560.payload(m=0, p=np.zeros(3))
after = p560.rne(q=q, qd=zero_v, qdd=zero_v)

before and after differ by up to 0.34 (in torque units) despite payload(m=0, p=zeros) supposedly being the identity operation (zero mass, zero offset). Reproduced directly on current main.

Next steps

Needs a real look at Robot.payload()'s implementation -- likely still carrying the "quick hack" behavior the maintainer flagged years ago. Not yet root-caused to a specific line (unlike the RNE/#483 cluster in #636).

Originally reported: #134.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtKnown technical debt / deferred cleanup, not a live bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions