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

set_cartesian_impedance not affecting robot stiffness #10

Open
purpleyoda1 opened this issue Jun 28, 2024 · 2 comments
Open

set_cartesian_impedance not affecting robot stiffness #10

purpleyoda1 opened this issue Jun 28, 2024 · 2 comments

Comments

@purpleyoda1
Copy link

purpleyoda1 commented Jun 28, 2024

Hi!
I'm experiencing an issue with the set_cartesian_impedance function while working with an Emika Panda robot. The function doesn't seem to be changing the robot's stiffness at all, regardless of the input values. It remains as stiff as ever. The set_joint_impedance however works as expected.

def cartesian_imedance_test(robot: Robot):
    robot.set_cartesian_impedance([10., 10, 10, 200., 200, 200])
    input("press enter to reset impedance")
    robot.set_cartesian_impedance([2000., 2000, 2000, 200., 200, 200])

def joint_imedance_test(robot: Robot):
    robot.set_joint_impedance([10., 3000, 3000, 10, 3000, 3000, 3000])
    input("press enter to reset impedance")
    robot.set_joint_impedance([3000.]*7)

def main():
    IP = "192.168.3.10"
    robot = Robot(IP)
    gripper = Gripper(IP)
    robot.relative_dynamics_factor = 0.1
    robot.recover_from_errors()
    robot.set_ee([1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0])

    m = to_home()
    robot.move(m)

    #joint_imedance_test(robot)
    cartesian_imedance_test(robot)

if __name__ == "__main__":
    main()

Any thoughts about what is wrong? Or what i can do to try to identify/fix the issue?

@TimSchneider42
Copy link
Owner

Hi,

I am not sure I understand your code correctly. Do you just want the robot to use impedance control to hold its current position? It might be that the impedance parameters only have an effect while the robot is in control (that is, executing a motion).

What you could try is executing an asynchronous waypoint motion, where you set the minimum_time parameter of the waypoint to ensure that the motion keeps going (though I have never tested this parameter).

Another option could be the ExponentialImpedanceMotion class, which I have also never tested.

Please let me know how it goes.

Best,
Tim

@purpleyoda1
Copy link
Author

Thank you! Yes i just wanted it to hold the position while i physically checked for changes in the impedance by trying to move the robot. Will test the functions you suggested and come back to you

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

No branches or pull requests

2 participants