A real-time robot motion control framework with built-in liveliness
Project description
LivelyTK Package
The LivelyTK framework provides a highly configurable toolkit for commanding robots in mixed modalities while incorporating liveliness motions. It is adapted from RelaxedIK framework.
To configure a robot, the easiest method is to use the LivelyStudio interface in the lively_tk_ros repository, which is a wizard for configuring the robot.
Once you have a config json file, you can create a Config
object from the loaded data using parse_config_data
:
import yaml
from datetime import datetime
from lively_tk import parse_config_data, LivelyIK
with open('path/to/config_file.json') as handle:
config_data = yaml.safe_load(handle)
config = parse_config_data(config_data)
This config can be used to initialize the LivelyTK solver:
solver = LivelyIK(config)
This solver can then be used when providing goals to the solver's solve
method:
timestamp = datetime.utcnow().timestamp()
inputs = [
ObjectiveInput(weight=5.0,vector=[1,2,0]),
ObjectiveInput(weight=3.0),
ObjectiveInput(weight=1.0,quaternion=[1,0,0,0])
]
base_position, joint_values = solver.solve(inputs,timestamp,max_retries=2)
The fields for solve are as follows:
goals
: a list of ObjectiveInput objects.time
: a float indicating the current time. If no liveliness objectives are used, this has no effect.world
: [NOT IMPLEMENTED]. Update the current model of the world to handle real-time collision avoidance.max_retries
: Number of random restarts to perform when searching for a solution.max_iterations
: Number of iterations for each round of search.only_core
: Ignore liveliness objectives and disable the second liveliness optimization. Note: Not advised to switch within runs. Only use this flag if you are not using liveliness objectives and want a slight speed-up.
If you need to restart a run, you can execute the reset method of the solver, and provide the starting base position and joint values:
solver.reset([0,0,0],[1,0,1.2,0.4,0.1])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for lively_tk-0.7.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 774d76f767ab2f756016bf2ddcdc7ec6a690891400ce792a6e021ac0b58ea22b |
|
MD5 | 311a8f75700b92a0a160fc54f6dadf67 |
|
BLAKE2b-256 | 3c5324951e1ab9a73b2b75ea478ee982e4f8729a3e96c5444e94c9cb386ff874 |
Hashes for lively_tk-0.7.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9cdd000ec7319a734c23e466908d50640847206ba804c2e87314172058b7d20 |
|
MD5 | ef1fd5f9db190c0940bbf00d4cde6c2d |
|
BLAKE2b-256 | 34d4da21829a9f09c3ed80071ef40780de76518a77e2e79ef4c687e4f719d779 |
Hashes for lively_tk-0.7.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e320d18575bdb8b0218010461aa8eebbf92d1148e30a394abfb5cc08f156073f |
|
MD5 | 7cbd34164ed08d1604eda21e5b30d3f0 |
|
BLAKE2b-256 | 480a493b755290d2503fb773bc7c77553dbfc211932663dc05239b4f35639166 |
Hashes for lively_tk-0.7.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4073e1723da483204dbb2008e6db9222d9eda2b4a29d144e6461e248b659ba07 |
|
MD5 | 2ece3275ab70d281e31ba9b8687022af |
|
BLAKE2b-256 | 6a5375e6cd50b0d84350b539957e85f8bed6480f7670c24a370abddd24099266 |
Hashes for lively_tk-0.7.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbc3c7398199786038acd8b550b3a8708801ac42f06fc176988cffb563893b33 |
|
MD5 | 70d2e3b0a182ed24d850bc9f4c0d5569 |
|
BLAKE2b-256 | 9354009f331d6b2fd50ed4edc0697abe691a722920c762f3f231a210d20782fc |
Hashes for lively_tk-0.7.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43e3356a57d5767d09a76ac87822da8c044c7e16a4a9b7019f8222de504593a4 |
|
MD5 | ed9eb0139f47bcf8a8f4dd30505437f1 |
|
BLAKE2b-256 | 4cc0297274075c91d024d32644710db104ac0f9187ff64759f7a964c238a2923 |
Hashes for lively_tk-0.7.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5be1ac3c95599ebe0ce836ee19b92cd99077817d1a12796f1482698133f2788c |
|
MD5 | 18b967c67061e504cb5689166970dd20 |
|
BLAKE2b-256 | 8fcf5d78faca15a3f6213c6369eb9bff7c7b25cac7b67f32e5fbc637b40c6090 |
Hashes for lively_tk-0.7.0-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db9ec4caefe0183b8ad9231e7debe12e91120758efe173072d77926dcacbbb7 |
|
MD5 | 5e2d48c9385b5a7e715be030f0ef7738 |
|
BLAKE2b-256 | 3efcbc4f9130cd81e48fe0f59ad7185fb30af08963e1f7f7b525853f6cb429ca |