# Simulating an impedance controller in gazebo

Hi,

I'm trying to simulate an impedance controller for a manipulator in Gazebo. Therefore I need Cartesian force measurement on the gripper, I'm doing this using the bumper plugin. I modeled an object which I should follow with constant force (=/0) with a specific trajectory. When in static contact with the object I get a good force measurement but as soon as I input the trajectory the grippoint is pulled out of the object and the force goes to zero. When executing the same trajectory without the object the reference trajectory is executed nicely. I'm simulating this in the empty.world file, using the following settings: <physics:ode> <stepTime>0.001</stepTime> <gravity>0 0 -9.8</gravity> <cfm>0.0000000001</cfm> <erp>0.2</erp> <quickStep>true</quickStep> <quickStepIters>280</quickStepIters> <quickStepW>1.3</quickStepW> <contactMaxCorrectingVel>100.0</contactMaxCorrectingVel> <contactSurfaceLayer>0.001</contactSurfaceLayer> <updateRate>100000000000000000000</updateRate> </physics:ode>

The objects contact stiffness is equal to 100 N/m. So the question is why doesn't Gazebo allow me to stay "inside" the object but wants to pull out to reach zero contanct force. Thanks in advance

edit retag close merge delete

How are you applying the trajectory? Are you simply prescribing the position or are you using a controller (/prescribing a joint force or acceleration).

( 2012-11-13 03:08:53 -0500 )edit

If you are just pescribing position i think this might be the cause of your error. The gripper then teleports' into the object, hence gets pushed out. Instead of gradually pushing in.(contact is basically simulated as a spring damper)

( 2012-11-14 10:42:46 -0500 )edit

Hey, I'm prescribing a position in the gripper end point Cartesian frame. I already fixed the problem by making a model of a spring, using two masses connected with a prismatic joint with limits ( =0) which gives a constraint violation error linear dependent on simulation parameters.

( 2012-11-19 02:38:22 -0500 )edit

You should post your answer on here, because others might profit from this knowledge. For what it is worth, i think the problem would not occur when you describe the motion in a continuous' way.

( 2012-11-21 09:04:17 -0500 )edit

Sort by » oldest newest most voted

From comment above:

Hey, I'm prescribing a position in the gripper end point Cartesian frame. I already fixed the problem by making a model of a spring, using two masses connected with a prismatic joint with limits ( =0) which gives a constraint violation error linear dependent on simulation parameters.

Teuntjez (Nov 19 '12)

more