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 simple example for calling C++ functions in Python by `ctypes`.

ctypes-example A simple example for calling C++ functions in Python by ctypes. Features call C++ function int bar(int* value, char* msg) with argumene

Yusu Pan 3 Nov 23, 2022
A simple and easy to use Spam Bot made in Python!

This is a simple spam bot made in python. You can use to to spam anyone with anything on any platform.

7 Sep 08, 2022
Utility to extract Fantasy Grounds Unity Line-of-sight and lighting files from a Univeral VTT file exported from Dungeondraft

uvtt2fgu Utility to extract Fantasy Grounds Unity Line-of-sight and lighting files from a Univeral VTT file exported from Dungeondraft This program wo

Andre Kostur 29 Dec 05, 2022
Similar looking domain detection using python fuzzywuzzy

Major cause of phishing and BEC incident is similar looking domain, if you detect it early, you can prevent incidents early, python fuzzywuzzy module let you do that

2 Nov 07, 2021
.bvh to .mcfunction file converter.

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

Hanmin Kim 28 Nov 21, 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
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
A Randomizer Oracle

Tezos Randomizer Tezod Randomizer "Oracle". It's a smart contract that you can call to get a random number between X and Y (for now). It uses entropy

Asbjorn Enge 19 Sep 13, 2022
🌲 A simple BST (Binary Search Tree) generator written in python

Tree-Traversals (BST) 🌲 A simple BST (Binary Search Tree) generator written in python Installation Use the package manager pip to install BST. Usage

Jan Kupczyk 1 Dec 12, 2021
A script to check for common mistakes in LaTeX source files of scientific papers.

LaTeX Paper Linter This script checks for common mistakes in LaTeX source files of scientific papers. Usage python3 paperlint.py file.tex [-i/x inc

Michael Schwarz 12 Nov 16, 2022
Helper script to bootstrap a Python environment with the tools required to build and install packages.

python-bootstrap Helper script to bootstrap a Python environment with the tools required to build and install packages. Usage $ python -m bootstrap.bu

Filipe LaΓ­ns 7 Oct 06, 2022
πŸ’‰ μ½”λ‘œλ‚˜ μž”μ—¬λ°±μ‹  μ˜ˆμ•½ 맀크둜 μ»€μŠ€ν…€ λΉŒλ“œ (속도 ν–₯상 버전)

Korea-Covid-19-Vaccine-Reservation μ½”λ‘œλ‚˜ μž”μ—¬ λ°±μ‹  μ˜ˆμ•½ 맀크둜λ₯Ό 기반으둜 ν•œ μ»€μŠ€ν…€ λΉŒλ“œμž…λ‹ˆλ‹€. 더 λΉ λ₯Έ λ°±μ‹  μ˜ˆμ•½μ„ λͺ©ν‘œλ‘œ ν•˜λ©°, 속도λ₯Ό μš°μ„ ν•˜κΈ° λ•Œλ¬Έμ— μ‚¬μš©μžλŠ” 이에 λŒ€μ²˜κ°€ κ°€λŠ₯ν•΄μ•Ό ν•©λ‹ˆλ‹€. μ§€μ •ν•œ μ’Œν‘œ λ‚΄ λŒ€κΈ°μ€‘μΈ λ³‘μ›μ—μ„œ μž”μ—¬ λ°±μ‹ 

Queue.ri 21 Aug 15, 2022
Run functions in parallel easily, with their results typed correctly!

typesafe_parmap pip install pip install typesafe-parmap Run functions in parallel safely with typesafe parmap! GitHub: https://github.com/thejaminato

James Chua 3 Nov 06, 2021
Simple RGB to HEX game made in python

Simple RGB to HEX game made in python

5 Aug 26, 2022
A script copies movie and TV files to your GD drive, or create Hard Link in a seperate dir, in Emby-happy struct.

torcp A script copies movie and TV files to your GD drive, or create Hard Link in a seperate dir, in Emby-happy struct. Usage: python3 torcp.py -h Exa

ccf2012 105 Dec 22, 2022
Automatic generator of readmes for git repositories (Includes file' listing)

Readme Generator We are bored of write the same things once and once again. We trust in the comments made inside of our files, and we decided to autom

Natalia Vera Duran 6 Jul 20, 2021
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
Package that allows for validate and sanitize of string values.

py.validator A library of string validators and sanitizers Insipired by validator.js Strings only This library validates and sanitizes strings only. P

Sanel Hadzini 22 Nov 08, 2022
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder

Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder

Gobinath 1.2k Jan 01, 2023
Quickly edit your slack posts.

Lightning Edit Quickly edit your Slack posts. Heavily inspired by @KhushrajRathod's LightningDelete. Usage: Note: Before anything, be sure to head ove

14 Nov 19, 2021