How to optimize the control of manipulator

Typically: "How do I... ", "How can I... " questions
zhangm365
Posts: 46
Joined: 19 Jun 2021, 12:58

How to optimize the control of manipulator

Post 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.

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

Re: How to optimize the control of manipulator

Post 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

zhangm365
Posts: 46
Joined: 19 Jun 2021, 12:58

Re: How to optimize the control of manipulator

Post 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?

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

Re: How to optimize the control of manipulator

Post 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

zhangm365
Posts: 46
Joined: 19 Jun 2021, 12:58

Re: How to optimize the control of manipulator

Post 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

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

Re: How to optimize the control of manipulator

Post 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

zhangm365
Posts: 46
Joined: 19 Jun 2021, 12:58

Re: How to optimize the control of manipulator

Post 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?

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

Re: How to optimize the control of manipulator

Post 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

zhangm365
Posts: 46
Joined: 19 Jun 2021, 12:58

Re: How to optimize the control of manipulator

Post 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\)

fferri
Posts: 1187
Joined: 09 Sep 2013, 19:28

Re: How to optimize the control of manipulator

Post 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

Post Reply