All Projects → yanshil → Fusion2PyBullet

yanshil / Fusion2PyBullet

Licence: MIT license
No description or website provided.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Fusion2PyBullet

pybullet ros
A bridge between ROS and PyBullet
Stars: ✭ 88 (+91.3%)
Mutual labels:  urdf, pybullet
RPN
Code Repository for Regression Planning Networks
Stars: ✭ 58 (+26.09%)
Mutual labels:  pybullet
RobotCreator
FreeCAD Workbench for URDF & SDF and Gazebo
Stars: ✭ 43 (-6.52%)
Mutual labels:  urdf
blender-robotics-utils
Set of utilities for exporting/controlling your robot in Blender
Stars: ✭ 26 (-43.48%)
Mutual labels:  urdf
URDF-Importer
URDF importer
Stars: ✭ 135 (+193.48%)
Mutual labels:  urdf
MeshCatMechanisms.jl
3D Visualization of mechanisms and URDFs using MeshCat.jl and RigidBodyDynamics.jl
Stars: ✭ 36 (-21.74%)
Mutual labels:  urdf
Fusion360WrapSketch
Wrap sketch curves around a cylinder
Stars: ✭ 33 (-28.26%)
Mutual labels:  fusion360
Fusion360-Scripts
A collection of Fusion360 scripts, mostly for generating animations
Stars: ✭ 60 (+30.43%)
Mutual labels:  fusion360
HelicalGearPlus
Generates straight, helical and herringbone external, internal and rack gears as well as non-enveloping worms and worm gears
Stars: ✭ 55 (+19.57%)
Mutual labels:  fusion360
katana driver
This stack contains hardware drivers, Gazebo plugins and other basic functionalities for the Neuronics Katana family of robot arms.
Stars: ✭ 16 (-65.22%)
Mutual labels:  urdf
Robotics-Object-Pose-Estimation
A complete end-to-end demonstration in which we collect training data in Unity and use that data to train a deep neural network to predict the pose of a cube. This model is then deployed in a simulated robotic pick-and-place task.
Stars: ✭ 153 (+232.61%)
Mutual labels:  urdf
staubli
ROS-Industrial Staubli support (http://wiki.ros.org/staubli)
Stars: ✭ 15 (-67.39%)
Mutual labels:  urdf
kinpy
Simple kinematics calculation toolkit for robotics
Stars: ✭ 48 (+4.35%)
Mutual labels:  urdf
idyntree
Multibody Dynamics Library designed for Free Floating Robots
Stars: ✭ 109 (+136.96%)
Mutual labels:  urdf
ADAM
ADAM implements a collection of algorithms for calculating rigid-body dynamics in Jax, CasADi, PyTorch, and Numpy.
Stars: ✭ 51 (+10.87%)
Mutual labels:  urdf
urdf-rs
URDF parser using serde-xml-rs for rust
Stars: ✭ 21 (-54.35%)
Mutual labels:  urdf
FloBaRoID
Framework for dynamical system identification of floating-base rigid body tree structures
Stars: ✭ 53 (+15.22%)
Mutual labels:  urdf
deep-rl-grasping
Train deep reinforcement learning model for robotics grasping. Choose from different perception layers raw Depth, RGBD and autoencoder. Test the learned models in different scenes and object datasets
Stars: ✭ 125 (+171.74%)
Mutual labels:  pybullet
SS-Replan
Online Replanning in Belief Space for Partially Observable Task and Motion Problems
Stars: ✭ 43 (-6.52%)
Mutual labels:  pybullet
kuka
ROS-Industrial KUKA support (http://wiki.ros.org/kuka)
Stars: ✭ 23 (-50%)
Mutual labels:  urdf

Fusion2Pybullet

简体中文 | English

Developed from @syuntoku14/fusion2urdf.

What is this script?

A Fusion 360 script to export urdf files. This is a PyBullet adpative version.

Note: Only support "Revolute", "Rigid" and "Slider" joint currently. Also I don't have plans to work on rigid group and other types of joints.

This exports:

  • .urdf files of the model
  • .stl files of your model
  • A example hello.py to load your model into PyBullet.

03/03/2021: Pull the fix for xyz calculation from 01/09/2021 commit d2e754086f092ac81c481a0c3862e3cecb1f4dfe in syuntoku14/fusion2urdf

  • If you see that your components move arround the map center in rviz try this update
  • More Infos see this link

03/27/2020 update2: Add a supplementary script Joint2Graphviz to check assembled structures.

03/27/2020 update: Add "Do not Capture Design History" to fix InternalValidationError. See Developer Notes

03/25/2020: Supporting exportation of nested components.

Fusion Add-in

Add this script into Fusion 360 via Tools -> Add-Ins

Before using this script

  1. Some other notes for getting avoid of warnings:
    1. Change language preference to English
    2. Rename any full-width symbol to half-width symbol (like and ())
  2. Set up base_link
  3. Suggestion: Use Joint2Graphviz to check your assembled structure!
  4. Check if your default unit is mm or not. If you set it to some other unit, you need to manually adjust the scale when exporting the stl fils. See FAQ

Using script inside Fusion 360: Example

  1. Set up the components properly
  • Unit should be mm (See FAQ if it's not)

  • A base_link

  • Your file should not conatin extra file link. If any, right click on the component, do 'Break Link'

    • File links will be generated when you do something like 'Insert into current design'
    • So please make sure you did had a backup when you do the 'Break link' operations.
  • Check component and joint names (Set English as the language if necessary)

  • IMPORTANT! Set up joints properly

    • Supplementary script: Joint2Graphviz will generate a txt file capable for Graphviz. Copy the content to WebGraphviz to check the graph. Usually a correct model should be a DAG with 'base_link' as the only root.

    • In fusion, when you hit 'J' to assemble joints, note that the exporter consider component 1 as 'child' and component 2 as 'parent'. For example, when you want to assemble a 4-wheel car with middle cuboid as base_link, you should assemble the vehicle with wheel as component 1 and 'base_link' as component 2.

    • For example, you should be assemble your model to make result of check_urdf simple_car.urdf like the following. i.e. BL, BR, FL, FR as component 1 and base_link as component 2 when you assemble these 4 joints.

     robot name is: simple_car
       ---------- Successfully Parsed XML ---------------
       root Link: base_link has 4 child(ren)
           child(1):  BL_1
           child(2):  BR_1
           child(3):  FL_1
           child(4):  FR_1
    
  1. Run the script and select storing location

    • Note: Don't save your file after running the scripts! DesignType will be set to "Direct Mode" and some temporary components will be created. That's not the changes you want!
  2. Enjoy from python hello_bullet.py !

FAQ

What to do when error pops out

  • Bugs are usually caused by wrongly set up joints relationships
  • Nest-component support might also lead to undocumented bugs. So remove the nesting structure helps a lot.

Since the script still cannot showing warnings and errors elegantly, if you cannot figure out what went wrong with the model while bugs are usually caused by wrongly set up joints relationships, you can do the following things:

  1. Make sure every joints are set up correct (parent and child relationship). If failed --->
  2. Re-tidy your design to make it not include any nest-components. Use this script. If failed --->
  3. Try the stable version Branch: stable.
  4. Run with debug mode and check what happens

How to check if I assembled my links and joints correctly

A supporting script here: Joint2Graphviz for details

What if my unit is not mm

You have to modify Bullet_URDF_Exporter/core/Link.py. Search scale

(Please ping me if you find any other place that should also be modified)

        # visual
        visual = SubElement(link, 'visual')
        origin_v = SubElement(visual, 'origin')
        origin_v.attrib = {'xyz':' '.join([str(_) for _ in self.xyz]), 'rpy':'0 0 0'}
        geometry_v = SubElement(visual, 'geometry')
        mesh_v = SubElement(geometry_v, 'mesh')
        mesh_v.attrib = {'filename': self.repo + self.name + '.stl','scale':'0.001 0.001 0.001'} ## scale = 0.001 means mm to m. Modify it according if using another unit
        material = SubElement(visual, 'material')
        material.attrib = {'name':'silver'}
        
        # collision
        collision = SubElement(link, 'collision')
        origin_c = SubElement(collision, 'origin')
        origin_c.attrib = {'xyz':' '.join([str(_) for _ in self.xyz]), 'rpy':'0 0 0'}
        geometry_c = SubElement(collision, 'geometry')
        mesh_c = SubElement(geometry_c, 'mesh')
        mesh_c.attrib = {'filename': self.repo + self.name + '.stl','scale':'0.001 0.001 0.001'} ## scale = 0.001 means mm to m. Modify it according if using another unit
        material = SubElement(visual, 'material')
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].