Skip to content

Commit bdc5388

Browse files
Add collision/physics to rendered models (#2)
* update sdf template to enable the physics for object * Use the mesh geometry for collisions --------- Co-authored-by: Ruinian Xu <xrn94621@gmail.com>
1 parent 3e3fd9b commit bdc5388

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

description.sdf.template

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
<?xml version='1.0'?>
22
<sdf version="1.4">
33
<model name="@MODEL_NAME@_origin">
4-
<static>true</static>
4+
<pose>0 0 0.5 0 0 0</pose>
55
<link name="link">
66
<collision name="collision">
7-
<surface>
8-
<contact>
9-
<collide_without_contact>true</collide_without_contact>
10-
</contact>
11-
</surface>
127
<geometry>
13-
<box>
14-
<size>0.1 0.1 0.1</size>
15-
</box>
8+
<mesh>
9+
<uri>model://@MODEL_NAME@/mesh/@MODEL_NAME@_origin.dae</uri>
10+
<scale>1 1 1</scale>
11+
</mesh>
1612
</geometry>
13+
<surface>
14+
<friction>
15+
<ode>
16+
<mu>1</mu>
17+
<mu2>1</mu2>
18+
</ode>
19+
</friction>
20+
</surface>
1721
</collision>
22+
<inertial>
23+
<mass>1</mass>
24+
<inertia>
25+
<ixx>1</ixx>
26+
<iyy>1</iyy>
27+
<izz>1</izz>
28+
</inertia>
29+
</inertial>
1830
<visual name="visual">
1931
<geometry>
2032
<mesh>
@@ -25,4 +37,4 @@
2537
</visual>
2638
</link>
2739
</model>
28-
</sdf>
40+
</sdf>

0 commit comments

Comments
 (0)