According to the usage of the gazebo_ros/spawn_model script, it is possible to use it in order to spawn models from the gazebo database. In the end, this scipts calls either gazebo's spawn_sdf_model or spawn_urdf_model via the gazebo_interface module which abstracts away the service calls.
However, in our script, we call the service directly...but only provide a client for the spawn_urdf_model service.
Things that need to be done in order to be able to spawn database models from our script:
[ ] replace service_clients from our script and make use of gazebo_interface calls instead. (?)
[ ] add a parameter parsing scheme to the yaml parsing scheme in our script in order to specify e.g. database as an model_type and then call the proper function from the gazebo_interface respectively...
This would reduce a lot of code duplications while still allowing us to use our object_locations.yaml parameter scheme!
@ipa-srd-rd Could you take this over?
@ipa-nhg @ipa-mig @fmessmer FYI
In https://github.com/ros-simulation/gazebo_ros_pkgs/pull/261/files a launch file for spawning an object from the database is proposed: https://github.com/YoheiKakiuchi/gazebo_ros_pkgs/blob/add_spawn_launch_indigo/gazebo_ros/launch/spawn_model_in_database.launch
According to the usage of the
gazebo_ros/spawn_model
script, it is possible to use it in order to spawn models from the gazebo database. In the end, this scipts calls either gazebo'sspawn_sdf_model
orspawn_urdf_model
via thegazebo_interface
module which abstracts away the service calls.However, in our script, we call the service directly...but only provide a client for the
spawn_urdf_model
service.Things that need to be done in order to be able to spawn database models from our script:
gazebo_interface
calls instead. (?)database
as anmodel_type
and then call the proper function from thegazebo_interface
respectively...This would reduce a lot of code duplications while still allowing us to use our
object_locations.yaml
parameter scheme!@ipa-srd-rd Could you take this over? @ipa-nhg @ipa-mig @fmessmer FYI