|
1 | 1 | <?xml version="1.0" ?>
|
| 2 | +<!-- |
| 3 | + Demonstrates the use of collide bitmasks. |
| 4 | +
|
| 5 | + The world has 3 boxes with the following bitmasks: |
| 6 | + * redBox: 0x01 (01) |
| 7 | + * greenBox: 0x02 (10) |
| 8 | + * yellowBox: 0x03 (11) |
| 9 | +
|
| 10 | + Which means that green and red can't collide with each other, but they both |
| 11 | + collide with yellow. Move them around to see it working! |
| 12 | +--> |
2 | 13 | <sdf version="1.6">
|
3 | 14 | <world name="shapes_bitmask">
|
4 | 15 | <physics name="1ms" type="ignored">
|
|
23 | 34 | <background>0.8 0.8 0.8</background>
|
24 | 35 | </scene>
|
25 | 36 |
|
26 |
| - <gui fullscreen="0"> |
27 |
| - |
28 |
| - <!-- 3D scene --> |
29 |
| - <plugin filename="GzScene3D" name="3D View"> |
30 |
| - <ignition-gui> |
31 |
| - <title>3D View</title> |
32 |
| - <property type="bool" key="showTitleBar">false</property> |
33 |
| - <property type="string" key="state">docked</property> |
34 |
| - </ignition-gui> |
35 |
| - |
36 |
| - <engine>ogre2</engine> |
37 |
| - <scene>scene</scene> |
38 |
| - <ambient_light>1.0 1.0 1.0</ambient_light> |
39 |
| - <background_color>0.8 0.8 0.8</background_color> |
40 |
| - <camera_pose>-6 0 6 0 0.5 0</camera_pose> |
41 |
| - </plugin> |
42 |
| - |
43 |
| - <!-- World control --> |
44 |
| - <plugin filename="WorldControl" name="World control"> |
45 |
| - <ignition-gui> |
46 |
| - <title>World control</title> |
47 |
| - <property type="bool" key="showTitleBar">false</property> |
48 |
| - <property type="bool" key="resizable">false</property> |
49 |
| - <property type="double" key="height">72</property> |
50 |
| - <property type="double" key="width">121</property> |
51 |
| - <property type="double" key="z">1</property> |
52 |
| - |
53 |
| - <property type="string" key="state">floating</property> |
54 |
| - <anchors target="3D View"> |
55 |
| - <line own="left" target="left"/> |
56 |
| - <line own="bottom" target="bottom"/> |
57 |
| - </anchors> |
58 |
| - </ignition-gui> |
59 |
| - |
60 |
| - <play_pause>true</play_pause> |
61 |
| - <step>true</step> |
62 |
| - <start_paused>true</start_paused> |
63 |
| - <service>/world/shapes_bitmask/control</service> |
64 |
| - <stats_topic>/world/shapes_bitmask/stats</stats_topic> |
65 |
| - |
66 |
| - </plugin> |
67 |
| - |
68 |
| - <!-- World statistics --> |
69 |
| - <plugin filename="WorldStats" name="World stats"> |
70 |
| - <ignition-gui> |
71 |
| - <title>World stats</title> |
72 |
| - <property type="bool" key="showTitleBar">false</property> |
73 |
| - <property type="bool" key="resizable">false</property> |
74 |
| - <property type="double" key="height">110</property> |
75 |
| - <property type="double" key="width">290</property> |
76 |
| - <property type="double" key="z">1</property> |
77 |
| - |
78 |
| - <property type="string" key="state">floating</property> |
79 |
| - <anchors target="3D View"> |
80 |
| - <line own="right" target="right"/> |
81 |
| - <line own="bottom" target="bottom"/> |
82 |
| - </anchors> |
83 |
| - </ignition-gui> |
84 |
| - |
85 |
| - <sim_time>true</sim_time> |
86 |
| - <real_time>true</real_time> |
87 |
| - <real_time_factor>true</real_time_factor> |
88 |
| - <iterations>true</iterations> |
89 |
| - <topic>/world/shapes_bitmask/stats</topic> |
90 |
| - |
91 |
| - </plugin> |
92 |
| - |
93 |
| - <!-- Entity tree --> |
94 |
| - <plugin filename="EntityTree" name="Entity tree"> |
95 |
| - <ignition-gui> |
96 |
| - <property type="bool" key="showTitleBar">false</property> |
97 |
| - <property type="string" key="state">docked</property> |
98 |
| - </ignition-gui> |
99 |
| - </plugin> |
100 |
| - |
101 |
| - <!-- Transform Control --> |
102 |
| - <plugin filename="TransformControl" name="Transform Control"> |
103 |
| - </plugin> |
104 |
| - |
105 |
| - </gui> |
106 |
| - |
107 | 37 | <light type="directional" name="sun">
|
108 | 38 | <cast_shadows>true</cast_shadows>
|
109 | 39 | <pose>0 0 10 0 0 0</pose>
|
|
144 | 74 | </link>
|
145 | 75 | </model>
|
146 | 76 |
|
147 |
| - <model name="boxA"> |
| 77 | + <model name="redBox"> |
148 | 78 | <pose>0 0 1.0 0 0 0</pose>
|
149 | 79 | <link name="link">
|
150 | 80 | <inertial>
|
|
185 | 115 | </link>
|
186 | 116 | </model>
|
187 | 117 |
|
188 |
| - <model name="boxB"> |
| 118 | + <model name="greenBox"> |
189 | 119 | <pose>0 0 3.0 0 0 0</pose>
|
190 | 120 | <link name="link">
|
191 | 121 | <inertial>
|
|
226 | 156 | </link>
|
227 | 157 | </model>
|
228 | 158 |
|
229 |
| - <model name="boxC"> |
| 159 | + <model name="yellowBox"> |
230 | 160 | <pose>0 0 6.0 0 0 0</pose>
|
231 | 161 | <link name="link">
|
232 | 162 | <inertial>
|
|
0 commit comments