Skip to main content

Pepper Inverse/Forward Kinematics library

Project description

pepper_kinematics
=====================

Description
---------------------

Originally, Pepper does not provide any inverse kinematics function. This provides simple inverse kinematics funciton.

Example
---------------------
"""
Move work_pose first, then move 5 centimeters toward left (y axis positive side).
"""

import time
import numpy as np
import naoqi as n
import pepper_kinematics as pk

host = 'nao.local'
port = 9559

m = n.ALProxy("ALMotion", host, port)
m.setAngles(pk.left_arm_tags, pk.left_arm_work_pose, 1.0)

time.sleep(1.0)

current_angles = m.getAngles(pk.left_arm_tags)
current_position, current_orientation = pk.left_arm_get_position(current_angles)

target_position = current_position
target_position[1] = target_position[1] + 0.05 # 5 cm toward left
target_orientation = current_orientation # This is not supported yet

target_angles = p.left_arm_set_position(current_angles, target_position, target_orientation)
if target_angles:
m.setAngles(pk.left_arm_tags, target_angles, 1.0)


How to install
---------------------
sudo pip install pepper_kinematics

Copyright
---------------------
* author: Yuki Suga
* copyright: Yuki Suga @ ssr.tokyo
* license: GPLv3

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

pepper_kinematics-0.0.6.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file pepper_kinematics-0.0.6.tar.gz.

File metadata

File hashes

Hashes for pepper_kinematics-0.0.6.tar.gz
Algorithm Hash digest
SHA256 0256bacd616dd670b4ca0bdb4ceb382eb14d8e877a25c32865b459bb5971f2e6
MD5 e49bc98f15bfb445c86f3bd48a32ef14
BLAKE2b-256 48160635c2d2bcbb9d52595d7f2c6984babc62169695888eab5b503ec561fca7

See more details on using hashes here.

Supported by

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