## How to keep joints running in max torque

Typically: "How do I... ", "How can I... " questions
narutom
Posts: 5
Joined: 07 Jan 2019, 04:24

### How to keep joints running in max torque

hello
I am doing the simulation of the snake robot.
When gravity is -9.8, the joint can't hold on to the shape of the robot. So, I plan to keep joints running in max torque.
The part of my program is as follows.

Code: Select all

    A0=[0 0 -9.8];
[~]=vrep.simxSetArrayParameter(clientID,0,A0,vrep.simx_opmode_oneshot_wait);
target_torque=100.*ones(1,jointnum);
for c=1:jointnum
[forceCode(c)]=vrep.simxSetJointForce(clientID,joint(c),target_torque(c),vrep.simx_opmode_oneshot_wait);
end

for i=1:10
for c=1:jointnum
[returnCode(c)]=vrep.simxSetJointTargetPosition(clientID,joint(c),target_joint(i,c),vrep.simx_opmode_oneshot_wait);
end
vrep.simxSynchronousTrigger(clientID);
end

for c=1:jointnum
[~,force(c)]=vrep.simxGetJointForce(clientID,joint(c),vrep.simx_opmode_oneshot_wait);
end

At first, I set the torque as 100. In the end, I use vrep.simxGetJointForce to get the joint force. But the joint work as follows. The specified max. force/torque will be applied as long as the max. velocity is not reached. Once the max. velocity is reached, the applied force/torque drops to zero and the max. velocity is kept. So, the force is very low.
But I want to hold on to the shape of the robot. what should I do?
Thanks.

coppelia