Skip to content

Commit

Permalink
added bash scripts for task 4 and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Thijs Ruigrok committed May 12, 2021
1 parent 69153a1 commit 307ef21
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion virtual_maize_field/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
12 changes: 12 additions & 0 deletions virtual_maize_field/scripts/create_task_4.sh
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions virtual_maize_field/scripts/create_task_4_mini.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 307ef21

Please sign in to comment.