Skip to main content

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:

  1. goals: a list of ObjectiveInput objects.
  2. time: a float indicating the current time. If no liveliness objectives are used, this has no effect.
  3. world: [NOT IMPLEMENTED]. Update the current model of the world to handle real-time collision avoidance.
  4. max_retries: Number of random restarts to perform when searching for a solution.
  5. max_iterations: Number of iterations for each round of search.
  6. 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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

lively_tk-0.7.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

lively_tk-0.7.0-cp39-cp39-macosx_10_15_x86_64.whl (697.0 kB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

lively_tk-0.7.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

lively_tk-0.7.0-cp38-cp38-macosx_10_15_x86_64.whl (697.0 kB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

lively_tk-0.7.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

lively_tk-0.7.0-cp37-cp37m-macosx_10_15_x86_64.whl (697.0 kB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

lively_tk-0.7.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

lively_tk-0.7.0-cp36-cp36m-macosx_10_15_x86_64.whl (697.4 kB view hashes)

Uploaded CPython 3.6m macOS 10.15+ x86-64

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