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
: (float) 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
: (int) Number of random restarts to perform when searching for a solution.max_iterations
: (int) Number of iterations for each round of search.only_core
: (bool) 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.return_frames
: (bool) Return the positions and orientations of each joint (structured specified in joint_names in config) as the third output field.
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.8.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29ccad571c9af45219c095b5f0b8360ed5c99fbbd4b9e3fb7717864a3adada6e |
|
MD5 | 093d39876f089618b1b63c879ea2ff7d |
|
BLAKE2b-256 | c8fe3c6d33beac1d849e9d9935e2c441484efb90f41e2df2b27beb0630ee3676 |
Hashes for lively_tk-0.8.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24f08a142f0bb49c6f3b812bf9e4cd1eaa7a83caaee7892b483970dedc517c3b |
|
MD5 | b384d9a906b7cc2af1e6e4cb8b6d35d7 |
|
BLAKE2b-256 | 4564f16e89154ab6ffb8f1f30c348a027f60af92665734228e19ef9ecf4fd064 |
Hashes for lively_tk-0.8.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f9fc023349346b243e71084c7cf8d78831dc161574411fd842687c6000c217f |
|
MD5 | a3c32d0994cbf5355a57b64657c39e11 |
|
BLAKE2b-256 | 05c7e962ff78d4798ad52ec3b0e70a173b985d565ebc11b5ce191d4e3ffe6c50 |
Hashes for lively_tk-0.8.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb66085c38acde6aff1af1192c49ce91804a88e6297fae95eb05584189d21069 |
|
MD5 | b3f8f712ca7859e58b074600c8355f11 |
|
BLAKE2b-256 | 5ece61ac76f6e02d51bb5087650239f370a2caad3841cd5742051a09fcd7040f |
Hashes for lively_tk-0.8.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4046d451b7d5e7e7a9089491cee251a3c0c2f7dbee44868c1247eaaaa86105d0 |
|
MD5 | 76890cc263634ecdf9f7b70bcb91aec6 |
|
BLAKE2b-256 | de37750b91a412fbfb684fb15a361ee80a17da854c2ffd981c552628d2f790b4 |
Hashes for lively_tk-0.8.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd4be43c818650e2148c6135938d2b2d941252c7e3f063488a140314ab4e9bb8 |
|
MD5 | dbb5d5f8fb882c2dd67e2ab26db0ce69 |
|
BLAKE2b-256 | 952d89aad1ece406040b75c2bc9e4f6446b7d41991c145eb309668ae4fd76f58 |
Hashes for lively_tk-0.8.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 695a30ccb4033d9340db56d7633d760b1838ba00ecb62904069c5ec74a03547b |
|
MD5 | 14e4a64d5d8ab25c2e8f178e0bf391d4 |
|
BLAKE2b-256 | a27411945ebcb0efbdf3805ef949b7b3ec95d4f758e9e2835ee6951bec62df13 |
Hashes for lively_tk-0.8.0-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0810766637ea794c16faf71d78a9e1029ab9ccbd0a5802a2a4743699c8fb349e |
|
MD5 | a36e065f0be13ef7a1f73afbde66edaf |
|
BLAKE2b-256 | 699be105fc0cb70b4a164a2f52cdc4b3b4479299601e4de4e829b85acec070a7 |