1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Open Dynamics Engine: World</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>World</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dWorldID </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g929067266d630fb745f752042d685fc7">dWorldCreate</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new, empty world and return its ID number. <a href="#g929067266d630fb745f752042d685fc7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g5a2e5b1d2d6a1376dca239b488e629f9">dWorldDestroy</a> (dWorldID world)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a world and everything in it. <a href="#g5a2e5b1d2d6a1376dca239b488e629f9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ga1b220b922215b335572c699cf8f8cad">dWorldSetGravity</a> (dWorldID, dReal x, dReal y, dReal z)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the world's global gravity vector. <a href="#ga1b220b922215b335572c699cf8f8cad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge1a29b6a91cc1910a982c916ae4dee4a"></a><!-- doxytag: member="world::dWorldGetGravity" ref="ge1a29b6a91cc1910a982c916ae4dee4a" args="(dWorldID, dVector3 gravity)" -->
ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ge1a29b6a91cc1910a982c916ae4dee4a">dWorldGetGravity</a> (dWorldID, dVector3 gravity)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the gravity vector for a given world. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gacd0778bdaa939d22f093fc2d5d5f868">dWorldSetERP</a> (dWorldID, dReal erp)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the global ERP value, that controls how much error correction is performed in each time step. <a href="#gacd0778bdaa939d22f093fc2d5d5f868"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g033cd87a0b22889a94d4d84149bda5a0">dWorldGetERP</a> (dWorldID)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the error reduction parameter. <a href="#g033cd87a0b22889a94d4d84149bda5a0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g8b7913fe46d0afc468418c655da79233">dWorldSetCFM</a> (dWorldID, dReal cfm)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the global CFM (constraint force mixing) value. <a href="#g8b7913fe46d0afc468418c655da79233"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gc7a431f2b3fc6f887fe91ad676828ba3">dWorldGetCFM</a> (dWorldID)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the constraint force mixing value. <a href="#gc7a431f2b3fc6f887fe91ad676828ba3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g8f547ebeb3deed27e0f7b8143d475f50">dWorldStep</a> (dWorldID, dReal stepsize)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Step the world. <a href="#g8f547ebeb3deed27e0f7b8143d475f50"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ga9c564b4dd7d8fa4c6f4b32dd95fc33a">dWorldImpulseToForce</a> (dWorldID, dReal stepsize, dReal ix, dReal iy, dReal iz, dVector3 force)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an impulse to a force. <a href="#ga9c564b4dd7d8fa4c6f4b32dd95fc33a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gc24fadc1d42b65ca3563e40bc1f0fec1">dWorldQuickStep</a> (dWorldID w, dReal stepsize)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Step the world. <a href="#gc24fadc1d42b65ca3563e40bc1f0fec1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g9d852689d87d28a3d4947eda59c5ba7e">dWorldSetQuickStepNumIterations</a> (dWorldID, int num)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the number of iterations that the QuickStep method performs per step. <a href="#g9d852689d87d28a3d4947eda59c5ba7e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ga51acfac06347fd27ff926d37672ce3c">dWorldGetQuickStepNumIterations</a> (dWorldID)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the number of iterations that the QuickStep method performs per step. <a href="#ga51acfac06347fd27ff926d37672ce3c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gf741ee61e3f9981ae102729f23aad535">dWorldSetQuickStepW</a> (dWorldID, dReal over_relaxation)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the SOR over-relaxation parameter. <a href="#gf741ee61e3f9981ae102729f23aad535"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ga7fef06f7a8293f21778939dfea36951">dWorldGetQuickStepW</a> (dWorldID)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the SOR over-relaxation parameter. <a href="#ga7fef06f7a8293f21778939dfea36951"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g2cec4be3f40d49c5950ceac1a28440d8">dWorldSetContactMaxCorrectingVel</a> (dWorldID, dReal vel)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the maximum correcting velocity that contacts are allowed to generate. <a href="#g2cec4be3f40d49c5950ceac1a28440d8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7673e6d0db3ddb319642caea7d14959d"></a><!-- doxytag: member="world::dWorldGetContactMaxCorrectingVel" ref="g7673e6d0db3ddb319642caea7d14959d" args="(dWorldID)" -->
ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g7673e6d0db3ddb319642caea7d14959d">dWorldGetContactMaxCorrectingVel</a> (dWorldID)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the maximum correcting velocity that contacts are allowed to generated. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g8f6f964bc15b6cf0937d3214f6e3a1f1">dWorldSetContactSurfaceLayer</a> (dWorldID, dReal depth)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the depth of the surface layer around all geometry objects. <a href="#g8f6f964bc15b6cf0937d3214f6e3a1f1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g97e1c98f55d9b56d00e7838900ad5e58">dWorldGetContactSurfaceLayer</a> (dWorldID)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the depth of the surface layer around all geometry objects. <a href="#g97e1c98f55d9b56d00e7838900ad5e58"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gefa68c714bb3c8f70503f101ea062c03">dWorldStepFast1</a> (dWorldID, dReal stepsize, int maxiterations)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Step the world using the StepFast1 algorithm. <a href="#gefa68c714bb3c8f70503f101ea062c03"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The world object is a container for rigid bodies and joints. Objects in different worlds can not interact, for example rigid bodies from two different worlds can not collide.<p>
All the objects in a world exist at the same point in time, thus one reason to use separate worlds is to simulate systems at different rates. Most applications will only need one world. <hr><h2>Function Documentation</h2>
<a class="anchor" name="g929067266d630fb745f752042d685fc7"></a><!-- doxytag: member="objects.h::dWorldCreate" ref="g929067266d630fb745f752042d685fc7" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API dWorldID dWorldCreate </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Create a new, empty world and return its ID number.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>an identifier </dd></dl>
</div>
</div><p>
<a class="anchor" name="g5a2e5b1d2d6a1376dca239b488e629f9"></a><!-- doxytag: member="objects.h::dWorldDestroy" ref="g5a2e5b1d2d6a1376dca239b488e629f9" args="(dWorldID world)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldDestroy </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname"> <em>world</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Destroy a world and everything in it.
<p>
This includes all bodies, and all joints that are not part of a joint group. Joints that are part of a joint group will be deactivated, and can be destroyed by calling, for example, <a class="el" href="group__joints.html#g6e055bac8a0a3261bda3b6d07499c4ea" title="Empty a joint group.">dJointGroupEmpty()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>world</em> </td><td>the identifier for the world the be destroyed. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="gc7a431f2b3fc6f887fe91ad676828ba3"></a><!-- doxytag: member="objects.h::dWorldGetCFM" ref="gc7a431f2b3fc6f887fe91ad676828ba3" args="(dWorldID)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API dReal dWorldGetCFM </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the constraint force mixing value.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>CFM value </dd></dl>
</div>
</div><p>
<a class="anchor" name="g97e1c98f55d9b56d00e7838900ad5e58"></a><!-- doxytag: member="objects.h::dWorldGetContactSurfaceLayer" ref="g97e1c98f55d9b56d00e7838900ad5e58" args="(dWorldID)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API dReal dWorldGetContactSurfaceLayer </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the depth of the surface layer around all geometry objects.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the depth </dd></dl>
</div>
</div><p>
<a class="anchor" name="g033cd87a0b22889a94d4d84149bda5a0"></a><!-- doxytag: member="objects.h::dWorldGetERP" ref="g033cd87a0b22889a94d4d84149bda5a0" args="(dWorldID)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API dReal dWorldGetERP </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the error reduction parameter.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>ERP value </dd></dl>
</div>
</div><p>
<a class="anchor" name="ga51acfac06347fd27ff926d37672ce3c"></a><!-- doxytag: member="objects.h::dWorldGetQuickStepNumIterations" ref="ga51acfac06347fd27ff926d37672ce3c" args="(dWorldID)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API int dWorldGetQuickStepNumIterations </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the number of iterations that the QuickStep method performs per step.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>nr of iterations </dd></dl>
</div>
</div><p>
<a class="anchor" name="ga7fef06f7a8293f21778939dfea36951"></a><!-- doxytag: member="objects.h::dWorldGetQuickStepW" ref="ga7fef06f7a8293f21778939dfea36951" args="(dWorldID)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API dReal dWorldGetQuickStepW </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the SOR over-relaxation parameter.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the over-relaxation setting </dd></dl>
</div>
</div><p>
<a class="anchor" name="ga9c564b4dd7d8fa4c6f4b32dd95fc33a"></a><!-- doxytag: member="objects.h::dWorldImpulseToForce" ref="ga9c564b4dd7d8fa4c6f4b32dd95fc33a" args="(dWorldID, dReal stepsize, dReal ix, dReal iy, dReal iz, dVector3 force)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldImpulseToForce </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>stepsize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>ix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>iy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>iz</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dVector3 </td>
<td class="paramname"> <em>force</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Converts an impulse to a force.
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>If you want to apply a linear or angular impulse to a rigid body, instead of a force or a torque, then you can use this function to convert the desired impulse into a force/torque vector before calling the BodyAdd... function. The current algorithm simply scales the impulse by 1/stepsize, where stepsize is the step size for the next step that will be taken. This function is given a dWorldID because, in the future, the force computation may depend on integrator parameters that are set as properties of the world. </dd></dl>
</div>
</div><p>
<a class="anchor" name="gc24fadc1d42b65ca3563e40bc1f0fec1"></a><!-- doxytag: member="objects.h::dWorldQuickStep" ref="gc24fadc1d42b65ca3563e40bc1f0fec1" args="(dWorldID w, dReal stepsize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldQuickStep </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname"> <em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>stepsize</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Step the world.
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This uses an iterative method that takes time on the order of m*N and memory on the order of m, where m is the total number of constraint rows N is the number of iterations. For large systems this is a lot faster than <a class="el" href="group__world.html#g8f547ebeb3deed27e0f7b8143d475f50" title="Step the world.">dWorldStep()</a>, but it is less accurate. <p>
QuickStep is great for stacks of objects especially when the auto-disable feature is used as well. However, it has poor accuracy for near-singular systems. Near-singular systems can occur when using high-friction contacts, motors, or certain articulated structures. For example, a robot with multiple legs sitting on the ground may be near-singular. <p>
There are ways to help overcome QuickStep's inaccuracy problems: <ul>
<li>Increase CFM. </li>
<li>Reduce the number of contacts in your system (e.g. use the minimum number of contacts for the feet of a robot or creature). </li>
<li>Don't use excessive friction in the contacts. </li>
<li>Use contact slip if appropriate </li>
<li>Avoid kinematic loops (however, kinematic loops are inevitable in legged creatures). </li>
<li>Don't use excessive motor strength. force-based motors instead of velocity-based motors.</li>
</ul>
Increasing the number of QuickStep iterations may help a little bit, but it is not going to help much if your system is really near singular. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g8b7913fe46d0afc468418c655da79233"></a><!-- doxytag: member="objects.h::dWorldSetCFM" ref="g8b7913fe46d0afc468418c655da79233" args="(dWorldID, dReal cfm)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldSetCFM </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>cfm</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the global CFM (constraint force mixing) value.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>cfm</em> </td><td>Typical values are in the range {10^{-9}} -- 1. The default is 10^-5 if single precision is being used, or 10^-10 if double precision is being used. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g2cec4be3f40d49c5950ceac1a28440d8"></a><!-- doxytag: member="objects.h::dWorldSetContactMaxCorrectingVel" ref="g2cec4be3f40d49c5950ceac1a28440d8" args="(dWorldID, dReal vel)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldSetContactMaxCorrectingVel </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>vel</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the maximum correcting velocity that contacts are allowed to generate.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>vel</em> </td><td>The default value is infinity (i.e. no limit). </td></tr>
</table>
</dl>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Reducing this value can help prevent "popping" of deeply embedded objects. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g8f6f964bc15b6cf0937d3214f6e3a1f1"></a><!-- doxytag: member="objects.h::dWorldSetContactSurfaceLayer" ref="g8f6f964bc15b6cf0937d3214f6e3a1f1" args="(dWorldID, dReal depth)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldSetContactSurfaceLayer </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>depth</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the depth of the surface layer around all geometry objects.
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Contacts are allowed to sink into the surface layer up to the given depth before coming to rest. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>depth</em> </td><td>The default value is zero. </td></tr>
</table>
</dl>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Increasing this to some small value (e.g. 0.001) can help prevent jittering problems due to contacts being repeatedly made and broken. </dd></dl>
</div>
</div><p>
<a class="anchor" name="gacd0778bdaa939d22f093fc2d5d5f868"></a><!-- doxytag: member="objects.h::dWorldSetERP" ref="gacd0778bdaa939d22f093fc2d5d5f868" args="(dWorldID, dReal erp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldSetERP </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>erp</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the global ERP value, that controls how much error correction is performed in each time step.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>dWorldID</em> </td><td>the identifier of the world. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>erp</em> </td><td>Typical values are in the range 0.1--0.8. The default is 0.2. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="ga1b220b922215b335572c699cf8f8cad"></a><!-- doxytag: member="objects.h::dWorldSetGravity" ref="ga1b220b922215b335572c699cf8f8cad" args="(dWorldID, dReal x, dReal y, dReal z)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldSetGravity </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>z</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the world's global gravity vector.
<p>
The units are m/s^2, so Earth's gravity vector would be (0,0,-9.81), assuming that +z is up. The default is no gravity, i.e. (0,0,0).
</div>
</div><p>
<a class="anchor" name="g9d852689d87d28a3d4947eda59c5ba7e"></a><!-- doxytag: member="objects.h::dWorldSetQuickStepNumIterations" ref="g9d852689d87d28a3d4947eda59c5ba7e" args="(dWorldID, int num)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldSetQuickStepNumIterations </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>num</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the number of iterations that the QuickStep method performs per step.
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>More iterations will give a more accurate solution, but will take longer to compute. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>num</em> </td><td>The default is 20 iterations. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="gf741ee61e3f9981ae102729f23aad535"></a><!-- doxytag: member="objects.h::dWorldSetQuickStepW" ref="gf741ee61e3f9981ae102729f23aad535" args="(dWorldID, dReal over_relaxation)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldSetQuickStepW </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>over_relaxation</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the SOR over-relaxation parameter.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>over_relaxation</em> </td><td>value to use by SOR </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g8f547ebeb3deed27e0f7b8143d475f50"></a><!-- doxytag: member="objects.h::dWorldStep" ref="g8f547ebeb3deed27e0f7b8143d475f50" args="(dWorldID, dReal stepsize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldStep </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>stepsize</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Step the world.
<p>
This uses a "big matrix" method that takes time on the order of m^3 and memory on the order of m^2, where m is the total number of constraint rows. For large systems this will use a lot of memory and can be very slow, but this is currently the most accurate method.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>stepsize</em> </td><td>The number of seconds that the simulation has to advance. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="gefa68c714bb3c8f70503f101ea062c03"></a><!-- doxytag: member="objects.h::dWorldStepFast1" ref="gefa68c714bb3c8f70503f101ea062c03" args="(dWorldID, dReal stepsize, int maxiterations)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ODE_API void dWorldStepFast1 </td>
<td>(</td>
<td class="paramtype">dWorldID </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">dReal </td>
<td class="paramname"> <em>stepsize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>maxiterations</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Step the world using the StepFast1 algorithm.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>stepsize</em> </td><td>the nr of seconds to advance the simulation. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>maxiterations</em> </td><td>The number of iterations to perform. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Oct 12 08:36:51 2007 for Open Dynamics Engine by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>
|