This gazebo world plugin spawns models based on ROS2 parameters
- cgh/patient/P0/count
- cgh/patient/P1/count
- cgh/patient/P2/count
- cgh/patient/P3/count
- triage/patient/P0/count
- triage/patient/P1/count
- triage/patient/P2/count
- triage/patient/P3/count
Assuming you already have some Foxy debian packages installed, install gazebo_ros_pkgs as follows:
sudo apt install ros-foxy-gazebo-ros-pkgs
mkdir -p $HOME/gz_plugin_ws/src; cd $HOME/gz_plugin_ws/src
git clone https://github.com/sharp-rmf/gazebo-model-generator.git
cd $HOME/gz_plugin_ws
source /opt/ros/foxy/setup.bash
colcon build
You can try out the plugin by running the following:
source /opt/ros/foxy/setup.bash; source /source $HOME/gz_plugin_ws/install/setup.bash
ros2 launch factory plugin_tryout.launch.xml
### Then in another teminal ###
ros2 param set /factory cgh/patient/P1/count 10
By setting the model count in the parameters listed above, the plugin will generate model://patient
.