vector 2 skew-symmetric matrix

Discussion in 'Feature Requests' started by Jongwoo Lee, Feb 15, 2018.

  1. Hello,

    I believe skew symmetric matrix is largely used in robotics community, thus suggest to include a function such as

    Code:
    mju_Vec2Skew(mjtNum res[9], const mjtNum vec[3]) 
    - currently I built my own ( does not look efficient tho).
     
    Last edited: Feb 15, 2018
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    True, however adding every function that is useful is not the design goal of MuJoCo. Functions that are used internally are exposed, but general-purpose functions that MuJoCo itself does not use are not available -- otherwise we would end up reinventing LAPACK.

    I doubt your implementation of the above function is inefficient -- all you have to do is copy the numbers from vec to res twice, and put minus signs in the right places. Any compiler should figure out how to do this efficiently...
     
  3. Understand. Which libraries do you recommend?

    I'm considering EIGEN for math operations and NLOPT for optimization solver, but very curious about what other libraries you are using! Hopefully they are available online...
     
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    I use libraries that I write -- especially for optimization, since none of the general-purpose optimizers are tailored to contact dynamics. There is a new product under development called Optico which will have optimizers built on top of MuJoCo. Can't promise when it will be released though. There are plenty of general-purpose optimizers out there you can use; I am not sure which ones are the best.

    Compilers are quite amazing these days, and the simplest C implementation often produces the fastest code (Fortran is even better, if you have the stomach for it :)

    As for EIGEN, some of my students are using it and complaining that the templates take a long time to compile, but otherwise the code seems efficient. You could also consider Intel MKL - it is now free. If I were to use a numeric library that someone else wrote, I would most likely pick MKL.
     
  5. Thank you for the reply!