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
Spacegit is a .git exposed finder

Spacegit Spacegit is a basic .git exposed finder Usage: You need python3 installed to run spacegit use: python3 spacegit.py (url) Disclaimer: **This i

2 Nov 30, 2021
Personal Toolbox Package

Jammy (Jam) A personal toolbox by Qsh.zh. Usage setup For core package, run pip install jammy To access functions in bin git clone https://gitlab.com/

5 Sep 16, 2022
This tool analyzes the json files generated by stream-lnd-htlcs to find hidden channel demand.

analyze_lnd_htlc Introduction Rebalancing channels is an important part of running a Lightning Network node. While it would be great if all channels c

Marimox 4 Dec 08, 2022
Audio Steganography is a technique used to transmit hidden information by modifying an audio signal in an imperceptible manner.

Audio Steganography Audio Steganography is a technique used to transmit hidden information by modifying an audio signal in an imperceptible manner. Ab

Karan Yuvraj Singh 1 Oct 17, 2021
Pampy: The Pattern Matching for Python you always dreamed of.

Pampy: Pattern Matching for Python Pampy is pretty small (150 lines), reasonably fast, and often makes your code more readable and hence easier to rea

Claudio Santini 3.5k Jan 06, 2023
A collection of custom scripts for working with Quake assets.

Custom Quake Tools A collection of custom scripts for working with Quake assets. Features Script to list all BSP files in a Quake mod

Jason Brownlee 3 Jul 05, 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
Prime Path Generator is a prime path generator used to generate prime paths.

Prime Path Generator is a prime path generator used to generate prime paths.

1 Nov 06, 2021
EVE-NG tools, A Utility to make operations with EVE-NG more friendly.

EVE-NG tools, A Utility to make operations with EVE-NG more friendly. Also it support different snapshot operations with same style as Libvirt/KVM

Bassem Aly 8 Jan 05, 2023
Customized python validations.

A customized python validations.

Wilfred V. Pine 2 Apr 20, 2022
A simple, console based nHentai Code Generator

nHentai Code Generator A simple, console based nHentai Code Generator. How to run? Windows Android Windows Make sure you have python and git installed

5 Jun 02, 2022
Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method.

Astvuln Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method. Some search methods ar

Bitstamp Security 7 May 29, 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
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
✨ Voici un code en Python par moi, et en français qui permet de générer du texte Lorem.

Lorem Gen ❗ Voici un code en Python par moi, et en français qui permet de générer du texte Lorem. Dépendences : pip install lorem_text 💖 Enjoy 🎫 Mon

MrGabin 3 Jun 07, 2021
Python program for analyzing the output files of phonopy.

PhononTools Description Python program to analyze the results generated by phonopy. Using the .yaml and .dat files that phonopy generates one can plot

Harry LaBollita 8 Nov 27, 2022
Automatically Generate Rulesets for IIS for Intelligent HTTP/S C2 Redirection

Automatically Generate Rulesets for IIS for Intelligent HTTP/S C2 Redirection This project converts a Cobalt Strike profile to a functional web.config

Jesse 99 Dec 13, 2022
Basic loader is a small tool that will help you generating Cloudflare cookies

Basic Loader Cloudflare cookies loader This tool may help some people getting valide cloudflare cookies Installation 🔌 : pip install -r requirements.

IHateTomLrge 8 Mar 30, 2022
✨ Un générateur d'adresse IP aléatoire totalement fait en Python par moi, et en français.

IP Generateur ❗ Un générateur d'adresse IP aléatoire totalement fait en Python par moi, et en français. 🔮 Avec l'utilisation du module "random", j'ai

MrGabin 3 Jun 06, 2021
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

Mahmoud Hashemi 6k Jan 04, 2023