Integrate forward dynamics
[T,Q,QD] = fdyn(ROBOT, T, TORQFUN) [T,Q,QD] = fdyn(ROBOT, T, TORQFUN, Q0, QD0) [T,Q,QD] = fdyn(ROBOT, T, TORQFUN, Q0, QD0, ARG1, ARG2, ...)
[T1,Q,QD] = fdyn(ROBOT, T1, TORQFUN)
integrates the dynamics of the robot over
the time interval 0 to T and returns vectors of time TI, joint position Q
and joint velocity QD. The initial joint position and velocity are zero.
The torque applied to the joints is computed by the user function TORQFUN:
[T1,Q,QD] = fdyn(ROBOT, T1, TORQFUN, Q0, QD0)
as above but allows the initial
joint position and velocity to be specified.
The control torque is computed by a user defined function
TAU = TORQFUN(T, Q, QD, ARG1, ARG2, ...)
where Q and QD are the manipulator joint coordinate and velocity state respectively, and T is the current time.
[T1,Q,QD] = fdyn(ROBOT, T1, TORQFUN, Q0, QD0, ARG1, ARG2, ...)
allows optional
arguments to be passed through to the user function.
This function performs poorly with non-linear joint friction, such as Coulomb friction. The ROBOT.nofriction() method can be used to set this friction to zero.
If TORQFUN is not specified, or is given as 0 or [], then zero torque is applied to the manipulator joints.
The builtin integration function ode() is used.