Control Revolute Joint

Post links to your CoppeliaSim videos, scenes and models
Post Reply
qaid marwan

Control Revolute Joint

Post by qaid marwan »

Hi
I want to control two revolute joints
1. one joint will be moved (control ) by using the trajectory motion but
2. the second i want to move (control) it by using the force sensor that it is used to record the data position of first joint and send it to the second joint as a feedback .
Hence:
is there any way can help me to control the second motor by using recorded data of force sensor ?
.........................................................................................................................................................
The second problem is related to PID controller ;
i have tried to use custom PID controller but i didn't get any changing in the joint position ?
can i get help for the aforementioned both problem ?
.........................................................................................................................................................

thanks

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

Re: Control Revolute Joint

Post by coppelia »

Hello,

the first thing is to make sure that both joints are dynamically enabled- I.e. is there a jumping ball icon next to them in the scene hierarchy while simulation is running? Or is there a warning icon instead?
Then, as far as I have understood your problem, you want to have your first joint not actuated, but move according to forces/torques acting on it. That joint should then be in force/torque mode, and the motor disabled.
If you want to copy or mimic the position of the first joint to the second joint, then the second joint should be in a kind of position control. So you can use the built-in PID controller (joint in force/torque mode, motor enabled, control looop enabled, PID control selected), or write your own controller via a joint control callback script.

Then you can read the position of the first joint with simGetJointPosition, and apply the same position to the second joint with simSetJointTargetPosition.

Cheers

qaid marwan

Re: Control Revolute Joint

Post by qaid marwan »

first of all , i would like to thank you for cooperation ...
and exactly that what i mean and i got the point that you suggested , but there is a warning icon with one joint that connected with PID controller while simulation is running .At the same time , i have tried to change the PID parameters "P,I,D" but i did not get any changes in the performance of the joint , and i dont know how to recognize the effect of the changing PID parameters on the joint in vrep ?

Cheers

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

Re: Control Revolute Joint

Post by coppelia »

If there is a warning icon, then it will not work, whatever PID parameters you select. Your joint needs to be dynamically enabled. Make sure you carefully read this page and this section in particular.

Cheers

Post Reply