Skip to content

adaptive Li damping on ikine LM?  #395

Open
@francogassibe

Description

@francogassibe

Hi to the community and the developers of this amazing toolbox.
The 16 Sep, 2021 I cloned this repository, at the time the ikine_LM function had this cool behavior where the Li parameter adjusted itself if the error had increased or not with respect to the last q actualization.



                    # Compute possible new value of
                    qnew = q + dq

                    # And figure out the new error
                    enew = base.tr2delta(self.fkine(qnew, end=end).A, Tk.A)

                    # Was it a good update?
                    if np.linalg.norm(W @ enew) < np.linalg.norm(W @ e):
                        # Step is accepted
                        q = qnew
                        e = enew
                        Li /= 2
                        rejcount = 0
                    else:
                        # Step is rejected, increase the damping and retry
                        Li *= 2
                        rejcount += 1
                        if rejcount > rlimit:
                            failure = f"rejected-step limit {rlimit} exceeded"
                            break

I did an actualization and passed on to the 1.1 version to find out this Li parameter is no longer implemented.
I had some Cartesian trajectories to test the functioning of the toolbox and there are many of them that fail to ikine_LM (maybe due to been close to a singularity) with the new actualization. I don't know the reason to this change but i am inclined to tell that it made the algorithm more robust.
Anyone who can maybe ease my ignorance and explain me why this choice was made. Or maybe they just forgot to include it in the new versions.
Thanks on advance to all developers, this toolbox rules.

Originally posted by @francogassibe in #391

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions