Howto access a model's dimensions from inside a ModelPlugin
Hi guys,
i have implemented a model plugin, which is automatically instantiated embedding a sdf in my simulated world. With the use of a model ptr i should have, as the function name indicates, access to the collision box by
math::Box GetCollisionBox() const
Unfortunately, this function always returns a zero vector for the dimension of this box, though Gazebo's collision view in the GUI displays the correct dimension. Another method, which is provided by the model pointer,
math::Box GetBoundingBox() const
provides values of which it isn't obvious how they are calculated, related to the sdf definition of the model. Having a look at the current code in Model.cc on bitbucket, following up l.748, it seems to be calculated iterating through all links, aggregating over all the bounding boxes of the links.
So my question is, how can the bounding box be specified the right way in order to derive the appropriate dimensions of a model?
Best regards!