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
MITRE ATT&CK Lookup Tool

MITRE ATT&CK Lookup Tool attack-lookup is a tool that lets you easily check what Tactic, Technique, or Sub-technique ID maps to what name, and vice ve

Curated Intel 33 Nov 22, 2022
Build capture utility for Linux

CX-BUILD Compilation Database alternative Build Prerequisite the CXBUILD uses linux system call trace utility called strace which was customized. So I

GLaDOS (G? L? Automatic Debug Operation System) 3 Nov 03, 2022
Dill_tils is a package that has my commonly used functions inside it for ease of use.

DilllonB07 Utilities Dill_tils is a package that has my commonly used functions inside it for ease of use. Installation Anyone can use this package by

Dillon Barnes 2 Dec 05, 2021
Simple yet flexible natural sorting in Python.

natsort Simple yet flexible natural sorting in Python. Source Code: https://github.com/SethMMorton/natsort Downloads: https://pypi.org/project/natsort

Seth Morton 712 Dec 23, 2022
✨ Voici un code en Python par moi, et en français qui permet d'exécuter du Javascript en Python.

JavaScript In Python ❗ Voici un code en Python par moi, et en français qui permet d'exécuter du Javascript en Python. 🔮 Une vidéo pour vous expliquer

MrGabin 4 Mar 28, 2022
A simple python script to generate an iCalendar file for the university classes.

iCal Generator This is a simple python script to generate an iCalendar file for the university classes. Installation Clone the repository git clone ht

Foad Rashidi 2 Sep 01, 2022
A simple gpsd client and python library.

gpsdclient A small and simple gpsd client and library Installation Needs Python 3 (no other dependencies). If you want to use the library, use pip: pi

Thomas Feldmann 33 Nov 24, 2022
python package for generating typescript grpc-web stubs from protobuf files.

grpc-web-proto-compile NOTE: This package has been superseded by romnn/proto-compile, which provides the same functionality but offers a lot more flex

Roman Dahm 0 Sep 05, 2021
MongoDB utility to inflate the contents of small collection to a new larger collection

MongoDB Data Inflater ("data-inflater") The data-inflater tool is a MongoDB utility to automate the creation of a new large database collection using

Paul Done 3 Nov 28, 2021
Check the basic quality of any dataset

Data Quality Checker in Python Check the basic quality of any dataset. Sneak Peek Read full tutorial at Medium. Explore the app Requirements python 3.

MalaDeep 8 Feb 23, 2022
Cleaning-utils - a collection of small Python functions and classes which make cleaning pipelines shorter and easier

cleaning-utils [] [] [] cleaning-utils is a collection of small Python functions

4 Aug 31, 2022
Script to generate a massive volume of data in sql, csv, json or xml format

DataGenerator Made with Python Open for pull requests 1. Dependencies To install required dependencies run pip install -r requirements.txt 2. Executi

icrescenti 3 Sep 20, 2022
[P]ython [w]rited [B]inary [C]onverter

pwbinaryc [P]ython [w]rited [Binary] [C]onverter You have rights to: Modify the code and use it private (friends are allowed too) Make a page and redi

0 Jun 21, 2022
.bvh to .mcfunction file converter.

bvh-to-mcf .bvh file to .mcfunction converter

Hanmin Kim 28 Nov 21, 2022
A repo for working with and building daos

DAO Mix DAO Mix About How to DAO No Code Tools Getting Started Prerequisites Installation Usage On-Chain Governance Example Off-Chain governance Examp

Brownie Mixes 86 Dec 19, 2022
More routines for operating on iterables, beyond itertools

More Itertools Python's itertools library is a gem - you can compose elegant solutions for a variety of problems with the functions it provides. In mo

2.9k Jan 06, 2023
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
python script to generate color coded resistor images

Resistor image generator I got nerdsniped into making this. It's not finished at all, and the code is messy. The end goal it generate a whole E-series

MichD 1 Nov 12, 2021
Python based tool to extract forensic info from EventTranscript.db (Windows Diagnostic Data)

EventTranscriptParser EventTranscriptParser is python based tool to extract forensically useful details from EventTranscript.db (Windows Diagnostic Da

P. Abhiram Kumar 24 Nov 18, 2022
This tool lets you perform some quick tasks for CTFs and Pentesting.

This tool lets you convert strings and numbers between number bases (2, 8, 10 and 16) as well as ASCII text. You can use the IP address analyzer to find out details on IPv4 and perform abbreviation a

Ayomide Ayodele-Soyebo 1 Jul 16, 2022