[Python] How do I set the pose of an object in pydrake manually after creation?

Discussão em 'Python' iniciado por Stack, Agosto 20, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to create an object in pydrake that is loaded from a URDF (e.g. just a single-link URDF that has an object mesh), and be able to manually set the pose of the object as I wish after creation. What I've been doing so far is this:

    urdf = FindResourceOrThrow(my_urdf_path)
    parser.AddModelFromFile(urdf)
    frame = plant.GetFrameByName("my_frame")
    T = RigidTransform(p=pos, rpy=RollPitchYaw(rpy))
    plant.WeldFrames(plant.world_frame(), frame, T)


    That lets me set the pose on creation. However, I don't know how to change the pose once the plant has been finalized. I assume there's a way to do this but am struggling to find an example. Thanks in advance for your help.

    Continue reading...

Compartilhe esta Página