Skip to main content

Robotic Control Interface & Manipulation Planning Library

Project description

Robotic Control Interface & Manipulation Planning Library

A python library to operate a real or simulated robot, work with robot/world configurations, compute differentiable features, formulate and solve constrained optimization problems (for inverse kinematics, path optimization, and manipulation planning), and interfacing to various physical simulation engines.

These python bindings were developed for easier access to the uderlying C++ code base, esp. for teaching and students. This code base is how we (in the Learning & Intelligent Systems Lab) operate our robots.

Installation via pip (simulation only, no real Franka & realsense support)

  • The pip package was compiled for python3.8 .. 3.12, and most of the dependencies statically linked. A few are still loaded dynamically, which requires installing on Ubuntu:
sudo apt install liblapack3 freeglut3 libglu1-mesa libfreetype6 fonts-ubuntu python3 python3-pip
#latest Ubuntu: libglut3.12 and 'cd /usr/lib/x86_64-linux-gnu/ && sudo ln -s libglut.so.3.12 libglut.so.3'
  • pip-install robotic
pip install robotic numpy
  • Tests:
ry-info
python3 -c 'import robotic as ry; ry.test.RndScene()'
ry-view `python3 -m site --user-site`/robotic/rai-robotModels/scenarios/pandaSingle.g
  • Run all tutorial notebooks as a test and showcase (takes long):
pip install jupyter nbconvert matplotlib ipympl
git clone https://github.com/MarcToussaint/rai-tutorials.git
cd rai-tutorials
make run -j1

Installation from source with real Franka & realsense support

This assumes a standard Ubuntu 22.04 (or 20.04, 18.04) machine.

  • Install Ubuntu and python packages:

    sudo apt install --yes \
      g++ clang make gnupg cmake git wget \
      liblapack-dev libf2c2-dev libqhull-dev libeigen3-dev libann-dev \
      libjsoncpp-dev libyaml-cpp-dev libhdf5-dev libpoco-dev libboost-system-dev portaudio19-dev libusb-1.0-0-dev \
      libx11-dev libglu1-mesa-dev libglfw3-dev libglew-dev freeglut3-dev libpng-dev libassimp-dev \
      python3-dev python3 python3-pip
    
    python3 -m pip install --user numpy pybind11 pybind11-stubgen
    
  • Install some external libs by source. You can skip librealsense and libfranka if you disable below. (To speed up compilation, e.g., set

    export MAKEFLAGS="-j $(command nproc --ignore 2)"
    

    To standardize installations, I use a basic script:

    wget https://github.com/MarcToussaint/rai-extern/raw/main/install.sh; chmod a+x install.sh
    ./install.sh libccd
    ./install.sh fcl
    ./install.sh physx
    ./install.sh librealsense
    ./install.sh libfranka  ## for OLD frankas instead:   ./install.sh -v 0.7.1 libfranka
    
  • Clone, compile and install this repo (note the USE_REALSENSE and USE_LIBFRANKA options!):

    cd $HOME/git
    git clone --recursive https://github.com/MarcToussaint/robotic.git
    cd robotic
    cp _build_utils/CMakeLists-ubuntu.txt CMakeLists.txt
    export PY_VERSION=`python3 -c "import sys; print(str(sys.version_info[0])+'.'+str(sys.version_info[1]))"`
    cmake -DPY_VERSION=$PY_VERSION -DUSE_REALSENSE=ON -DUSE_LIBFRANKA=ON . -B build
    make -C build _robotic install
    
  • The following should also compile docstrings, but might fail as this is not yet robust across Ubuntu distributions:

    make -C build _robotic docstrings install
    
  • This should install everything in .local/lib/python*/site-packages/robotic. Test:

    cd $HOME
    ry-info
    python3 -c 'import robotic as ry; ry.test.RndScene()'
    
  • Recall that the user needs to be part of the realtime and dialout unix group:

    sudo usermod -a -G realtime <username>
    sudo usermod -a -G dialout <username>
    

    You need to log out and back in (or even reboot) for this to take effect. Check with groups in a terminal.

  • Now follow the Real Robot Operation Tutorial on the tutorials page to test and debug first steps with the real franka. In particular test ry-bot -real -up -home and debug as explained there.

Building the wheels within a manylinux docker

  • Build the docker
_build_utils/build-docker.sh
  • Compile wheels (this runs local/_build_utils/build-wheels.sh inside the docker -- see Makefile)
make wheels
  • Outside of docker, install locally with pip or push wheels to pypi
python3.8 -m pip install --user dist/robotic-*cp38*.whl --force-reinstall
python3.10 -m pip install --user dist/robotic-*cp310*.whl --force-reinstall
# or
twine upload dist/*.whl --repository robotic

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

robotic-0.2.0-cp312-cp312-manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.12

robotic-0.2.0-cp311-cp311-manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.11

robotic-0.2.0-cp310-cp310-manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.10

robotic-0.2.0-cp39-cp39-manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.9

robotic-0.2.0-cp38-cp38-manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.8

File details

Details for the file robotic-0.2.0-cp312-cp312-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for robotic-0.2.0-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30e7ff1133bc69697cc1da4b5934d05896f2eb4a11ff7ea07f0aea69b7ef6671
MD5 6725605b36ae04fae1694dafbc636588
BLAKE2b-256 7509c3b701b99769f1948f41e08fac9d1f5e9283d39cda95090c2b91e5cb5514

See more details on using hashes here.

File details

Details for the file robotic-0.2.0-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for robotic-0.2.0-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eedd541a48150715bc43e615c8c1d3d54ecfc1ca491b7ce90cb12ca4e80ef64c
MD5 b96888c6ed664bbe499a92ce35824426
BLAKE2b-256 b4a20a8374790618ef82b1e3875e5b890d22f65a74438b1630f17629cbcd4a77

See more details on using hashes here.

File details

Details for the file robotic-0.2.0-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for robotic-0.2.0-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a38d9e44c12d7eb518de0c11722c0bb94b6aea473bc13952fd6e0f4f8471d50
MD5 8badd29b9f57534f1d0d531e25f64409
BLAKE2b-256 e9d3018448c8dbef2fa07d5c30afdab685f4d0b242cb205c03022febc6651b06

See more details on using hashes here.

File details

Details for the file robotic-0.2.0-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for robotic-0.2.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 152704b296701094561415060b7e4f5c1fce8fe35e7f175157ed42954aea64c9
MD5 21c04b36e87a149f6d79d35a21f087d1
BLAKE2b-256 03f51525d50311ddee2de786cf472c392377f448499a5a0e3fb66f710d6afccf

See more details on using hashes here.

File details

Details for the file robotic-0.2.0-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for robotic-0.2.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 219bb35eb16497ed867a47ae3c37eb519583cb76e23e13f6afae8abfd4a7f1fc
MD5 27f012e92ff147e1b3d612721e4a8ce9
BLAKE2b-256 74bb1ea8da3b49a89fb208aa4521d695bced2fbf57bfdf63a48342b46d00408c

See more details on using hashes here.

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