addTargetVariables
Assign kinematic variables from KinematicsSolver object as targets
Description
addTargetVariables(
assigns the kinematic variables, ks
,ids
)ids
, of the KinematicsSolver
object,
ks
, as targets.
The output of the addTargetVariables
object function is a table
that lists the targeted variables in rows. Each row shows the details of a variable. For a
joint variable, the table shows the ID, joint type, block path, and unit. For a frame
variable, the table shows the ID, base and follower frames, and unit.
You can assign both frame and joint variables as target variables and add them in any order. When adding target variables, note that:
You cannot specify
LinearVelocity
frame variables as targets.You cannot specify
AngularVelocity
frame variables as targets.When using a
Rotation
type frame variable as target, you must specify the x and y components of the frame variable simultaneously.You must target the four joint position variables of a spherical primitive simultaneously.
You must target three joint velocity variables of a spherical primitive simultaneously.
You cannot target the joint position variable for the azimuth angle of a constant velocity primitive unless you also target the corresponding bend angle.
You cannot target the joint velocity variable for the azimuth velocity of a constant velocity primitive unless you also target the corresponding bend angle velocity.
During a search, the target variables serve as constraints for the system, and the
solver searches for a solution that is compatible with the targeted joint and frame
variables. Do not overconstrain the system with target variables. A system is
overconstrained if a kinematic loop in the system has a target for every joint. One way of
avoiding overconstraining is to reassign one of the joint variables from a target to an
initial guess by using the addInitialGuessVariables
object
function.
A variable can serve as both target and output. However, a variable cannot serve as both target and guess.
Input Arguments
Version History
Introduced in R2019a