Giter Club home page Giter Club logo

Comments (2)

joansola avatar joansola commented on May 23, 2024

Dear Alex,

Thanks for this suggestion. Before elaborating on it, I think we need a little rationale on what needs to be done, or what can be done. I say this because manif implements Lie theory and S^n are not Lie groups, just manifolds.

So we need to discuss how these S^n would integrate with the rest of manif:

What to do with

  • inverse
  • composition
  • exp / log
  • adjoint

how to frame the manifolds operators:

  • retract / lift --> our plus / minus operators in manif

Could you please comment on these issues?

Thank you /// Joan

from manif.

slovak194 avatar slovak194 commented on May 23, 2024

Dear @joansola ,
Thank you for your answer!

manif implements Lie theory and S^n are not Lie groups, just manifolds.

Yes, that is the reason of my question. The name of the repository manif[old] suggests that there might be room for manifolds, but not only Lie groups. There are similar benefits of using manifolds to describe robots' states or observations similar to what we have with lie groups such as correct increments/decrements and invariant preservation.

I'm not sure if it will be correct to inherit from LieGroupBase. This will require the implementation of such methods as inverse, composition, which may not be applicable to manifolds. Maybe the LieGroupBase itself should inherit from the ManifoldBase with a simpler interface, and manifolds inherit from ManifoldBase directly.

Please forgive me for some imperfect definitions.

inverse

May not be applicable. But I'm not sure.

composition

May not be applicable. But I'm not sure.

exp / log

Tangent space (plane for S2) can be defined at each point on a unit sphere. The basis for the tangent vector space can also be uniquely defined at each tangent plane and at the manifold origin (I do not use identity as it will require the composition). let's say the origin unit vector r0 = [1, 0, 0], then the basis at r0 is formed by projecting e_y and e_z components of a global basis onto the plane. Basis rotates together with the unit vector and tangent plane to form a unique tangent space and basis at each point on a sphere if it is rotated by a single shortest rotation (not a composition of rotations) with rotation around x = 0. As far as I can see - each point on a sphere can be reached in such a way while keeping the basis unique. The tangent vector then represents a linear speed of the vector tip and can be exponentiated into the rotation of the unit vector.
image

adjoint

It looks like it is impossible to define Adj for S2 at least if the basis in tangent space is defined as rotating the basis at the origin with a single shortest rotation. But I may be wrong here.

retract / lift --> our plus / minus operators in manif

Right plus can be seen as a rotation of the vector r1 around the axis which is formed by crossing tangent vector v1 with e_x by the angle which is equal to the norm of the v1. We have to go through the SO3Tangent and SO3 here to rotate r1. Something like:

def S3Tangent(yz):
    ex = np.array((1, 0, 0))
    vw = np.array((0, yz[0], yz[1]))
    vw_cross = np.cross(ex, vw)
    axis = vw_cross / np.linalg.norm(vw_cross)
    return mp.SO3Tangent(axis * np.linalg.norm(vw[1:]))

minus and left invariants can be achieved as well having SO3Tangent and SO3 as intermediate, or storage types.

To summarize:
As a naΡ—ve approach, we can use SO3 as an object that rotates origin r0 to r1, the first column of the SO3.rotation() as our unit vector r, and the linear speed of the tip of this vector as a vector in tangent space.

Best regards,
Alex

from manif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.