Creating sdf element in plugin source code and adding collision
I'm trying to create and add collisions from model mesh (not from sdf, but by using sdf::ElementPtr, AddElement, and Model::Load in a plugin).
The collisions are somehow visualized but I don't see the collision element in the menu (see attached figure). How can I fix this (I want the collisions to appear in menu)? or what could be the possible problem? Thanks.
Notes:
- I'm using gazebo5_5.1.0 compiled from source, Ubuntu 14.04.
- The plugin I'm creating is a world plugin but loads a class object that inherits the Model class (this is the class that has the collisions).
- I'm adding a link element to the _sdf argument, and then loading the _sdf through Model::Load (like in Actor.cc line 124). The collision element is attached to the created link element.
- link->GetCollision("name-of-collision")->HasType(Base::COLLISION) returns true.
- world->GetByName("name-of-collision") does not return NULL.
So I'm guessing the CollisionPtr exists, and something not going right with the communication between gzserver and gzclient?
Asked by Kazuhiro Sasabuchi on 2015-09-14 02:20:21 UTC
Comments