pycapacity.examples module

Overview

This modules implements some classes helping to test the pycapacity library.

For the moment, it contains the following classes:
  • FourLinkRobot: a class implementing the forward kinematics and jacobian matrix of a four link planar robot

class pycapacity.examples.FourLinkRobot[source]

Bases: object

forward_kinematics(joints)[source]

Function for calculating the forward kinematics of the four link planar robot

Parameters:

joints (numpy.array - joint angles) –

Returns:

x

Return type:

numpy.array - an array of positions of the end-effector

inertia(joints)[source]

Function calculating the inertia matrix of the four link planar robot

Parameters:

joints (numpy.array - joint angles) –

Returns:

M

Return type:

numpy.array - inertia matrix

jacobian(joints)[source]

Function calculating the jacobian matrix of the four link planar robot

Parameters:

joints (numpy.array - joint angles) –

Returns:

J

Return type:

numpy.array - jacobian matrix

joints_forward_kinematics(joints)[source]

Function for calculating the forward kinematics of the four link planar robot

Parameters:

joints (numpy.array - joint angles) –

Returns:

x

Return type:

numpy.array - an array of positions of each joint + end effector

plot(plt, q)[source]

Plot the four link robot in the current figure

Parameters:
  • plt (matplotlib.pyplot - current figure) –

  • q (numpy.array - joint angles) –