For more information on how to implement the new feature in your own model, keep reading.
A free motion joint creates a point and a frame, where the point is given with position defined in a 3-D reference frame, and the frame is given with orientation initially defined using an Euler angle sequence with three independent angles (hence 6-DOF). The latter are converted internally to quaternion state variables, to insure numerical stability. Translational and angular velocities are given in the created frame.
To create a free motion joint, first tap the menu button (three horizontal bars), tap the joints panel, then the plus button next to "Free Motion," Initial values and rate terms have the respective prefix, followed by '_t0', '_t1', '_t2', '_r0', '_r1', or '_r2'. The 't' corresponds to a translational term, and 'r' to rotational, with the numeric subscript (0, 1, 2) corresponding to the axes of the respective frame. For the inital angular terms, the numeric indices are for angles in the orientation sequence; for example, of rotation_sequence = 'ZYX' is used as in the default, then the '_r0' respects the orientation angle about the reference frame 'Z' axis, then '_r1' for the intermediate 'Y' axis, and '_r2' for the created 'X' axis.
To create the unstable motion for rotation about an iPhone's X-axis, I kept the default joint settings except for the following:
- initial_r0 = 1.0
- initial_r1 = 1.57
- rate_t1 = 4.0
- rate_t2 = 4.0
- rate_r0 = 26.1
- rate_r1 = -8.2
- rate_r2 = -8.0
The initial_r0 argument tips the phone counter-clockwise relative to the default screen by 1 radian, and initial_r0 rotates the phone 90deg to the right about its own Y-axis. The rate_t1 and rate_t2 arguments give the phone an initial velocity upward and with a slight angle so it travels in a nice arc. The angular velocity vector is given by the rate_r0, rate_r1, and rate_r2 arguments, with values here taken from onboard sensors when I tossed the iPhone in the air.
Completing the model requires creating a rigid body and attaching it to the created point and frame. I use the rigid body box, with the following non-default settings:
- ref_point_key = a
- ref_frame_key = A
- density = 2177.0
- length = 0.0673
- width = 0.1384
- height = 0.0073
These are all derived from published specifications for the iPhone 8, the model I own and used to record the sensor data for the video.
No comments:
Post a Comment