frankaemika / franka_ros

ROS integration for Franka research robots
https://frankaemika.github.io
Apache License 2.0
356 stars 308 forks source link

Switching Impedance #351

Open Marc-Morcos opened 1 year ago

Marc-Morcos commented 1 year ago

Hey, I noticed when switching the robot impedance with the "/franka_control/set_cartesian_impedance" service, it will freeze unless I turn off the moveit controller first (using "/controller_manager/switch_controller"), then set impedance, then turn the controller back on. As a result, the robot seems to sag down a bit when the controller is off, and stay in that sagged position even when the controller is turned on (until we move again). Is there a way to remedy this (maybe a way to switch impedance while the controller is on)?

marcbone commented 1 year ago

You are not supposed to call the setCartesianImpedance method while the robot is actively controlled. So you should stop the controller first, then call the method and then start the controller again. I am not quite sure what the reason for the sagging down is. You can try to switch the transmission mode here to velocity or effort and see what happens. I am curious what your research is about, so feel free to tell me if it is not super secret :sweat_smile: