[[Tutorial]] **Template [#g9a8dbde] The following parameters can be set in the world file. (※ v2.2.0 or later) #highlight(xml){{ <?xml version="1.0" encoding="utf8"?> <world name="myworld1"> <gravity x="0.0" y="-980.7" z="0.0"/> <instanciate class="seToy_D.xml"> <set-attr-value name="name" value="toy_D"/> <set-attr-value name="x" value="0.0"/> <set-attr-value name="y" value="60.0"/> <set-attr-value name="z" value="0.0"/> <set-attr-value name="scalex" value="1.0"/> <set-attr-value name="scaley" value="1.0"/> <set-attr-value name="scalez" value="1.0"/> <set-attr-value name="qw" value="1.0"/> <set-attr-value name="qx" value="0.0"/> <set-attr-value name="qy" value="0.0"/> <set-attr-value name="qz" value="0.0"/> <set-attr-value name="mass" value="1.0"/> <set-attr-value name="dynamics" value="true"/> <set-attr-value name="collision" value="true"/> <set-attr-value name="graspable" value="true"/> <set-attr-value name="graspRadius" value="40.0"/> <set-attr-value name="language" value="c++"/> <set-attr-value name="implementation" value="./ControllerSample.so"/> <camera id="1" link="body" fov="45" aspectRatio="1.5" direction="0.0 0.0 1.0" quaternion="1.0 .0. 0.0 0.0"/> </instanciate> <worldParam erp="0.5" cfm="1e-8" autostep="true" quickstep="false" stepsize="0.01"/> <collisionParam mu="0.9" mu2="0.02" slip1="0.01" slip2="0.01" soft_erp="0.8" soft_cfm="0.00001" bounce="0.9" bounce_vel="5.0"/> </world> }} **Entity attribute [#h74efcd9] |Attribute|Type|Initial value|Description| |name|string|- |Please pay attention for duplicate name| |x|double|0.0|Initial position x| |y|double|0.0|Initial position y| |z|double|0.0|Initial position z| |qw|double|1.0|Initial rotation (quaternion) qw| |qx|double|0.0|Initial rotation (quaternion) qx| |qy|double|0.0|Initial rotation (quaternion) qy| |qz|double|0.0|Initial rotation (quaternion) qz| |scalex|double|1.0|Scale for x axis for the object| |scaley|double|1.0|Scale for y axis for the object| |scalez|double|1.0|Scale for z axis for the object| |mass|double|1.0|Mass (kg)| |dynamics|bool|true|Physics flag| |collision|bool|false|Collision detection flag| |graspable|bool|true|grasp ability flag| |graspRadius|double|40.0|Radius for grasp ability| |language|string|-|Controller programming language (only C++ is supported)| |implementation|string|-|Controller file specification| **Camera parameters [#a8446ccb] |Parameter|Type|Initial value|Description| |id|int|-|ID number| |link|string|-|Link name| |fov|double|45|y-direction Viewing Angle (degree)| |aspectRatio|double|1.5|Aspect ratio (width / height)| |direction|double*3|"0.0 0.0 1.0" | Camera's direction vector| |quaternion|double*4|"1.0 0.0 0.0 0.0" |Rotation of the camera| **World parameters [#u0b99bfd] |Parameter|Type|Initial value|Description| |erp|double|0.5|If the value is 0, the error increases. If 1, the error decreases.| |cfm|double|1e-8|This is the parameter to decide the softness of the ground and the joints. The maximum value is 1.0| |autostep|bool|true|If the automatic step mode is true, the time division is the step-size, the simulation time is automatically adjusted to the real world time. If it is false, you should adjust the time by using wordStep or wordQuickStep in the agent's controller.| |quickstep|bool|false|Increments the time by using quick step mode. When autostep=true, the mode is fast and not accurate for physics.| |stepsize|double|0.01|Step width (sec).It works only when autostep=true| **Collision parameters [#mfc28452] |Parameter name|Type|Default value|Description| |mu|double|0.9|Friction coefficient is from 0 to infinite, no friction when it's equal to 0| |mu2|double|0.02|Friction coefficient, it's perpendicular to the direction on which the force is applied| |slip1|double|0.01|The force-dependent-slip friction coefficient in direction 1| |slip2|double|0.01|The force-dependent-slip friction coefficient in direction 2| |soft_erp|double|0.8|Softness for vertical direction| |soft_cfm|double|0.0001|Softness for horizontal direction| |bounce|double|0.3|Coefficient of restitution (0~1)| |bounce_vel|double|5.0|The minimum velocity required to bounce(cm / s)| ※Note) These collision's parameters are applied to all objects collision. #highlight(end)