car.xml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <mujoco>
  2. <compiler autolimits="true"/>
  3. <asset>
  4. <texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3" rgb2=".2 .3 .4"/>
  5. <material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
  6. <mesh name="chasis" scale=".01 .006 .0015"
  7. vertex=" 9 2 0
  8. -10 10 10
  9. 9 -2 0
  10. 10 3 -10
  11. 10 -3 -10
  12. -8 10 -10
  13. -10 -10 10
  14. -8 -10 -10
  15. -5 0 20"/>
  16. </asset>
  17. <default>
  18. <joint damping=".03" actuatorfrcrange="-0.5 0.5"/>
  19. <default class="wheel">
  20. <geom type="cylinder" size=".03 .01" rgba=".5 .5 1 1"/>
  21. </default>
  22. <default class="decor">
  23. <site type="box" rgba=".5 1 .5 1"/>
  24. </default>
  25. </default>
  26. <worldbody>
  27. <geom type="plane" size="3 3 .01" material="grid"/>
  28. <body name="car" pos="0 0 .03">
  29. <freejoint/>
  30. <light name="top light" pos="0 0 2" mode="trackcom" diffuse=".4 .4 .4"/>
  31. <geom name="chasis" type="mesh" mesh="chasis"/>
  32. <geom name="front wheel" pos=".08 0 -.015" type="sphere" size=".015" condim="1" priority="1"/>
  33. <light name="front light" pos=".1 0 .02" dir="2 0 -1" diffuse="1 1 1"/>
  34. <body name="left wheel" pos="-.07 .06 0" zaxis="0 1 0">
  35. <joint name="left"/>
  36. <geom class="wheel"/>
  37. <site class="decor" size=".006 .025 .012"/>
  38. <site class="decor" size=".025 .006 .012"/>
  39. </body>
  40. <body name="right wheel" pos="-.07 -.06 0" zaxis="0 1 0">
  41. <joint name="right"/>
  42. <geom class="wheel"/>
  43. <site class="decor" size=".006 .025 .012"/>
  44. <site class="decor" size=".025 .006 .012"/>
  45. </body>
  46. </body>
  47. </worldbody>
  48. <tendon>
  49. <fixed name="forward">
  50. <joint joint="left" coef=".5"/>
  51. <joint joint="right" coef=".5"/>
  52. </fixed>
  53. <fixed name="turn">
  54. <joint joint="left" coef="-.5"/>
  55. <joint joint="right" coef=".5"/>
  56. </fixed>
  57. </tendon>
  58. <actuator>
  59. <motor name="forward" tendon="forward" ctrlrange="-1 1"/>
  60. <motor name="turn" tendon="turn" ctrlrange="-1 1"/>
  61. </actuator>
  62. <sensor>
  63. <jointactuatorfrc name="right" joint="right"/>
  64. <jointactuatorfrc name="left" joint="left"/>
  65. </sensor>
  66. </mujoco>