Skip to content

[Question] run_diff_ik.py can't work without reset the arm to the default pose #2529

@nolann030628

Description

@nolann030628

Question

I want to write an IK function basd on the tutorial, and I don't want the pos to go back to the default pose so I comment the robot.write_joint_state_to_sim(joint_pos, joint_vel), but the arm seems to can not compute the right joint_pos_des.

 if count % 150 == 0:
            # reset time
            count = 0
        # reset joint state
            joint_pos = robot.data.default_joint_pos.clone()
            joint_vel = robot.data.default_joint_vel.clone()
            # robot.write_joint_state_to_sim(joint_pos, joint_vel)
            robot.reset()

the code I commented is show above, I want to know how to solve this and use this ik controller in my custom env. I would be more than appreciated for any useful suggestions!
Image

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