gzfactory spawning not working in Gazebo 1.2
Hi,
1)I am trying to spawn an sdf model using the gzfactory command line tool.
For this command I get the following error:
$gzfactory spawn -f .gazebo/models/table/model.sdf -m table -x 1 -y 1 -z 2 -R 0 -P 0 -Y 0
Error [SDF.cc:987] Unable to find value for key[origin]
Error [SDF.cc:741] Missing element description for [origin]
Segmentation fault (core dumped)
2)If I try to spawn it from a world plugin via msgs::Factory messages on the "~/factory" topic.
msgs::Factory msg;
msg.set_sdf_filename("~/.gazebo/models/table/model.sdf");
msgs::Set(msg.mutable_pose(), math::Pose(math::Vector3(0.3, 0.5, 0.945), math::Quaternion(0.0, 0.0, 0.0)))
factoryPub->Publish(msg);
OR with:
_parent->InsertModelFile("models/table/model.sdf");
Error [SystemPaths.cc:281] Unknown URI prefix[~/.gazebo/models/table/model.sdf]
Error [ModelDatabase.cc:219] Unable to download model[~/.gazebo/models/table/model.sdf]
Error [ModelDatabase.cc:391] Invalid model manifest file[/manifest.xml]
Error [World.cc:1201] Unable to read sdf file.
How am I supposed to add a local model to gazebo ??
Cheers, Andrei