DYNAMICS C API
C-compatible interface to the DYNAMICS library
Loading...
Searching...
No Matches
Parallel and planar linkage operations

Functions

int c_alloc_mechanism_link (int nframes, c_mechanism_link *lnk)
 Allocate a multi-frame mechanism link.
 
void c_free_mechanism_link (c_mechanism_link *lnk)
 Release a multi-frame mechanism link.
 
c_mechanism c_create_parallel_linkage (int nlinks, const c_mechanism_link *links, int njoints, const c_joint *joints, int base, int effector, const double *tool, int ldt)
 Create a spatial parallel linkage mechanism.
 
c_mechanism c_create_planar_linkage (int nlinks, const c_mechanism_link *links, int njoints, const c_joint *joints, int base, int effector, const double *tool, int ldt)
 Create a planar parallel linkage mechanism.
 
void c_free_mechanism (c_mechanism obj)
 Release a mechanism handle.
 
int c_mechanism_link_count (c_mechanism obj)
 Return the number of links in a mechanism.
 
int c_mechanism_joint_count (c_mechanism obj)
 Return the number of joints in a mechanism.
 
int c_mechanism_variable_count (c_mechanism obj)
 Return the number of mechanism variables.
 
int c_mechanism_loop_count (c_mechanism obj)
 Return the number of independent loops.
 
int c_mechanism_constraint_count (c_mechanism obj)
 Return the number of constraint equations.
 
int c_mechanism_degrees_of_freedom (c_mechanism obj)
 Return mechanism degrees of freedom.
 
int c_mechanism_actuated_variable_count (c_mechanism obj)
 Return the number of actuated variables.
 
int c_mechanism_space_dimension (c_mechanism obj)
 Return the mechanism spatial dimension.
 
int c_mechanism_link_frame_count (c_mechanism obj, int i)
 Return the frame count for a link.
 
void c_mechanism_link_frame (c_mechanism obj, int i, int k, double *T, int ldt)
 Return a link-frame transform.
 
void c_mechanism_get_configuration (c_mechanism obj, int n, double *q)
 Get the current mechanism configuration.
 
void c_mechanism_set_configuration (c_mechanism obj, int n, const double *q)
 Set the mechanism configuration.
 
void c_mechanism_body_transform (c_mechanism obj, int i, int n, const double *q, double *T, int ldt)
 Evaluate a body transform at a configuration.
 
void c_mechanism_end_effector_transform (c_mechanism obj, int n, const double *q, double *T, int ldt)
 Evaluate the end-effector transform.
 
void c_mechanism_constraints (c_mechanism obj, int n, const double *q, int nc, double *f)
 Evaluate mechanism constraint equations.
 
void c_mechanism_constraint_jacobian (c_mechanism obj, int n, const double *q, double *jac, int ldj)
 Evaluate the mechanism constraint Jacobian.
 
void c_mechanism_solve_configuration (c_mechanism obj, int na, const double *qa, int n, double *q, c_iteration_behavior *ib)
 Solve for a complete mechanism configuration.
 
void c_mechanism_forward_kinematics (c_mechanism obj, int na, const double *qa, double *T, int ldt, c_iteration_behavior *ib)
 Evaluate forward kinematics for a mechanism.
 
void c_mechanism_jacobian (c_mechanism obj, int na, const double *qa, double *jac, int ldj)
 Evaluate a mechanism Jacobian.
 
void c_mechanism_inverse_kinematics (c_mechanism obj, const double *trg, int ldt, int na, double *qa, c_iteration_behavior *ib)
 Solve mechanism inverse kinematics.
 

Detailed Description

Function Documentation

◆ c_alloc_mechanism_link()

int c_alloc_mechanism_link ( int  nframes,
c_mechanism_link *  lnk 
)

Allocate a multi-frame mechanism link.

Parameters
nframesNumber of link frames.
lnkLink initialized by the routine.
Returns
Zero on success; nonzero on allocation failure.

◆ c_free_mechanism_link()

void c_free_mechanism_link ( c_mechanism_link *  lnk)

Release a multi-frame mechanism link.

Parameters
lnkLink to release.

◆ c_create_parallel_linkage()

c_mechanism c_create_parallel_linkage ( int  nlinks,
const c_mechanism_link *  links,
int  njoints,
const c_joint *  joints,
int  base,
int  effector,
const double *  tool,
int  ldt 
)

Create a spatial parallel linkage mechanism.

Parameters
nlinksLink count.
linksLink definitions.
njointsJoint count.
jointsJoint definitions.
baseOne-based base-link index.
effectorOne-based end-effector link index.
toolTool transform.
ldtLeading dimension of tool.
Returns
Opaque mechanism handle, or NULL on failure.

◆ c_create_planar_linkage()

c_mechanism c_create_planar_linkage ( int  nlinks,
const c_mechanism_link *  links,
int  njoints,
const c_joint *  joints,
int  base,
int  effector,
const double *  tool,
int  ldt 
)

Create a planar parallel linkage mechanism.

Parameters
nlinksLink count.
linksLink definitions.
njointsJoint count.
jointsJoint definitions.
baseOne-based base-link index.
effectorOne-based end-effector link index.
toolTool transform.
ldtLeading dimension of tool.
Returns
Opaque mechanism handle, or NULL on failure.

◆ c_free_mechanism()

void c_free_mechanism ( c_mechanism  obj)

Release a mechanism handle.

Parameters
objMechanism handle.

◆ c_mechanism_link_count()

int c_mechanism_link_count ( c_mechanism  obj)

Return the number of links in a mechanism.

Parameters
objMechanism handle.
Returns
Link count.

◆ c_mechanism_joint_count()

int c_mechanism_joint_count ( c_mechanism  obj)

Return the number of joints in a mechanism.

Parameters
objMechanism handle.
Returns
Joint count.

◆ c_mechanism_variable_count()

int c_mechanism_variable_count ( c_mechanism  obj)

Return the number of mechanism variables.

Parameters
objMechanism handle.
Returns
Variable count.

◆ c_mechanism_loop_count()

int c_mechanism_loop_count ( c_mechanism  obj)

Return the number of independent loops.

Parameters
objMechanism handle.
Returns
Loop count.

◆ c_mechanism_constraint_count()

int c_mechanism_constraint_count ( c_mechanism  obj)

Return the number of constraint equations.

Parameters
objMechanism handle.
Returns
Constraint count.

◆ c_mechanism_degrees_of_freedom()

int c_mechanism_degrees_of_freedom ( c_mechanism  obj)

Return mechanism degrees of freedom.

Parameters
objMechanism handle.
Returns
Degrees of freedom.

◆ c_mechanism_actuated_variable_count()

int c_mechanism_actuated_variable_count ( c_mechanism  obj)

Return the number of actuated variables.

Parameters
objMechanism handle.
Returns
Actuated-variable count.

◆ c_mechanism_space_dimension()

int c_mechanism_space_dimension ( c_mechanism  obj)

Return the mechanism spatial dimension.

Parameters
objMechanism handle.
Returns
Space dimension.

◆ c_mechanism_link_frame_count()

int c_mechanism_link_frame_count ( c_mechanism  obj,
int  i 
)

Return the frame count for a link.

Parameters
objMechanism handle.
iOne-based link index.
Returns
Frame count.

◆ c_mechanism_link_frame()

void c_mechanism_link_frame ( c_mechanism  obj,
int  i,
int  k,
double *  T,
int  ldt 
)

Return a link-frame transform.

Parameters
objMechanism handle.
iOne-based link index.
kOne-based frame index.
TOutput transform.
ldtLeading dimension of T.

◆ c_mechanism_get_configuration()

void c_mechanism_get_configuration ( c_mechanism  obj,
int  n,
double *  q 
)

Get the current mechanism configuration.

Parameters
objMechanism handle.
nConfiguration length.
qOutput configuration.

◆ c_mechanism_set_configuration()

void c_mechanism_set_configuration ( c_mechanism  obj,
int  n,
const double *  q 
)

Set the mechanism configuration.

Parameters
objMechanism handle.
nConfiguration length.
qConfiguration values.

◆ c_mechanism_body_transform()

void c_mechanism_body_transform ( c_mechanism  obj,
int  i,
int  n,
const double *  q,
double *  T,
int  ldt 
)

Evaluate a body transform at a configuration.

Parameters
objMechanism handle.
iOne-based body index.
nConfiguration length.
qConfiguration values.
TOutput transform.
ldtLeading dimension of T.

◆ c_mechanism_end_effector_transform()

void c_mechanism_end_effector_transform ( c_mechanism  obj,
int  n,
const double *  q,
double *  T,
int  ldt 
)

Evaluate the end-effector transform.

Parameters
objMechanism handle.
nConfiguration length.
qConfiguration values.
TOutput transform.
ldtLeading dimension of T.

◆ c_mechanism_constraints()

void c_mechanism_constraints ( c_mechanism  obj,
int  n,
const double *  q,
int  nc,
double *  f 
)

Evaluate mechanism constraint equations.

Parameters
objMechanism handle.
nConfiguration length.
qConfiguration values.
ncConstraint count.
fOutput constraints.

◆ c_mechanism_constraint_jacobian()

void c_mechanism_constraint_jacobian ( c_mechanism  obj,
int  n,
const double *  q,
double *  jac,
int  ldj 
)

Evaluate the mechanism constraint Jacobian.

Parameters
objMechanism handle.
nConfiguration length.
qConfiguration values.
jacOutput Jacobian.
ldjLeading dimension of jac.

◆ c_mechanism_solve_configuration()

void c_mechanism_solve_configuration ( c_mechanism  obj,
int  na,
const double *  qa,
int  n,
double *  q,
c_iteration_behavior *  ib 
)

Solve for a complete mechanism configuration.

Parameters
objMechanism handle.
naNumber of actuated variables.
qaActuated variables.
nConfiguration length.
qConfiguration updated by the solver.
ibOutput iteration statistics.

◆ c_mechanism_forward_kinematics()

void c_mechanism_forward_kinematics ( c_mechanism  obj,
int  na,
const double *  qa,
double *  T,
int  ldt,
c_iteration_behavior *  ib 
)

Evaluate forward kinematics for a mechanism.

Parameters
objMechanism handle.
naNumber of actuated variables.
qaActuated variables.
TOutput end-effector transform.
ldtLeading dimension of T.
ibOutput iteration statistics.

◆ c_mechanism_jacobian()

void c_mechanism_jacobian ( c_mechanism  obj,
int  na,
const double *  qa,
double *  jac,
int  ldj 
)

Evaluate a mechanism Jacobian.

Parameters
objMechanism handle.
naNumber of actuated variables.
qaActuated variables.
jacOutput Jacobian.
ldjLeading dimension of jac.

◆ c_mechanism_inverse_kinematics()

void c_mechanism_inverse_kinematics ( c_mechanism  obj,
const double *  trg,
int  ldt,
int  na,
double *  qa,
c_iteration_behavior *  ib 
)

Solve mechanism inverse kinematics.

Parameters
objMechanism handle.
trgTarget transform.
ldtLeading dimension of trg.
naNumber of actuated variables.
qaActuated variables, updated by the solver.
ibOutput iteration statistics.