Issue with collision model in Gazebo
I'm seeing two different but similar issues with the collision model in Gazebo and I wanted to make sure I'm using it right. In both cases, the collision model looks right in RVIZ but not in Gazebo.
The first case is with the new Gazebo plugin model. I set initial positions for the joints using the SetJointPosition function in Model.hh and then turn on the collision model in Gazebo and it appears as if only the visual model was moved by the function.
The second case is the NASA R2 simulator (http://ros.org/wiki/nasa_r2_simulator). The controller is derived from pr2_controller_interface::Controller. In this case, no initial position is set but 0 is outside of the joint limits for some of the joints so Gazebo immediately pushes the joints into their limits. The controller then grabs the current position and sets that as the goal. Again, looking at the collision model in Gazebo shows that it is not aligned with the visual model. You can try this one out to see what I'm talking about.
Is there some kind of update call that is needed for Gazebo to handle these things properly or is this a bug in Gazebo?
I've noticed that the problem is inconsistent which leads me to believe it has something to do with the order (or timing) of things being loaded.