Tips for grabbing Objects in Dynamics

Typically: "How do I... ", "How can I... " questions
Post Reply
Mildred34
Posts: 19
Joined: 12 May 2023, 16:03

Tips for grabbing Objects in Dynamics

Post 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

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

Re: Tips for grabbing Objects in Dynamics

Post 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

Mildred34
Posts: 19
Joined: 12 May 2023, 16:03

Re: Tips for grabbing Objects in Dynamics

Post 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

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

Re: Tips for grabbing Objects in Dynamics

Post by coppelia »

I can't access the file, it seems I need some permission...

Cheers

Post Reply