Page 1 of 2

How to optimize the control of manipulator

Posted: 29 Nov 2021, 12:38
by zhangm365
Dear every senior:
Now, I am using the Haptic Device to control the manipulator(i.e, LBR_iiwa_7_R800), the inverse kinematic setting of the Coppeliasim are as follows:
https://picture2url.oss-cn-shenzhen.ali ... UwYjMyNDlk

Then, the manipulator can move flexibly by control of the Haptic Device.

However, when we use a custom control algorithm embedded in the script of the scene to control the motion of the manipulator, the motion result of the manipulator can not be as we want.

The problem is, how to optimize the control through some parameter settings or constraints or other way?

Thanks.

Re: How to optimize the control of manipulator

Posted: 30 Nov 2021, 05:39
by coppelia
Hello,

I am not sure I understand the question. Of course, in CoppeliaSim you can control/access models/objects/joints from several scripts at the same time, which will result in undefined behaviour. It is your responsibility to orchestrate everything.

Additionally, it seems you are using an old CoppeliaSim version. Starting with CoppeliaSim V4.2.0, you would also entirely set-up inverse kinematic tasks via scripting. This allows to be much more flexible and efficient, and debugging is greatly simplified too. Additionally, if will also be easier to orchestrate all functionality as you want.

Cheers

Re: How to optimize the control of manipulator

Posted: 03 Dec 2021, 08:31
by zhangm365
Yes, I'm using the V3.6.2. As shown in the screenshot above, how to specify the calculation method(i.e.DLS) of inverse kinematics in the latest version(V4.2.0) as in the previous version? In addition, how to represent some constraint variables of the manipulator, such as damping, joint limits, etc., in the script code?

Re: How to optimize the control of manipulator

Posted: 03 Dec 2021, 15:38
by coppelia
In V4.2.0+, you would for instance select the calculation method with simIK.setIkGroupCalculation
Have a look at the kinematics plugin page for an example, and the many examples in scenes/kinematics/ folder.

Cheers

Re: How to optimize the control of manipulator

Posted: 07 Dec 2021, 09:10
by zhangm365
Thanks your reply.
How to bind dummy tip(attached to the end of the manipulator) and target in IK Env?
Beside, the Coppeliasim's script support matrix operations or to load the matrix lib from https://github.com/davidm/lua-matrix

Re: How to optimize the control of manipulator

Posted: 09 Dec 2021, 15:37
by coppelia
You do that with simIK.addIkElementFromScene or simIK.addIkElement. Have a look at the demo scenes I referred in my previous post.

For matrix and vector operations, see this page, but also the matrix and transformation related API.

Cheers

Re: How to optimize the control of manipulator

Posted: 20 Dec 2021, 09:29
by zhangm365
OK, Thanks for your patience.
Beside, I would like to ask how this calculation method ( DLS ) calculates the position of the manipulator arm?

Re: How to optimize the control of manipulator

Posted: 20 Dec 2021, 14:13
by coppelia
all methods are based on the Jacobian inverse, i.e. linearization around current configuration. The DLS method (Damped least squares) will add damping, in order to get a more robust solution.

Cheers

Re: How to optimize the control of manipulator

Posted: 21 Dec 2021, 09:11
by zhangm365
Thanks.
The DLS method beside the damping, that is ,the least squares method, it makes the sum of squares of the error between the obtained data and the actual data to be minimum? i.e, \(\min\limits_b{||y_m(b) - y||}^2_2\)

Re: How to optimize the control of manipulator

Posted: 21 Dec 2021, 10:56
by fferri
Here you can find an introduction to IK which also treats DLS.

In short, the objective function minimized by DLS is:

\(
\| J \Delta \pmb\theta - \pmb{e} \|^2 + \lambda^2 \| \Delta \pmb\theta \|^2
\)

where \(\lambda\) is a damping constant > 0