Skip to main content

Automatic Computation for Robot Design (ACRoD)

Project description

Automatic Computation for Robot Design (ACRoD)

Description

This repository is dedicated to develop functions for automatic computations for designing robotic manipulators.

Currently available functions

  • Jacobian formulation for planar and spatial manipulators around a given end-effector point. (This is useful in performing optimisation of Jacobian-based performance parameters of any non-redundant robot directly from its robot-topology matrix)

Installation

The package can be installed from PyPI by using the following command via terminal.

pip install acrod

Usage

Jacobian for planar manipulators

The topological information of a robot is to be specified by using its robot-topology matrix, as defined here. For a planar 2R serial manipulator, the robot topology matrix is given by

$$\left[\begin{matrix} 9 & 1 & 0 \\ 1 & 9 & 1 \\ 0 & 1 & 9 \end{matrix}\right]$$

The corresponding Jacobian function can be formulated as follows.

Firstly, the required functions are imported as shown below.

from acrod.functions import jacobian
from numpy import matrix

The robot-topology matrix for 3R planar serial manipulator is defined and jacobian information is processed via the imported jacobian class as follows.

M = matrix('9 1 0;1 9 1;0 1 9')
jac = jacobian(M, robot_type = 'planar')

Jacobian function is generated as shown below.

jacobian_function = jac.get_jacobian_function()

In the process of generating the above jacobian function, other attributes of the jacobian object also are updated. Symbolic Jacobian matrices can be extracted from the attributes. Since this is a serial robot, the matrix $J_a$ itself would be the Jacobian matrix of the manipulator. The matrix $J_a$ is extracted from Ja attribute of the jacobian object as follows.

symbolic_jacobian = jac.Ja
symbolic_jacobian

In an ipynb file of JupyterLab, the above code would produce the following output.

$$\left[\begin{matrix}- a_{y} + r_{(1,2)y} & - a_{y} + r_{(2,3)y} \\ a_{x} - r_{(1,2)x} & a_{x} - r_{(2,3)x} \\ 1 & 1\end{matrix}\right]$$

The above Jacobian is based on the notations defined and described here.

Active joint velocities, in the corresponding order, can be viewed by running the following lines.

active_joint_velocities = jac.active_joint_velocities_symbolic
active_joint_velocities

In an ipynb file of JupyterLab, the above code would produce the following output.

$$\left[\begin{matrix}\dot{\theta}_{(1,2)} \\ \dot{\theta}_{(2,3)}\end{matrix}\right]$$

Robot dimensional parameters can be viewed by running the below line.

robot_dimensional_parameters = jac.parameters_symbolic
robot_dimensional_parameters

In an ipynb file of JupyterLab, the above code would produce the following output.

$$\left[\begin{matrix}r_{(1,2)x} \\ r_{(1,2)y} \\ r_{(2,3)x} \\ r_{(2,3)y}\end{matrix}\right]$$

Robot end-effector parameters can be viewed by running the below line.

robot_endeffector_parameters = jac.endeffector_variables_symbolic
robot_endeffector_parameters

In an ipynb file of JupyterLab, the above code would produce the following output.

$$\left[\begin{matrix}a_{x} \\ a_{y}\end{matrix}\right]$$

Sample computation of Jacobian at the end-effector point $\textbf{a}=\hat{i}+2\hat{j}$ and at the configuration of $\textbf{r}_{(1,2)}=3\hat{i}+4\hat{j}$ and $\textbf{r}_{(2,3)}=5\hat{i}+6\hat{j}$

For the given set of dimensional parameters of the robot, the numerical Jacobian can be computed as follows.

end_effector_point = [1,2]
configuration_parameters = [3,4,5,6]
jacobian_at_the_given_configuration = jacobian_function(end_effector_point, configuration_parameters)
jacobian_at_the_given_configuration

The output produced by running the above code, is shown below.

array([[ 2,  4],
       [-2, -4],
       [ 1,  1]])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acrod-1.1.4.tar.gz (58.2 kB view hashes)

Uploaded Source

Built Distribution

acrod-1.1.4-py3-none-any.whl (33.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page