motion capturing

Discussion in 'Modeling' started by Ana_Ha, Apr 5, 2017.

  1. hi emo,

    we are trying to interface motive with mjVive.
    we can manipulate different joints within our model in vr but we can't control the position/orientation of the model in the 3d space.

    thanks
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Not sure which model you are trying to control. Assuming it is one of the hand models, its wrist is attached to a mocap body with an equality constraint. So you have to move the position and orientation of the mocap body (mjData.mocap_pos/quat) based on motion capture data.
     
  3. Thanks for your reply.
    yes it is the hand model we are trying to control.
    I have used the mjData.mocap_pos but it doesn't seem to receive any data from OptiTrack. Are there any specific settings we need to set on the OptiTrack's settings (in the streaming pane) ?
     
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    You are using MuJoCo Pro, right? In that case, there is no automation for interfacing with Optitrack or any other motion capture device. You have to write the code that connects to the motion capture hardware/drivers, takes the motion capture data and inserts it in the corresponding MuJoCo fields at runtime. mjvive.cpp contains code that reads motion capture data from the HTC Vive, but not from any other hardware.
     
  5. yes it is mujoco pro.
    i can stream data from opti track but i can't move the location of the object. just for sanity check:
    can you give an example of how to place the object in specific x, y,z (in plain numbers i.e.: 5, 5, 5) location programmatically (not using the xml file) ?
    then i will stream the optiTrack data to the appropriate mujoco fileds.
     
  6. Emo Todorov

    Emo Todorov Administrator Staff Member

    d->mocap_pos[0] = 5;
    d->mocap_pos[1] = 5;
    d->mocap_pos[2] = 5;

    if you have multiple mocap bodies, the data for mocap body n is at 3*n, 3*n+1, 3*n+2
     
  7. Thank you emo! That helped