ros-simulation/gazebo_ros_pkgs — pull request #129 by etsardou (2013-10-11 11:17:19+00:00)
Title: Spawn model pose fix

Altered function GazeboRosApiPlugin::updateSDFAttributes in order to apply the user-defined robot pose (given by arguments when spawninga model) relatively to the sdf file where the model is included.

For example when a robot had an sdf pose [0 0 0.18 0 0 0] and when spawning it the args "-x 3 -y -3 -z 0.5" were given the following error occured :

Error [Param.cc:181] Unable to set value [0 0 0.180 0 0 03 -3 0.5 0 -0 0] for key[pose]

Since one can not detect if a value is not set in arguments or it was set equal to 0, I got the two poses and added them relatively. Now when gazebo starts no errors are thrown and the models spawn in place.

If you think this approach is not correct, please inform me!

Manos