Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the imu data #114

Open
JadeGreened opened this issue Jun 17, 2024 · 6 comments
Open

Questions about the imu data #114

JadeGreened opened this issue Jun 17, 2024 · 6 comments

Comments

@JadeGreened
Copy link

I finally get the imu data from my hololens! Thanks a lot~. But I notice that the imu data is a 4x4 matrix like this

[[ 0.05868477 -0.9801954 0.18913764 0. ]
[-0.96467817 -0.00694191 0.26333955 0. ]
[-0.25681123 -0.19791096 -0.94598055 0. ]
[-0.12868184 0.15060404 -0.22494759 1. ]]

Since I am new to imu-activity-recognition, I have no idea of what the rows and the columns mean. And the microsoft documentation did not explain the shape of the matrix. Could you please provide me with more detailed explanation or show me the relavant documentation, plz~.
if the data is present like this:
Research Mode IMU
Accelerometer (m/s^2)
Gyroscope (deg/s)
Magnetometer
Then why the matrix is four-dimensional?

@anjelomerte
Copy link

How exactly are you getting this matrix, could you share your implementation? Looking at https://github.com/jdibenes/hl2ss/blob/main/viewer/client_stream_rm_imu.py, 6 values (sensor_ticks, soc_ticks, x, y, z and temperature) are returned.

@JadeGreened
Copy link
Author

while (enable):
    data = client.get_next_packet()

    print(f'Pose at time {data.timestamp}')
    print(data.pose)

    imu_data = hl2ss.unpack_rm_imu(data.payload)
    count = imu_data.get_count()
    sample = imu_data.get_frame(0)

    print(f'Got {count} samples at time {data.timestamp}')
    print(f'First sample: sensor_ticks={sample.vinyl_hup_ticks} soc_ticks={sample.soc_ticks} x={sample.x} y={sample.y} z={sample.z} temperature={sample.temperature}')

client.close()
listener.join()

Actually It is the script that you showed to me. "data.pose" is the 4x4 matrix.

How exactly are you getting this matrix, could you share your implementation? Looking at https://github.com/jdibenes/hl2ss/blob/main/viewer/client_stream_rm_imu.py, 6 values (sensor_ticks, soc_ticks, x, y, z and temperature) are returned.

@JadeGreened
Copy link
Author

sry~ I forget the comment on the top of the script

@JadeGreened
Copy link
Author

problem solve :)

@JadeGreened
Copy link
Author

But if I want to have three types of data together

Port

Options:

hl2ss.StreamPort.RM_IMU_ACCELEROMETER

hl2ss.StreamPort.RM_IMU_GYROSCOPE

hl2ss.StreamPort.RM_IMU_MAGNETOMETER

Should I open 3 client for each ports?

@jdibenes
Copy link
Owner

Hello,
Yes. The data volume for these channels is low so multithreading should work or you can use the multiprocessing utilities like in the samples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants