Example of ROS code to spawn several elements of the same model on Gazebo
In order to use properly this package, the world file (/worlds/crop.world) needs to be lauched on Gazebo and only then this package node via rosrun command. You will see several "fruits" being spawn inside the environment.