Set of utilities for exporting/controlling your robot in Blender

Overview

Blender Robotics Utils

This repository contains utilities for exporting/controlling your robot in Blender

Maintainers

This repository is maintained by:

@Nicogene

urdfToBlender

Python script that given the urdf of a robot as input, define the complete rig, in terms of bones, meshes and joint limits.

Dependencies

An easy way to install the dependencies is to use the conda binaries packages. Just install conda and then:

conda create -n blenderenv
conda activate blenderenv
conda install -c conda-forge -c robotology python= yarp idyntree
conda env config vars set PYTHONPATH=/where/the/bindings/are/installed

where is the python version used inside Blender.

Usage

Once installed correctly the dependencies run:

(Windows Powershell)

\blender.exe" --python-use-system-env ">
 & "C:\Program Files\Blender Foundation\Blender \blender.exe" --python-use-system-env

(Linux & macOs)

$ blender --python-use-system-env

Go to "Scripting" section, open urdfToBlender, then run. It will open a dialog for selecting the urdf to be converted to rig.

immagine

After selecting the urdf, the script creates the rig of the robot in term of armature and meshes.

Examples

iCub 2.5 iCub 3
immagine immagine

Known limitations

iCubNeckBlenderController 🚧

Simple demo script that opens a YARP remote_controlboard for controlling the iCub head, and attach to the animations frames a callback for moving the joints accordingly to the movements of the rig. Since it is script that has been created with the purpose to show the potentialities of Blender in robotics, this will be not improved/extended or maintained. Here is a video showing this simple controller on iCub.

PI07Demo.mp4

blenderRCBPanel 🚧

WORK IN PROGRESS

Comments
  • Document with mathematical notation the geometric model used by Blender

    Document with mathematical notation the geometric model used by Blender

    In https://github.com/robotology/blender-robotics-utils/blob/master/script/urdfToBlender.py we have a URDF --> Blender rig converter that is working fine on some URDF model, but creating problems on some other models. However, debugging the problem is tricky as we do not have a clear mathematical definition and/or understanding of how the Blender Armature system ( https://docs.blender.org/manual/en/latest/animation/armatures/structure.html#chains-of-bones ) works. In this issue we will document this with mathematical notation, so it will simplify future mantainance of the software.

    Unless noted otherwise, the notation used for expressing homegenous transforms is the one defined in https://research.tue.nl/en/publications/multibody-dynamics-notation-version-2, and as LaTeX formulas will be used in the issue, please install an appropriate plugin such as https://chrome.google.com/webstore/detail/mathjax-plugin-for-github/ioemnmodlmafdkllaclgeombjnmnbima?hl=en for Chrome or https://addons.mozilla.org/en-US/firefox/addon/green-pi/ for Firefox to visualize them in the browser.

    cc @Nicogene

    documentation 
    opened by traversaro 18
  • Fix joint angles in the panel when opening a saved animation

    Fix joint angles in the panel when opening a saved animation

    We noticed that when the user loads an already saved animation, the control panel does not correctly display the list of joint angles. The problem happens because the joints are loaded and displayed when the user presses the configure button. But when we load a configuration with an animation, the button configure is disabled, and the RCB panel is instead enabled. AS a consequence Blender cannot find the joints and the error occurs. The problem was solved by making sure that when the animation is loaded the button remains enabled, and all the rest is instead disabled.

    opened by marcello-goccia 1
  • Added drag and drop feature

    Added drag and drop feature

    @Nicogene and I implemented the drag and drop feature in Blender. We added a button to the RCB panel called Drag & Drop with which the user can use the mouse to reach a certain target.

    The way to use the feature is described below:

    1. The user selects the Base Frame and the End Effector Frame according to the joint he/she wants to move.
    2. Press the button Drag & Drop to activate the feature. Once the button is pressed the user loses control of Blender.
    3. The user moves the mouse pointer in the 3D space of Blender and clicks the right mouse button to drop the position.
    4. The user clicks on the right mouse button to deactivate the drag and drop feature and to bring back the control to Blender.

    The video below displays a robot animation done through the usage of the drag and drop feature:

    https://user-images.githubusercontent.com/19833605/167880668-5176a0c1-3110-41dc-be9f-8e0565752430.mp4

    opened by marcello-goccia 1
  • blenderRCBPanel: added section for reaching a cartesian target

    blenderRCBPanel: added section for reaching a cartesian target

    This PR adds a section in the panel for reaching a cartesian target defined in terms of transformation (xyz position + rpy rotation) with the end-effector frame, respect to the base frame.

    End effector frame and base frame can be selected by combobox as is shown in this video:

    https://user-images.githubusercontent.com/19152494/165498930-224c3871-620a-4c6c-9162-7e30c3578265.mp4

    enhancement 
    opened by Nicogene 1
  • Add enhancements to RCB Panel

    Add enhancements to RCB Panel

    This PR adds some improvements to the RCB Panel which ease the interaction with the robot, in particular:

    • the user can now upload a .json to configure the robot's parts.
    • the robot's parts are now displayed in a very intuitive list where its state (connected/disconnected) is highlighted through the use of an icon
    enhancement 
    opened by ilaria-carlini 1
  • blenderRCBPanel: add the check on joint limits

    blenderRCBPanel: add the check on joint limits

    This PR adds an extra check in the RCB panel, for skipping the targets that are outside the joints' boundaries.

    The limits are already set in the rig, but also if the joint in the rig does not goes over the limit, in the blender UI the angle value is not capped and it seems that from the API you get that value that is outside the boundaries, leading to a situation where the target can never be reached by the real robot.

    TO BE TESTED(at least on the simulator)

    enhancement 
    opened by Nicogene 1
  • blenderRCBPanel: remove from the joint list the bones with drivers

    blenderRCBPanel: remove from the joint list the bones with drivers

    Moreover, we handled the case when the urdf is not saved in the scene. In this case the "cartesian" section is disabled. Finally, we committed the visuomanip rig containing its urdf, in order to use the "reach target" panel.

    enhancement 
    opened by Nicogene 0
  • blenderRCBPanel: add list of controllable joints

    blenderRCBPanel: add list of controllable joints

    This PR adds the list of the controllable joints from the blenderRCBPanel. When enter the values in the entries set the keyframes that form your animation.

    This video displays the new behaviour of the panel

    https://user-images.githubusercontent.com/19833605/159922346-0bc9cd53-1a5a-4ea1-a7f7-453bdbdc1547.mp4

    enhancement 
    opened by marcello-goccia 0
  • [urdfToBlender] Made Panel installable as addons

    [urdfToBlender] Made Panel installable as addons

    This PR made the converter a panel that can be installed as addon in blender as follow:

    $ cd ~/.config/blender/<blender_version>/scripts/addons/
    $ ln -s /where/you/cloned/blender-robotics-utils/script/urdfToBlender  urdfToBlender
    

    Going to Edit > Preferences > Add-ons > Testing:

    immagine

    If everything went fine you should have this panel on the right under the Tools section:

    immagine

    After clicking "Select the urdf" it will be opened a file browse such as:

    immagine

    After selecting the urdf, the script creates the rig of the robot in term of armature and meshes.

    enhancement 
    opened by Nicogene 0
  • Add automatic rig generation

    Add automatic rig generation

    The rig generation is now automatically triggered by icub-models commits (see https://github.com/robotology/icub-models/pull/107)

    This trigger in icub-models triggered the conversion of the V2_5 and V2_7 iCub urdf (see action) and here is the resulting commit to master of blender-robotics-utils: https://github.com/Nicogene/blender-robotics-utils/commit/6d285513ed8e0fb72592fa9221c1cb6ba1e02faa

    enhancement 
    opened by Nicogene 0
  • urdfToBlender: add the possibility to run it from command line

    urdfToBlender: add the possibility to run it from command line

    It is now possible to create a rig from an urdf in a headless system as follow:

    (Windows Powershell)

     "C:\Program Files\Blender Foundation\Blender <blender_version>\blender.exe" --python-use-system-env -b -P "C:\where\you\have\blender-robotics-utils\script\urdfToBlender.py" -- --urdf_filename "C:\where\you\have\model.urdf" --blend_filename "C:\where\you\want\to\save\myrobot.blend"
    
    

    (Linux & macOs)

    $ blender --python-use-system-env -b -P "/where/you/have/blender-robotics-utils/script/urdfToBlender.py" -- --urdf_filename "/where/you/have/model.urdf" --blend_filename "/where/you/want/to/save/myrobot.blend"
    
    enhancement 
    opened by Nicogene 0
  • RCBPanel: fix movement for left part when using the cartesian space

    RCBPanel: fix movement for left part when using the cartesian space

    Currently, when setting the target to reach (or when using the drag and drop), the right part reaches the target as expected, but the left does not. We need to fix this. The suspect is that we are falling in a singularity of the kinematics: https://github.com/robotology/idyntree/issues/994

    bug 
    opened by Nicogene 0
  • Find a smart way for triggering the rigify when committing meshes in icub-models

    Find a smart way for triggering the rigify when committing meshes in icub-models

    In #9 we added the possibility to publish rigs in blender-robotics-utils as soon as a change in the urdfs is made in icub-models. We should add the trigger also when just the meshes are charged.

    enhancement 
    opened by Nicogene 0
  • urdfToBlender: Add support for boxes, not only cubes, in the conversion script

    urdfToBlender: Add support for boxes, not only cubes, in the conversion script

    The urdfToBlender script support for basic geometric shapes, unfortunately, Blender does not support natively boxes as primitive shapes, for now, all the box are imported as cubes, printing a warning.

    We can exploit the scale.x scale.y scale.z for deforming the cube.

    enhancement 
    opened by Nicogene 0
  • RCBPanel: implement

    RCBPanel: implement "smarter" thresholds

    When we tried the panel on the real robot, we experienced several issues on some arm's joints triggering delta's greater than 5 degrees. On other joints like the one on the head and torso that threshold was fine. Probably we have to think to put different thresholds for the parts, but this is very tricky to generalize on all the possible robots.

    One thing that we can do is to make the threshold "smarter" if the safety guard is triggered several consecutive times for a part, the threshold is increased for that part.

    enhancement 
    opened by Nicogene 0
  • RCBPanel: implement the control of all parts at once

    RCBPanel: implement the control of all parts at once

    We managed to control multiple parts of iCub, but for the moment we are controlling them sequentially. This may lead to discrepancies between the animation and the movements, also if the performances are pretty satisfying so far.

    The best thing would be to command all the parts in parallel via:

    • Use multithreading (this may introduce other problems, counting also that we are using python)
    • Use controlBoard_remapper
    enhancement 
    opened by Nicogene 0
Releases(v0.5.0)
  • v0.5.0(Aug 31, 2022)

    [0.5.0] - 2022-08-31

    blenderRCBPanel

    • Fixed when the urdf model is not saved inside the scene.
    • Removed from the list of joints the ones controlled via drivers.
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(May 26, 2022)

    [0.4.0] - 2022-05-26

    blenderRCBPanel

    • Added list of controllable joints for designing animations.
    • Added section for reaching a cartesian target.
    • Added Drag&Drop function for moving in the cartesian space.
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Feb 28, 2022)

    [0.3.0] - 2022-02-28

    addons_installer

    • Added python script for installing and enabling the blender addons of this repository.

    urdfToBlender

    • Code refactored for displaying the converter as panel that can be installed as addon.

    blenderRCBPanel

    • Added robot's parts configuration through a JSON file structured as the proposed template
    • Code refactored to be able to display the panel in the list of add-ons of blender
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Nov 29, 2021)

    [0.2.0] - 2021-11-29

    • Added action for automatically generate the rigs every time a commit is made in icub-models

    urdfToBlender

    • Added the support in urdfToBlender for the basic geometries
    • Added the possibility to run it headless.

    rigs

    • Added iCubBlenderV2_5_visuomanip.blend.

    blenderRCBPanel

    • Added changes for controlling iCub hands.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Aug 30, 2021)

    [0.1.0] - 2021-08-30

    • Added blenderRCBPanel python script that spawns a panel for controlling parts of the robot(for now tested only with iCub).
    • Added urdfToBlender python script that creates a rig starting from a urdf of a robot.
    • Added iCubBlenderV2_5.blend and iCubBlenderV3.blend.
    Source code(tar.gz)
    Source code(zip)
Owner
Robotology
Group software repositories of the iCub eco-system (but code developed is not necessarily iCub specific!).
Robotology
A Python package implementing various colour checker detection algorithms and related utilities.

A Python package implementing various colour checker detection algorithms and related utilities.

colour-science 147 Dec 29, 2022
Python utilities for writing cross-version compatible libraries

Python utilities for writing cross-version compatible libraries

Tyler M. Kontra 85 Jun 29, 2022
Michael Vinyard's utilities

Install vintools To download this package from pypi: pip install vintools Install the development package To download and install the developmen

Michael Vinyard 2 May 22, 2022
Data Utilities e.g. for importing files to onetask

Use this repository to easily convert your source files (csv, txt, excel, json, html) into record-oriented JSON files that can be uploaded into onetask.

onetask.ai 1 Jul 18, 2022
PyResToolbox - A collection of Reservoir Engineering Utilities

pyrestoolbox A collection of Reservoir Engineering Utilities This set of functio

Mark W. Burgoyne 39 Oct 17, 2022
Plone Interface contracts, plus basic features and utilities

plone.base This package is the base package of the CMS Plone <https://plone.org>. It contains only interface contracts and basic features and utilitie

Plone Foundation 1 Oct 3, 2022
A work in progress box containing various Python utilities

python-wipbox A set of modern Python libraries under development to simplify the execution of reusable routines by different projects. Table of Conten

Deepnox 2 Jan 20, 2022
Python based utilities for interacting with digital multimeters that are built on the FS9721-LP3 chipset.

Python based utilities for interacting with digital multimeters that are built on the FS9721-LP3 chipset.

Fergus 1 Feb 2, 2022
ZX Spectrum Utilities: (zx-spectrum-utils)

Here are a few utility programs that can be used with the zx spectrum. The ZX Spectrum is one of the first home computers from the early 1980s.

Graham Oakes 4 Mar 7, 2022
Blender 2.93 addon for loading Quake II MD2 files

io_mesh_md2 is a Blender 2.93 addon for importing Quake II MD2 files.

Joshua Skelton 11 Aug 31, 2022
Python script to get some stats on nodes in a Blender material nodetree

Python script to get some stats on nodes in a Blender material nodetree. It counts the nodes, the node types and the max deep level for group nodes.

Alek Mugnozzo 2 Sep 3, 2022
A set of Python scripts to surpass human limits in accomplishing simple tasks.

Human benchmark fooler Summary A set of Python scripts with Selenium designed to surpass human limits in accomplishing simple tasks available on https

Bohdan Dudchenko 3 Feb 10, 2022
This project is a set of programs that I use to create a README.md file.

This project is a set of programs that I use to create a README.md file.

Tom Dörr 223 Dec 24, 2022
'ToolBurnt' A Set Of Tools In One Place =}

'ToolBurnt' A Set Of Tools In One Place =}

MasterBurnt 5 Sep 10, 2022
Set of scripts for some automation during Magic Lantern development

~kitor Magic Lantern scripts A few automation scripts I wrote to automate some things in my ML development efforts. Used only on Debian running over W

Kajetan Krykwiński 1 Jan 3, 2022
jsoooooooon derulo - Make sure your 'jason derulo' is featured as the first part of your json data

jsonderulo Make sure your 'jason derulo' is featured as the first part of your json data Install: # python pip install jsonderulo poetry add jsonderul

jesse 3 Sep 13, 2021
A simple tool that updates your pubspec.yaml file, of a Flutter project, without altering the structure of your file.

A simple tool that updates your pubspec.yaml file, of a Flutter project, without altering the structure of your file.

null 3 Dec 10, 2021
A python package for your Kali Linux distro that find the fastest mirror and configure your apt to use that mirror

Kali Mirror Finder Using Single Python File A python package for your Kali Linux distro that find the fastest mirror and configure your apt to use tha

MrSingh 6 Dec 12, 2022
Make your functions return something meaningful, typed, and safe!

Make your functions return something meaningful, typed, and safe! Features Brings functional programming to Python land Provides a bunch of primitives

dry-python 2.6k Jan 9, 2023