Model names and hierarchy
Hello. I'm trying to load my hexapod robot model in Gazebo 2.2, following this tutorial. I had an old hexapodsim.urdf.xacro file, that I converted to hexapodsim.urdf and then to hexapodsim.sdf. So far so good. Whenever I try to launch gazebo, I get the following:
Error [ModelDatabase.cc:407] Unable to download model[model://hexapodsim]
Error [parser_urdf.cc:2608] Unable to call parseURDF on robot model
Error [parser.cc:273] parse as old deprecated model file failed.
Error [World.cc:1544] Unable to read sdf file.
I followed carefully the tutorial, and I don't understand what's going on. My folder tree is like this:
hexapod_model
hexapodsim
- hexapodsim.cc
- CMakeLists.txt
- model.sdf
- model.urdf
- model.config
- meshes
- build
- hexapod.world
My hexapodsim.cc file looks like this:
#include "gazebo/physics/physics.hh"
#include "gazebo/common/common.hh"
#include "gazebo/gazebo.hh"
namespace gazebo
{
class Hexapodsim : public WorldPlugin
{
public: void Load(physics::WorldPtr _parent, sdf::ElementPtr /*_sdf*/)
{
// Option 1: Insert model from file via function call.
// The filename must be in the GAZEBO_MODEL_PATH environment variable.
_parent->InsertModelFile("model://hexapodsim");
}
};
// Register this plugin with the simulator
GZ_REGISTER_WORLD_PLUGIN(Hexapodsim)
}
I made sure that the GAZEBOMODELPATH is set correctly to the hexapodsim folder; my GAZEBOPLUGINPATH is set correctly to the build folder where my libhexapodsim.so lies. I used the same name (hexapodsim) for the model.config, model.sdf and hexapod.world file. I thought it might be a filename convention problem, or a directories hierarchy issue, because I tried to rearrange the folder configuration and I was using different names for the files, and Gazebo managed to parse the .sdf file (even though I had some errors due to the lack of a couple of plugins I was trying to load). What is wrong now? Thanks for the help.