Skip to content

Commit

Permalink
Merge pull request #18 from Kamaro-Engineering/master
Browse files Browse the repository at this point in the history
Checkstyle Action + Small improvements and fixes
  • Loading branch information
ThijsRuigrok authored May 13, 2021
2 parents b93d349 + b14a287 commit d38668d
Show file tree
Hide file tree
Showing 15 changed files with 117 additions and 170 deletions.
1 change: 1 addition & 0 deletions virtual_maize_field/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ CATKIN_IGNORE
# Ignore generated files
worlds/generated.world
Media/models/virtual_maize_field_heightmap.png
generated_minimap.png
17 changes: 7 additions & 10 deletions virtual_maize_field/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ Additional you'll need the following packages:
# melodic
rosdep install virtual_maize_field
sudo apt install python3-pip
sudo pip3 install -U jinja2 rospkg
sudo pip3 install opencv-python
sudo pip3 install matplotlib
sudo pip3 install shapely
sudo pip3 install -U jinja2 rospkg opencv-python matplotlib shapely

# noetic
rosdep install virtual_maize_field
Expand Down Expand Up @@ -138,12 +135,12 @@ In the script folder, bash files to generate sample worlds are located. The para
|:---- |:--------- |:----------- |
| *create_task_1.sh* | `--row_length 10 --rows_left 0 --rows_right 11 --rows_curve_budget 0.78539816339 --row_segments straight,curved --row_segment_curved_radius_min 4.0 --row_segment_curved_radius_max 5.0` | Task 1, curved rows without holes |
| *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, similar crop rows as in task_2 but with cans, bottles and weeds spread throughout the field. 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 spread throughout the field. 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 |
| *create_task_2.sh* | `--row_length 7 --rows_left 0 --rows_right 11 --row_segments straight --hole_prob 0.04 --hole_size_max 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 --hole_size_max 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 --hole_size_max 7 --litters 5 --weeds 5 --ghost_objects true` | Task 3, similar crop rows as in task_2 but with cans, bottles and weeds spread throughout the field. 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 --hole_size_max 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 --hole_size_max 7 --litters 5 --weeds 5` | Task 4, similar crop rows as in task_2 but with cans, bottles and weeds spread throughout the field. 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 --hole_size_max 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
4 changes: 0 additions & 4 deletions virtual_maize_field/scripts/create_task_1.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# 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 10 \
--rows_left 0 \
Expand All @@ -9,5 +7,3 @@ rosrun virtual_maize_field generate_world.py \
--row_segments straight,curved \
--row_segment_curved_radius_min 4.0 \
--row_segment_curved_radius_max 5.0


4 changes: 0 additions & 4 deletions virtual_maize_field/scripts/create_task_1_mini.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# 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 5 \
--rows_left 0 \
Expand All @@ -9,5 +7,3 @@ rosrun virtual_maize_field generate_world.py \
--row_segments straight,curved \
--row_segment_curved_radius_min 4.0 \
--row_segment_curved_radius_max 5.0


4 changes: 1 addition & 3 deletions virtual_maize_field/scripts/create_task_2.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# 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
--hole_size_max 7
4 changes: 1 addition & 3 deletions virtual_maize_field/scripts/create_task_2_mini.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# 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
--hole_size_max 7
4 changes: 1 addition & 3 deletions virtual_maize_field/scripts/create_task_3.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# 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 \
--hole_size_max 7 \
--litters 5 \
--weeds 5 \
--ghost_objects true
4 changes: 1 addition & 3 deletions virtual_maize_field/scripts/create_task_3_mini.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# 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 \
--hole_size_max 7 \
--litters 5 \
--weeds 5 \
--ghost_objects true
4 changes: 1 addition & 3 deletions virtual_maize_field/scripts/create_task_4.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# 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 \
--hole_size_max 7 \
--litters 5 \
--weeds 5
4 changes: 1 addition & 3 deletions virtual_maize_field/scripts/create_task_4_mini.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# 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 \
--hole_size_max 7 \
--litters 5 \
--weeds 5
Loading

0 comments on commit d38668d

Please sign in to comment.