From 307ef2125f9fa999f6ced09d198f2feb6f75c5a5 Mon Sep 17 00:00:00 2001 From: Thijs Ruigrok Date: Wed, 12 May 2021 13:08:27 -0700 Subject: [PATCH] added bash scripts for task 4 and documentation --- virtual_maize_field/README.md | 4 +++- virtual_maize_field/scripts/create_task_4.sh | 12 ++++++++++++ virtual_maize_field/scripts/create_task_4_mini.sh | 12 ++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 virtual_maize_field/scripts/create_task_4.sh create mode 100644 virtual_maize_field/scripts/create_task_4_mini.sh diff --git a/virtual_maize_field/README.md b/virtual_maize_field/README.md index a64fc18..2bb375a 100644 --- a/virtual_maize_field/README.md +++ b/virtual_maize_field/README.md @@ -140,8 +140,10 @@ In the script folder, bash files to generate sample worlds are located. The para | *create_task_1_mini.sh* | `--row_length 5 --rows_left 0 --rows_right 5 --rows_curve_budget 0.78539816339 --row_segments straight,curved --row_segment_curved_radius_min 4.0 --row_segment_curved_radius_max 5.0` | A smaller version of task 1, requiring less computer power | | *create_task_2.sh* | `--row_length 7 --rows_left 0 --rows_right 11 --row_segments straight --hole_prob 0.04 --max_hole_size 7` | Task 2, straight rows with holes | | *create_task_2_mini.sh* | `--row_length 3.5 --rows_left 0 --rows_right 7 --row_segments straight --hole_prob 0.04 --max_hole_size 7` | A smaller version of task 2, requiring less computer power | -| *create_task_3.sh* | `--row_length 7 --rows_left 0 --rows_right 11 --row_segments straight --hole_prob 0.04 --max_hole_size 7 --litters 5 --weeds 5 --ghost_objects true` | Task 3, same as task_2 but with 5 cans/bottles and weeds. The cans, bottles and weeds have no collision box and are static. | +| *create_task_3.sh* | `--row_length 7 --rows_left 0 --rows_right 11 --row_segments straight --hole_prob 0.04 --max_hole_size 7 --litters 5 --weeds 5 --ghost_objects true` | Task 3, similar crop rows as in task_2 but with cans, bottles and weeds. The cans, bottles and weeds have no collision box and are static. | | *create_task_3_mini.sh* | `--row_length 3.5 --rows_left 0 --rows_right 7 --row_segments straight --hole_prob 0.04 --max_hole_size 7 --litters 5 --weeds 5 --ghost_objects true` | A smaller version of task 3, requiring less computer power | +| *create_task_4.sh* | `--row_length 7 --rows_left 0 --rows_right 11 --row_segments straight --hole_prob 0.04 --max_hole_size 7 --litters 5 --weeds 5` | Task 4, similar crop rows as in task_2 but with cans, bottles and weeds. The cans, bottles and weeds have a collision box and can be picked up. | +| *create_task_4_mini.sh* | `--row_length 3.5 --rows_left 0 --rows_right 7 --row_segments straight --hole_prob 0.04 --max_hole_size 7 --litters 5 --weeds 5` | A smaller version of task 4, requiring less computer power | ## Launching worlds The launch file to launch the worlds is called `simulation.launch`. You can launch the launch file by running `roslaunch virtual_maize_field simulation.launch`. By default the launch file will launch `generated_world.world`. You can launch any world by using the `world_name` arg. e.g. `roslaunch virtual_maize_field simulation.launch world_name:=simple_row_level_1.world`. diff --git a/virtual_maize_field/scripts/create_task_4.sh b/virtual_maize_field/scripts/create_task_4.sh new file mode 100644 index 0000000..4769ffa --- /dev/null +++ b/virtual_maize_field/scripts/create_task_4.sh @@ -0,0 +1,12 @@ +# remove old gazebo cache file, so gazebo is forced to use the new height map. +rm -r ~/.gazebo/paging/virtual_maize_field_heightmap + +rosrun virtual_maize_field generate_world.py \ +--row_length 7 \ +--rows_left 0 \ +--rows_right 11 \ +--row_segments straight \ +--hole_prob 0.04 \ +--max_hole_size 7 \ +--litters 5 \ +--weeds 5 diff --git a/virtual_maize_field/scripts/create_task_4_mini.sh b/virtual_maize_field/scripts/create_task_4_mini.sh new file mode 100644 index 0000000..84f78c3 --- /dev/null +++ b/virtual_maize_field/scripts/create_task_4_mini.sh @@ -0,0 +1,12 @@ +# remove old gazebo cache file, so gazebo is forced to use the new height map. +rm -r ~/.gazebo/paging/virtual_maize_field_heightmap + +rosrun virtual_maize_field generate_world.py \ +--row_length 3.5 \ +--rows_left 0 \ +--rows_right 7 \ +--row_segments straight \ +--hole_prob 0.04 \ +--max_hole_size 7 \ +--litters 5 \ +--weeds 5