more documentation

This commit is contained in:
2019-02-28 15:00:40 +01:00
parent ef4dafdaf4
commit c2d25dfb4b
9 changed files with 84 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
#! /usr/bin/env python
"""Module for executing control for a given effector"""
"""Library for executing control for a given effector"""
from __future__ import division
import os
@@ -29,6 +29,7 @@ NAO_ARM = 0.22
def xyz(joint):
"""Get 3D coordinate of a joint in torso frame."""
return np.array(mp.getPosition(joint, FRAME_TORSO, False),
dtype=np.float64)[:3]
@@ -88,6 +89,7 @@ def jacobian(side):
ax_order = (y_axis, z_axis, x_axis, z_axis)
# Calculate the Jacobian after the formula from the report
axes = np.concatenate(
[get_transform(side + j).dot(ax) for j, ax in zip(JOINTS, ax_order)],
axis=1