-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
297 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,297 @@ | ||
<mvsim_world version="1.0"> | ||
<!-- General simulation options --> | ||
<simul_timestep>0</simul_timestep> <!-- Simulation fixed-time interval for numerical integration [seconds] or 0 to autodetermine --> | ||
|
||
<!-- GUI options --> | ||
<gui> | ||
<ortho>false</ortho> | ||
<show_forces>false</show_forces> <force_scale>0.01</force_scale> | ||
<cam_distance>50</cam_distance> | ||
<cam_azimuth>150</cam_azimuth> | ||
<cam_elevation>75</cam_elevation> | ||
<fov_deg>80</fov_deg> | ||
<!-- <follow_vehicle>r1</follow_vehicle> --> | ||
</gui> | ||
|
||
<!-- Light parameters --> | ||
<lights> | ||
<enable_shadows>true</enable_shadows> | ||
<light_azimuth_deg>-25.0</light_azimuth_deg> | ||
<light_elevation_deg>40.0</light_elevation_deg> | ||
</lights> | ||
|
||
|
||
<!-- ======================== | ||
Scenario definition | ||
======================== --> | ||
<!-- ForestFloor01_1K_BaseColor | ||
ForestGround01_1K_BaseColor | ||
Grass01_1K_BaseColor | ||
Pebbles02_512_BaseColor | ||
https://mrpt.github.io/mvsim-models/textures-cgbookcase/TwoLaneRoadCracks01_1K_BaseColor.png | ||
https://mrpt.github.io/mvsim-models/textures-cgbookcase/TwoLaneRoadCracks01_1K_Turn90_BaseColor.png | ||
--> | ||
|
||
<element class='elevation_map'> | ||
<resolution>4.0</resolution> | ||
<elevation_data_matrix>[3e-2 -3e-2; 2e-2 1e-2;-1e-2 2e-2;-4e-2 2e-2;3e-2 1e-2;5e-2 -2e-2;-3e-2 1e-2;3e-2 1e-2;-1e-2 5e-2;-1e-2 2e-2;-1e-2 2e-2;-1e-2 2e-2;0e-2 0e-2]</elevation_data_matrix> | ||
<texture_image>https://mrpt.github.io/mvsim-models/textures-cgbookcase/TwoLaneRoadCracks01_1K_BaseColor.png</texture_image> | ||
<texture_image_rotate>-90</texture_image_rotate> | ||
<texture_extension_x>8.0</texture_extension_x> | ||
<texture_extension_y>4.0</texture_extension_y> | ||
<corner_min_x>-24</corner_min_x> | ||
<corner_min_y>-2</corner_min_y> | ||
<model_split_size>3.0</model_split_size> <!-- See docs. Required for correct z-order rendering if there are transparent objects in the world (e.g. trees with leaves) --> | ||
</element> | ||
<element class='elevation_map'> | ||
<resolution>4.0</resolution> | ||
<elevation_data_matrix>[0e-2 0e-2; 0e-2 0e-2]</elevation_data_matrix> | ||
<texture_image>https://mrpt.github.io/mvsim-models/textures-cgbookcase/TwoLaneRoadCracks01_1K_Turn90_BaseColor.png</texture_image> | ||
<texture_image_rotate>-90</texture_image_rotate> | ||
<texture_extension_x>4.0</texture_extension_x> | ||
<texture_extension_y>4.0</texture_extension_y> | ||
<corner_min_x>24</corner_min_x> | ||
<corner_min_y>-2</corner_min_y> | ||
</element> | ||
<element class='elevation_map'> | ||
<resolution>4.0</resolution> | ||
<elevation_data_matrix>[0e-2 0e-2 2e-2 1e-2 1e-2 1e-2 4e-2 4e-2 0e-2; 0e-2 3e-2 2e-2 1e-2 4e-2 1e-2 1e-2 -1e-2 0e-2]</elevation_data_matrix> | ||
<texture_image>https://mrpt.github.io/mvsim-models/textures-cgbookcase/TwoLaneRoadCracks01_1K_BaseColor.png</texture_image> | ||
<texture_image_rotate>0</texture_image_rotate> | ||
<texture_extension_x>4.0</texture_extension_x> | ||
<texture_extension_y>8.0</texture_extension_y> | ||
<corner_min_x>24</corner_min_x> | ||
<corner_min_y>2</corner_min_y> | ||
<model_split_size>3.0</model_split_size> <!-- See docs. Required for correct z-order rendering if there are transparent objects in the world (e.g. trees with leaves) --> | ||
</element> | ||
<element class='elevation_map'> | ||
<resolution>4.0</resolution> | ||
<elevation_data_matrix>[0e-2 0e-2; 0e-2 0e-2]</elevation_data_matrix> | ||
<texture_image>https://mrpt.github.io/mvsim-models/textures-cgbookcase/TwoLaneRoadCracks01_1K_Turn90_BaseColor.png</texture_image> | ||
<texture_image_rotate>0</texture_image_rotate> | ||
<texture_extension_x>4.0</texture_extension_x> | ||
<texture_extension_y>4.0</texture_extension_y> | ||
<corner_min_x>24</corner_min_x> | ||
<corner_min_y>34</corner_min_y> | ||
</element> | ||
<element class='elevation_map'> | ||
<resolution>4.0</resolution> | ||
<elevation_data_matrix>[3e-2 -3e-2; 2e-2 1e-2;-1e-2 2e-2;-4e-2 2e-2;3e-2 1e-2;5e-2 -2e-2;-3e-2 1e-2;3e-2 1e-2;-1e-2 5e-2;-1e-2 2e-2;-1e-2 2e-2;-1e-2 2e-2;0e-2 0e-2]</elevation_data_matrix> | ||
<texture_image>https://mrpt.github.io/mvsim-models/textures-cgbookcase/TwoLaneRoadCracks01_1K_BaseColor.png</texture_image> | ||
<texture_image_rotate>-90</texture_image_rotate> | ||
<texture_extension_x>8.0</texture_extension_x> | ||
<texture_extension_y>4.0</texture_extension_y> | ||
<corner_min_x>-24</corner_min_x> | ||
<corner_min_y>34</corner_min_y> | ||
<model_split_size>3.0</model_split_size> <!-- See docs. Required for correct z-order rendering if there are transparent objects in the world (e.g. trees with leaves) --> | ||
</element> | ||
|
||
<element class="horizontal_plane"> | ||
<x_min>2</x_min> <y_min>26</y_min> | ||
<x_max>6</x_max> <y_max>46</y_max> | ||
<z>4.02</z> | ||
<texture>https://mrpt.github.io/mvsim-models/textures-cgbookcase/PavingStone11_1K_BaseColor.png</texture> | ||
<texture_size_x>1.0</texture_size_x> | ||
<texture_size_y>1.0</texture_size_y> | ||
</element> | ||
|
||
<block> | ||
<static>true</static> <!-- Does not move --> | ||
<color>#e0e0e0</color> | ||
<zmin>0.10</zmin> <zmax>1.0</zmax> | ||
<shape_from_visual/> <!-- automatic collision shape from 3D model --> | ||
<geometry type="box" lx="0.07" ly="20.0" lz="0.75"/> | ||
<init_pose3d>2.0 26.0 3.9 0 0 0</init_pose3d> | ||
<skip_elevation_adjust>true</skip_elevation_adjust> | ||
</block> | ||
<block> | ||
<static>true</static> <!-- Does not move --> | ||
<color>#e0e0e0</color> | ||
<zmin>0.10</zmin> <zmax>1.0</zmax> | ||
<shape_from_visual/> <!-- automatic collision shape from 3D model --> | ||
<geometry type="box" lx="0.07" ly="20.0" lz="0.75"/> | ||
<init_pose3d>6.0 26.0 3.9 0 0 0</init_pose3d> | ||
<skip_elevation_adjust>true</skip_elevation_adjust> | ||
</block> | ||
|
||
|
||
<element class='elevation_map'> | ||
<resolution>8.0</resolution> | ||
<elevation_data_matrix> | ||
[0 1 4 1 0; | ||
0 3 3 2 0; | ||
0 0.7 2.5 3 0; | ||
0 1 3 4 0; | ||
0 0.7 2.9 4 0; | ||
0 1.5 0 2 0; | ||
0 0 0 0 0 | ||
]</elevation_data_matrix> | ||
<texture_image>https://mrpt.github.io/mvsim-models/textures-cgbookcase/Dirt02_1K_BaseColor.png</texture_image> | ||
<texture_image_rotate>0</texture_image_rotate> | ||
<texture_extension_x>3.0</texture_extension_x> | ||
<texture_extension_y>3.0</texture_extension_y> | ||
<corner_min_x>-24</corner_min_x> | ||
<corner_min_y>2</corner_min_y> | ||
<model_split_size>3.0</model_split_size> <!-- See docs. Required for correct z-order rendering if there are transparent objects in the world (e.g. trees with leaves) --> | ||
</element> | ||
|
||
<element class='elevation_map'> | ||
<resolution>8.0</resolution> | ||
<elevation_data_matrix> | ||
[0 1 4 30; | ||
0 3 3 25; | ||
0 3 3 25; | ||
0 3 3 25; | ||
0 3 3 25; | ||
0 4 2.5 28; | ||
0 4 3 30; | ||
0 4 2.9 29; | ||
0 1 0 27; | ||
0 1 0 27; | ||
0 1 0 27; | ||
0 1 0 27; | ||
0 0 0 25 | ||
]</elevation_data_matrix> | ||
<texture_image>https://mrpt.github.io/mvsim-models/textures-cgbookcase/Dirt02_1K_BaseColor.png</texture_image> | ||
<texture_image_rotate>0</texture_image_rotate> | ||
<texture_extension_x>3.0</texture_extension_x> | ||
<texture_extension_y>3.0</texture_extension_y> | ||
<corner_min_x>-44</corner_min_x> | ||
<corner_min_y>38</corner_min_y> | ||
<model_split_size>3.0</model_split_size> <!-- See docs. Required for correct z-order rendering if there are transparent objects in the world (e.g. trees with leaves) --> | ||
</element> | ||
|
||
|
||
<!-- A SkyBox decoration --> | ||
<element class='skybox'> | ||
<!-- Provide the URI printf-like "pattern" to the six texture files, | ||
such that replacing "%s" with the following strings gives the path | ||
to the files: "Up", "Right", "Left", "Front", "Down", "Back". | ||
--> | ||
<textures>https://mrpt.github.io/mvsim-models/skyboxes/TropicalSunnyDay.zip/TropicalSunnyDay/TropicalSunnyDay%s.jpg</textures> | ||
</element> | ||
|
||
<!-- ============================= | ||
Vehicle classes definition | ||
============================= --> | ||
<include file="../definitions/jackal.vehicle.xml" | ||
default_sensors="false" | ||
/> | ||
|
||
<!-- ======================== | ||
Vehicle(s) definition | ||
======================== --> | ||
<vehicle name="r1" class="jackal"> | ||
<init_pose>0 0 0</init_pose> <!-- In global coords: x,y, yaw(deg) --> | ||
|
||
<visual> | ||
<model_uri>https://mrpt.github.io/mvsim-models/robot-agricobiot2/mast.dae</model_uri> | ||
<model_offset_x>0</model_offset_z> | ||
<model_offset_y>0</model_offset_y> | ||
<model_offset_z>0</model_offset_z> | ||
<model_yaw>180.0</model_yaw> | ||
<model_pitch>0.0</model_pitch> | ||
<model_roll>90.0</model_roll> | ||
</visual> | ||
|
||
<!-- Sensors --> | ||
|
||
<include file="../definitions/velodyne-vlp16.sensor.xml" | ||
sensor_x="-0.08" sensor_y="0" sensor_z="0.87" sensor_yaw="0" | ||
sensor_std_noise="0.005" | ||
sensor_publish="false" | ||
sensor_name="lidar1" | ||
sensor_rpm="600" | ||
horz_resolution_factor="2.0" | ||
vert_resolution_factor="2.0" | ||
/> | ||
|
||
<include file="../definitions/camera.sensor.xml" | ||
sensor_x="0.03" sensor_z="0.73" | ||
ncols="800" nrows="600" | ||
cx="400" cy="300" | ||
sensor_period_sec="0.10" | ||
/> | ||
|
||
</vehicle> | ||
|
||
|
||
|
||
<!-- ====================================== | ||
Obstacle blocks classes definition | ||
====================================== --> | ||
<block:class name="rock_01"> | ||
<static>true</static> <!-- Does not move --> | ||
<shape_from_visual/> <!-- automatic shape,zmin,zmax from 3D mesh--> | ||
<zmin>0.0</zmin> <zmax>2.5</zmax> <!-- Only count collisions in this height range --> | ||
<visual> | ||
<model_uri>https://mrpt.github.io/mvsim-models/rock01.zip/rock01/FallingRock01.dae</model_uri> | ||
</visual> | ||
</block:class> | ||
|
||
<block:class name="rock_02"> | ||
<static>true</static> <!-- Does not move --> | ||
<shape_from_visual/> <!-- automatic shape,zmin,zmax from 3D mesh--> | ||
<zmin>0.0</zmin> <zmax>2.5</zmax> <!-- Only count collisions in this height range --> | ||
<visual> | ||
<model_uri>https://mrpt.github.io/mvsim-models/rock02.zip/rock02/FallingRock02.dae</model_uri> | ||
</visual> | ||
</block:class> | ||
|
||
<block:class name="palm_tree_01"> | ||
<static>true</static> <!-- Does not move --> | ||
<shape_from_visual/> <!-- automatic shape,zmin,zmax from 3D mesh--> | ||
<zmin>0.0</zmin> <zmax>0.5</zmax> <!-- Only count collisions in this height range --> | ||
<visual> | ||
<model_uri>https://mrpt.github.io/mvsim-models/TropicPalmTree.zip/TropicPalmTree/free_palm.dae</model_uri> | ||
<model_roll>90</model_roll> | ||
<model_split_size>1.50</model_split_size> <!-- See docs. Required for transparent leaves --> | ||
</visual> | ||
</block:class> | ||
|
||
<block:class name="construction_cone"> | ||
<static>false</static> | ||
<shape_from_visual/> <!-- automatic shape,zmin,zmax from 3D mesh--> | ||
<zmin>0.0</zmin> <zmax>0.5</zmax> <!-- Only count collisions in this height range --> | ||
<visual> | ||
<model_uri>https://mrpt.github.io/mvsim-models/ConstructionCone.zip/ConstructionCone/construction_cone.dae</model_uri> | ||
<model_roll>90</model_roll> | ||
<model_scale>5</model_scale> | ||
</visual> | ||
</block:class> | ||
|
||
|
||
<!-- ======================== | ||
Obstacle blocks | ||
======================== --> | ||
|
||
<block class="construction_cone"> | ||
<!-- In global coords: x,y,z, yaw(deg),pitch(deg),roll(deg) --> | ||
<init_pose3d>2 1 0 0 0 0</init_pose3d> | ||
</block> | ||
|
||
|
||
<variable name="ROCKS_SPREAD_X" value="35.0"></variable> | ||
<variable name="ROCKS_SPREAD_Y" value="35.0"></variable> | ||
<variable name="ROCKS_SPREAD_Z" value="1.0"></variable> | ||
|
||
<variable name="TREES_SPREAD_X" value="20.0"></variable> | ||
<variable name="TREES_SPREAD_Y" value="20.0"></variable> | ||
<variable name="TREES_SPREAD_Z" value="0"></variable> | ||
|
||
<for var="i" from="1" to="12"> | ||
<block class="rock_01"> | ||
<!-- In global coords: x,y,z, yaw(deg),pitch(deg),roll(deg) --> | ||
<init_pose3d>$f{(-0.5+rand())*ROCKS_SPREAD_X} $f{(-0.5+rand())*ROCKS_SPREAD_Y} $f{(-0.5+rand())*ROCKS_SPREAD_Z} $f{-180+rand()*360} 0 0</init_pose3d> | ||
</block> | ||
</for> | ||
|
||
<for var="i" from="1" to="5"> | ||
<block class="palm_tree_01"> | ||
<!-- In global coords: x,y,z, yaw(deg),pitch(deg),roll(deg) --> | ||
<init_pose3d>$f{(-0.5+rand())*TREES_SPREAD_X} $f{(-0.5+rand())*TREES_SPREAD_Y} $f{(-0.5+rand())*TREES_SPREAD_Z} $f{-180+rand()*360} 0 0</init_pose3d> | ||
</block> | ||
</for> | ||
|
||
</mvsim_world> |