Skip to content

Convert Fusion360 model to Webots Proto model

manx52 edited this page Nov 29, 2024 · 10 revisions

related issue: https://github.com/utra-robosoccer/soccerbot/issues/218 all of this could probably be dockerized!

Step 1:

  • download this fork locally and add utility to Fusion360 https://github.com/SpaceMaster85/fusion2urdf
  • this utility will generate URDF and STL files from your Fusion model
  • best practice:
    • keep components that are rigidly attached in the separate assembly files, then in the main assembly file use the subassemblies. The main assembly will have mostly rotational joints, the utility will only pick up the rotational joints while others will be ignored, which is good because we want fewer joints in our final urdf
    • add hand markers (small rectangular prisms) at the end of the hand
    • make sure bez is facing x direction
    • origin should be in the middle of the torso, y-axis going through the arms
    • the order of links matters! run pybullet pytest to see in what order pybullet is reading the links. That's what the control code expects. If it's not done in fusion, then the links have to be manually moved around in the URDF file
  • You need to generate project in Meters (m) and Millimeters (mm). m is needed for the urdf files, Take the smaller files needed for STL files

Step 2:

  • the generated collision mesh is complex
  • to simplify we can use this script: https://github.com/bit-bots/simplify_urdf_collision
  • the collision will be approximated to a box which will run much faster in simulation
  • the script will output URDF file with modified bounding boxes
  • python3 simplify_urdf_collision/src/simplify_urdf_collision/simplify.py -r soccerbot/bez2_description/urdf/bez2.urdf soccerbot/bez2_description/urdf/bez2_simple.urdf

Step 3:

Step 4:

Step 5:

  • Verify that the STL selected fits the visuals of the urdf
  • Run main.py in the scripts folder to run all of the automation scripts

Setup Blender