Robot URDF

What is a URDF and why we need it?
A URDF is a file used in robotics to import the robot in a simulation. It uses the STL/CAD files as a base. Assemble them with rigid or rotatory joins, and save positions of each bone and pivot in the joints. To sum up, it is file that describe your robot in deep details and precision.
How to create a URDF for Botzo
From the CAD files, we created a URDF file for Botzo using Fusion 360 and fusion2urdf. A repo that give us a package for exporting URDF from a Fusion 360 packages.
Visit directly the repos if you don't understand something. This is a resume of what they do:
-
Webgraphviz (for debugging purposes)
-
fusion2urdf (for exporting URDF from Fusion 360 file assembled with joints)
Result and prcedure
You will use BOTZO_F360_JOINS.f3d file to build your urdf, or just use ours here.
Prepare STL
As stated in the Fusion2PyBullet repo and fusion2urdf, we must prepare our STL file properly with strict rules:
- All bodies/peaces/future links must be components.
- Add physical materials
- Add joint to connect all components. In fusion you can select various type of joint (static, rotational, etc...) and also the pivot point.
- Call one component as
base_link - Remove links of components (if the are right click on it and press Break Link)
-
Check STL joint-link structure using Webgraphviz. Here how:
- Download Joint2Graphviz repo as a ZIP.
- Extract the ZIP in a known directory.
-
Open terminal:
cd <path to Joint2Graphviz> Copy-Item ".\Joint2Graphviz-master\" -Destination "${env:APPDATA\Autodesk\Autodesk Fusion 360\API\Scripts\" -RecurseFor me was:
- Now the script to create acd C:\Users\orlan\OneDrive\Desktop\side_projects\Joint2Graphviz-master Copy-Item "..\Joint2Graphviz-master\" -Destination "..\..\..\..\AppData\Roaming\Autodesk\Autodesk Fusion 360\API\Scripts\" -Recurse.txtfile for your link graph is added to fusion - Open fusion - Open the file of the robot - Go to utility > Addins - UnderMy Scriptyou should seeJoint2Graphviz- Press it. It will create agraph.txt -
Copy and pase the text content to Webgraphviz and check your robot tf structure to be valid.
(for more infors check Joint2Graphviz readme)
Warning
- We discovered that URDF does NOT suport close loop. Our leg design is one big close loop. You can check
wrong_graphfolder to see a graph with a close loop... The URDF won't work if there is a close loop
Export URDF
- Download fusion2urdf
- Extract the ZIP in a known directory.
-
Open terminal:
cd <path to Fusion2PyBullet> Copy-Item ".\URDF_Exporter\" -Destination "${env:APPDATA}\Autodesk\Autodesk Fusion 360\API\Scripts\" -RecurseFor me was:
4. Open fusion > utils > addins > my scripts > Bullet_URDF_Exporter
(for more infors check fusion2urdf readme or Fusion2PyBullet readme)
-
You will recive a folder with all the scrips and files to simulate your robot in ROS/Gazebo or PyBullet. To simply extract the URDF from XACRO use this comand: