View source: R/kin.generate.trajectory.r
kin.generate.trajectory | R Documentation |
Generate index and thumb trajectories accordind to Brenner and Smeets' model (1998)
kin.generate.trajectory(start, end, phi, ap, MT, r, index.only = F)
start |
a vector consisting of the x, y and z coordinates of the start position |
end |
a vector consisting of the x, y and z coordinates of the end position (target's geometrical center) |
phi |
final grip orientation (in radians). Must be 0 <= phi <= 3/4*pi. In case the final end z coordinate is negative, phi is automatically changed in sign too (otherwise positive pi/2 would result in the index reaching closer than the thumb) |
ap |
approaching parameter, as in Brenner & Smeets (1998) |
MT |
movement time (in millisec) |
r |
radius of the target object |
index.only |
logical: should the index trajectory be computed alone? (TRUE for pointing/reaching simulation; FALSE for grasping simulation; default to FALSE) |
If phi = pi/2 it becomes pi/2+0.00001 to avoid an unknown bug in kin.SmoothAndDerive(). Since Brenner and Smeets' model assumes unconstrained path for each digit, when phi is > pi*.64 (pi*16/25) the index takes an internal trajectory with respect to the thumb.
libraries()
dig <- kin.generate.trajectory(start=c(200,-300,0), end=c(0,0,400), phi=pi/4, ap=1000, MT=1500, r=40)
ggplot() + geom_point(aes(indexXraw, indexZraw), data=dig, color='red') +
geom_point(aes(thumbXraw, thumbZraw), data=dig, color='blue') + coord_fixed()
plot3d(dig[,c(1,3,2)], col='red', radius=4, type='s')
spheres3d(dig[,c(4,6,5)], col="blue", radius=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.