pybotics.kinematic_chain module

Kinematic chain module.

class pybotics.kinematic_chain.KinematicChain[source]

Bases: collections.abc.Sized, typing.Generic

An assembly of rigid bodies connected by joints.

Provides constrained (or desired) motion that is the mathematical model for a mechanical system.

Get links.

matrix

Convert chain to matrix of link parameters.

Rows = links Columns = parameters

ndof

Get number of degrees of freedom.

Returns:number of degrees of freedom
num_parameters

Get number of parameters of all links.

to_json() → str[source]

Encode model as JSON.

transforms(q: Optional[numpy.ndarray[Any, numpy.dtype[numpy.float64]]] = None) → Sequence[numpy.ndarray[Any, numpy.dtype[numpy.float64]]][source]

Generate a sequence of spatial transforms.

The sequence represents the given position of the kinematic chain. :param q: given position of kinematic chain :return: sequence of transforms

vector

Get the vector representation of the kinematic chain.

Returns:vectorized kinematic chain
class pybotics.kinematic_chain.MDHKinematicChain(links: Sequence[pybotics.link.MDHLink])[source]

Bases: pybotics.kinematic_chain.KinematicChain

Kinematic Chain of MDH links.

classmethod from_parameters(parameters: numpy.ndarray[Any, numpy.dtype[numpy.float64]]) → Any[source]

Construct Kinematic Chain from parameters.

Get links.

matrix

Convert chain to matrix of link parameters.

Rows = links Columns = parameters

ndof

Get number of degrees of freedom.

Returns:number of degrees of freedom
num_parameters

Get number of parameters of all links.

to_json() → str

Encode model as JSON.

transforms(q: Optional[numpy.ndarray[Any, numpy.dtype[numpy.float64]]] = None) → Sequence[numpy.ndarray[Any, numpy.dtype[numpy.float64]]][source]

Get sequence of 4x4 transforms.

vector

Get parameters of all links.