I am trying to simulate an IMU attached to a model and get the angular velocity and linear acceleration measurements.
I set up a very simple model with a single pin joint connecting the ground to a body.
I added an offset frame to the body to simulate the IMU.
I can use
Code: Select all
model.setStateVariableValue(state,'/jointset/shoulder/shoulder_coord_0/speed',10)
Code: Select all
model.realizeVelocity(state)
Code: Select all
imu_frame_offset.getAngularVelocityInGround(state) : outputs [0 0 10]
Code: Select all
arm.realizeAcceleration(state)
print(imu_frame_offset.getAccelerationInGround(state)) : outputs [~[-nan(ind),-nan(ind),-nan(ind)],~[-nan(ind),-nan(ind),-nan(ind)]]
My end goal is to use full body motion capture data (joint positions, velocities, and accelerations) to simulate gyroscope and accelerometer measurements for an attached IMU.