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
Collection of code auto-generation utility scripts for the Horizon `Boot` system module

boot-scripts This is a collection of code auto-generation utility scripts for the Horizon Boot system module, intended for use in Atmosphère. Usage Us

4 Oct 11, 2022
Parse URLs for DOIs, PubMed identifiers, PMC identifiers, arXiv identifiers, etc.

citation-url Parse URLs for DOIs, PubMed identifiers, PMC identifiers, arXiv identifiers, etc. This module has a single parse() function that takes in

Charles Tapley Hoyt 2 Feb 12, 2022
An online streamlit development platform

streamlit-playground An online streamlit development platform Run, Experiment and Play with streamlit Components Develop full-fledged apps online All

Akshansh Kumar 3 Nov 06, 2021
A pythonic dependency injection library.

Pinject Pinject is a dependency injection library for python. The primary goal of Pinject is to help you assemble objects into graphs in an easy, main

Google 1.3k Dec 30, 2022
Here, I find the Fibonacci Series using python

Fibonacci-Series-using-python Here, I find the Fibonacci Series using python Requirements No Special Requirements Contribution I have strong belief on

Sachin Vinayak Dabhade 4 Sep 24, 2021
API for obtaining results from the Beery-Bukenica test of the visomotor integration development (VMI) 4th edition.

VMI API API for obtaining results from the Beery-Bukenica test of the visomotor integration development (VMI) 4th edition. Install docker-compose up -

Victor Vargas Sandoval 1 Oct 26, 2021
A collection of common regular expressions bundled with an easy to use interface.

CommonRegex Find all times, dates, links, phone numbers, emails, ip addresses, prices, hex colors, and credit card numbers in a string. We did the har

Madison May 1.5k Dec 31, 2022
Python Random Number Genrator

This Genrates Random Numbers. This Random Number Generator was made using python. This software uses Time and Random extension. Download the EXE file and run it to get your answer.

Krish Sethi 2 Feb 03, 2022
Multipurpose Growtopia Server tools, can be used for newbie to learn things.

Information Multipurpose Growtopia Server tools, can be used for newbie to learn things. Requirements - Python 3.x - Operating System (Recommended : W

Morphias 2 Oct 29, 2021
Homebase Name Changer for Fortnite: Save the World.

Homebase Name Changer This program allows you to change the Homebase name in Fortnite: Save the World. How to use it? After starting the HomebaseNameC

PRO100KatYT 7 May 21, 2022
Hide new MacBook Pro notch with black wallpaper.

Hide new MacBook Pro notch with black wallpaper.

Wang Chao 1 Oct 27, 2021
Give you a better view of your Docker registry disk usage.

registry-du Give you a better view of your Docker registry disk usage. This small tool will analysis your Docker registry(vanilla or Harbor both work)

Nova Kwok 16 Jan 07, 2023
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
A simulator for xkcd 2529's weirdly concrete problem

What is this? This is a quick hack implementation of a simulator for xkcd 2529's weirdly concrete problem. This is barely tested and I suck at computa

Reuben Steenekamp 6 Oct 27, 2021
Auto-generate /etc/hosts for HackTheBox machines

Auto-generate /etc/hosts for HackTheBox machines Save yourself some tedium on getting started on a new machine by having your /etc/hosts ready to go.

3 Feb 16, 2022
Generates a random prnt.sc link and display image.

Generates a random prnt.sc link and display image.

Emirhan 3 Oct 08, 2021
Python @deprecat decorator to deprecate old python classes, functions or methods.

deprecat Decorator Python @deprecat decorator to deprecate old python classes, functions or methods. Installation pip install deprecat Usage To use th

12 Dec 12, 2022
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.

3 Dec 10, 2021
Obsidian tools - a Python package for analysing an Obsidian.md vault

obsidiantools is a Python package for getting structured metadata about your Obsidian.md notes and analysing your vault.

Mark Farragher 153 Jan 04, 2023
A library to easily convert climbing route grades between different grading systems.

pyclimb A library to easily convert climbing route grades between different grading systems. In rock climbing, mountaineering, and other climbing disc

Ilias Antonopoulos 4 Jan 26, 2022