Page 1 of 1

Tips for grabbing Objects in Dynamics

Posted: 31 May 2023, 14:23
by Mildred34
Hello,

I'm trying to grab objects with a franka panda gripper and with the Mujoco engine.

I tried to use a custom controller with the joint handle callback.
I changed friction parameters (friction, solimp, impratio).

But when the gripper is coming close the object ( a cuboid), it's always shaking.
Even though, the max torque, I use is really low.

Code: Select all

function sysCall_joint(inData)
    if inData.mode==sim.jointmode_dynamic then
        -- Simplest position controller example:
        local ctrl=inData.error*20
        local maxVelocity=ctrl
        
        if (maxVelocity>inData.maxVel) then
            maxVelocity=inData.maxVel
        end
        
        if (maxVelocity<-inData.maxVel) then
            maxVelocity=-inData.maxVel
        end
        
        local forceOrTorqueToApply=inData.force
    
        -- Following data must be returned to CoppeliaSim:
        local outData={vel=maxVelocity,force=forceOrTorqueToApply}
        return outData
    end
    
end
I don't know how to handle a gripping task, I need advice.

Thanks in advance,

Alexis

Re: Tips for grabbing Objects in Dynamics

Posted: 01 Jun 2023, 06:55
by coppelia
Hello Alexis,

can you share the scene? Also, if there is some shaking involved, make sure that there is no constraints that you oversaw (e.g. shape-shape collisions between adjacent bodies, etc.). You can enable display of contact points for that. Also, the armature parameter for joints is quite important with actuated joints in MuJoCo.

Cheers

Re: Tips for grabbing Objects in Dynamics

Posted: 01 Jun 2023, 09:47
by Mildred34
Hello,

I've succeeded to grab. I just can't have an actuator with more than 0.5N.
If more I think, I need to adjust the inertia matrix of every limb. And maybe the spring parameters of one of my joint.


My scene is here : https://drive.google.com/file/d/1S15W7K ... drive_link

I would work with low mass for now till I recalculate the inertia matrix for my gripper.

Cheers,

Alexis

Re: Tips for grabbing Objects in Dynamics

Posted: 02 Jun 2023, 06:50
by coppelia
I can't access the file, it seems I need some permission...

Cheers