-
-
Notifications
You must be signed in to change notification settings - Fork 14
Home
- Create robot Parts (Std_Part) with body (PartDesign_Body) and LCS (local coordinate system) of joint places. Like this - You can also import parts from other CAD systems (FreeCAD supports many formats).
- Create Robot
- Create Links and Joints. Tip: enable "show all" in links properties and fill Label and Label2 (Label 2 used as name of link, joint in URDF).
- Fill Links properties: Real, Visual Tip: Real and Visual can be same object. Tip: Only one solid body for link supported currently. Also nested parts in other parts with non-zero placement used as Real, Visual, Collision are not supported.
- Fill Joints with Links (parent, child)
- Do "Set placement - as system" or "Set placement - by orienteer" of "Origin" of joint.
- Do "Set placement - as system" of "Mounted placement" of link (optional). This is necessary if the zero coordinate of the object is not at the junction position or necessary to correct orientation of link.
- Create Collisions based on tool - "Box from bounded box" (or sphere, cylinder).
- Choose material of whole robot or individual links
- Use mass and inertia automatic calculation tool. Tip: Do it before export (because project changes can influence to inertia).
- Use "Export URDF" tool (it will create ROS 2 package with launchers for RViz and Gazebo).
- (optional) Use "External extended code generator" tool. It will generate startup script and docker related code with all dependencies (in that case you dont need to install ROS2 or Gazebo manually).
- Run:
cd docker/iron && bash run_basic.bash
in generated project . It will build and run container with project and let you container shell. After you can run Gazebo by ROS2 launcher. See README.md generated in package.
- Run:
Command-SetPlacement - docs of old "Set Placement" (deprecated) tool.
New tool "Set placement - as system" works in a similar way but always transfer firt orienteer (second selection) to position of second orienteer (third selection) and in relate to this transfer will be moved link or joint.
Fist Set Origin of join and after (optional) Set MountedPlacement of link.
Usage of face as reference for LCS - "Inertia" attachment type can help in some cases where need to place LCS on face.
The Origin property of the joint, which will then be the origin tag of the export URDF. Origin is joint transform from parent link.
You can directly change Origin of joints (click to ellipsis at property, change and click to apply).
Automatic ways of setting Origin of joint by:
"Set placement - by orienteer" tool.
Select (with pressed Ctrl):
- joint,
- LCS (target) where joint should be,
Joint will be moved to placement of target LCS.
OR
"Set placement - as system" tool.
Select (with pressed Ctrl):
- joint,
- LCS (source) in child Link,
- LCS (target) anywhere (f.e. in parent link).
- Click to "Set placement - as system" tool.
Source LCS will be moved to placement of target LCS and related Joint will be moved relative to source LCS. Source LCS and Joint will in same relative placement as before move.
The MountedPlacement is used to bring the shapes that constitute the link to the correct position. This placement is the transform from the origin of the shape to the location of the joint that is parent of this link.
You can directly change MountedPlacement of links (click to ellipsis at property, change and click to apply).
Automatic way of setting MountedPlacement of link by "Set placement - as system" tool.
Select (with pressed Ctrl):
- link,
- LCS (source) (point where joint must be connect to shape of this link, orientation of LCS will be orientation of this link),
- joint or any object (f.e. LCS)
- Click to "Set placement - as system" tool.
Source LCS will be moved to placement of target joint or any other selected object (f.e. LCS) and related link will be moved relative to source LCS. Source LCS and link will in same relative placement as before move.
- Select link or links and press "Box from bounding box" (sphere, cylinder) tool. Collisions created.
Tip: you can enable or disable display of generated collisions in FreeCAD by changing "Show Collisions" option in Robot element.
If you clear Collision property of Link and want to see what collision link also deleted turn off/on "Show Collisions" of Robot. It will delete collision links. This toggle also way to recreate collision links if you have binded new collision objects.
- Choose material of whole robot or individual link by tool - "Set material to whole robot or link".
- Press tool - "Calculate mass and inertia".
It is all you need to do for calculating mass and inertia.
Tip:: Setted inertia can be very small and you will not see it in link properties (because of limit on the number of decimal places), but you must see mass after successed inertia calculation. Also command will throw red messages if something wend wrong.
Robocar step by step (a lot of screenshots)
STEP file to robot in simulation - video