This repository contains code to proceduraly create Gazebo models of different plants using GroIMP and Meshlab. We provide a repository with generated maize and weed models for you to use. However, feel free to generate and test your own plant models.
Requires Python >= 3.7, GroIMP 1.6 and Java 8.
pip install -r requirements.txt
If you are working on Linux, downgrade to Java 8.
- Create GroIMP task:
python3 generate_groimp_task.py
Click here for the full list of options
usage: generate_groimp_task.py [-h] [--groimp_path GROIMP_PATH] [--groimp_output_path GROIMP_OUTPUT_PATH]
[--crop_type {dicot1,dicot2,cheno,at,cereal,grass,hemp,weed,sunflower,maize,quinoa,tulip,pea,soy,faba,basil}]
optional arguments:
-h, --help show this help message and exit
--groimp_path GROIMP_PATH
GroIMP folder path.
--groimp_output_path GROIMP_OUTPUT_PATH
GroIMP output path.
--crop_type {dicot1,dicot2,cheno,at,cereal,grass,hemp,weed,sunflower,maize,quinoa,tulip,pea,soy,faba,basil}
Crop type to generate task.
- Open project in GroIMP:
File > Open... >
and selectproject.gs
in thegroimp
directory of this repository.
- Run the simulation by clicking on the
Run run
button. This can take a while.
- Convert the GroIMP models to Gazebo models:
python3 groimp_to_gazebo_models <run number> <run number> <etc.>
Replace <run_number>
by the repetition number you want to use.
Click here for the full list of options
usage: groimp_to_gazebo_models.py [-h] [--groimp_output_folder GROIMP_OUTPUT_FOLDER] [--model_output_folder MODEL_OUTPUT_FOLDER]
[--min_days MIN_DAYS] [--max_days MAX_DAYS] [--increment INCREMENT]
plant_numbers [plant_numbers ...]
positional arguments:
plant_numbers List of plant numbers
optional arguments:
-h, --help show this help message and exit
--groimp_output_folder GROIMP_OUTPUT_FOLDER
groimp output path with .obj files
--model_output_folder MODEL_OUTPUT_FOLDER
Output path for Gazebo models
--min_days MIN_DAYS Minimum day number
--max_days MAX_DAYS Maximum day number
--increment INCREMENT
Increment in day numbers
- Copy Gazebo models from
generated
folder to themodels
folder of thevirtual_maize_field
.
GrowIMP models in folder growimp
are licenced under CC BY-SA 4.0. Rest of repository is licenced as GPLv3.