osrf / drcsim

Repository for the DRC project.
18 stars 6 forks source link

#127 Error [Plugin.hh:127 #396

Open osrf-migration opened 10 years ago

osrf-migration commented 10 years ago

Original report (archived issue) by Michael Gresham (Bitbucket: mgresham).


I have the following error when I run this custom XML file I've made for Gazebo with gazebo world_edit.world2

Error [Plugin.hh:127] Failed to load plugin libworld_edit.so: libworld_edit.so: cannot open shared object file: No such file or directory

My world_edit.world2 file is below:

#!XML
<?xml version ='1.0'?>
<sdf version = '1.3'>
 <world name='default'>
   <include>
     <uri>model://ground_plane</uri>
   </include>
   <include>
     <uri>model://sun</uri>
   </include>
   <model name="my_mesh">
      <pose> 0 0 0 1.5708 0 0</pose>
     <static>true</static>
     <link name="body">
       <visual name="visual">
         <pose>0 0 0 1.5708 0 0</pose>
         <geometry>
           <mesh><uri>file://rover.dae</uri></mesh>
         </geometry>
       </visual>
       <visual name = "visual2">
         <pose>0 0 0 1.5708 0 0</pose>
         <geometry>
           <mesh><uri>file://Grass.dae</uri></mesh>
         </geometry>
       </visual>
     </link>
   </model>
   <plugin name="world_edit" filename="libworld_edit.so"/>
 </world>
</sdf>

All I'm trying to do is import a few custom image objects I've made on SketchUp Pro into a Gazebo Simulation. I've read a few other similar issues on here that suggest exporting the plugin. I've tried this but it doesn't seem to work well for me.

Does anyone have any other solutions to fix this? Thanks!

The version I'm using is 1.9. I'm thinking about upgrading to 2.0 and seeing if it fixes this though.

osrf-migration commented 10 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Have you set the GAZEBO_PLUGIN_PATH environment variable to include the folder where the plugin is located?

http://gazebosim.org/wiki/Tutorials/1.9/plugins/overview#Using_a_Plugin

osrf-migration commented 10 years ago

Original comment by Michael Gresham (Bitbucket: mgresham).


I get the following result when I use: gzserver ../world_edit.world2

Gazebo multi-robot simulator, version 1.9.2 Copyright (C) 2013 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org

Error [Server.cc:274] Could not open file[../world_edit.world2]

osrf-migration commented 10 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


It looks like gazebo can't find the file there. Can you confirm that the file exists with that name at that location? Does it really have an extension .world2?

osrf-migration commented 10 years ago

Original comment by Michael Gresham (Bitbucket: mgresham).


The file does exist in a seperate folder I made on my Desktop. Folder is "Lab4" and I have a sub-folder within it named "Images"

So redirecting to the folder is: cd Desktop/Lab4/Images

My world_edit.world2 file is located there. And yes it does have a .world2 extension.

Should I change this to a different extension?

osrf-migration commented 10 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


No the extension is fine, I was just checking that it wasn't a typo.

So the file world_edit.world2 is in ~/Desktop/Lab4/Images, and you are invoking gazebo with

$ gzserver ../world_edit.world2

So what folder are you in when you invoke gzserver?

osrf-migration commented 10 years ago

Original comment by Michael Gresham (Bitbucket: mgresham).


Just the main home directory anytime you initially start terminal. If I change the directory to where the file is located in Images, and I run

#!XML

~/Desktop/Lab4/Images$ gzserver ../world_edit.world2

I get the same error message:

#!XML

Error [Server.cc:274] Could not open file[../world_edit.world2]
osrf-migration commented 10 years ago

Original comment by Michael Gresham (Bitbucket: mgresham).


It does run gazebo in terms of giving me an empty world. But it doesn't import the image objects I want to import into the environment.

osrf-migration commented 10 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


The ../ prefix will search the parent directory for the world file. So you should try to open the file without the ../:

$ cd ~/Desktop/Lab4/Images
$ gzserver world_edit.world2
osrf-migration commented 10 years ago

Original comment by Michael Gresham (Bitbucket: mgresham).


I did this, and I still get the same plugin error:

#!XML
Error [Plugin.hh:127] Failed to load plugin libworld_edit.so: libworld_edit.so: cannot open shared object file: No such file or directory

Do you know of a method I can use to search for this plug-in to see if it exists in the gazebo-ros-pkg? Or do I need to update the gazebo-ros-pkg? Possibly export this plug-in from another source?

osrf-migration commented 10 years ago

Original comment by Michael Gresham (Bitbucket: mgresham).


It's the only error issue I'm getting, so once I can get this fixed, I'm confident my file should run alright.

osrf-migration commented 10 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


The world_edit plugin is based on a Gazebo plugin tutorial. Did you follow that tutorial? If you're not using the plugin, just remove that line from the world file.

osrf-migration commented 10 years ago

Original comment by Michael Gresham (Bitbucket: mgresham).


Yes, I did follow that tutorial. Regardless if I remove the plugin or not, I still run into the same problem. It opens the Gazebo window fine, but I can't do anything in it. It's grayed out, my custom image objects are not in the empty world, and I can't do anything in Gazebo b/c all of its functionalities do not work. I can't insert objects, can't manipulate scenes or lighting. Can't do anything in it.

And that's the problem I face. What's wrong with my XML file that is causing this to occur? Is there a patch out there that I need to include?

osrf-migration commented 10 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


I just noticed that you don't have any collision shapes in your model, so it's probably falling out of the screen before it loads up. Try starting gazebo paused (with the -u option) and it should appear. Then add some <collision> elements to keep it from falling through the ground, or disable gravity.

osrf-migration commented 10 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


His model is static, so it shouldn't move.

You're grass.dae file may be the problem. Can you post that file somewhere where I can get it?

osrf-migration commented 10 years ago

Original comment by Michael Gresham (Bitbucket: mgresham).


Okay, I'll try the suggestion regarding the elements in the morning when I work on this some more b/c my XML probably is static in some fashion. I still think there's something else critically wrong with the file though b/c even if it wasn't static, I still can't use any of the features in Gazebo like any user can if you just type "gazebo" by itself through terminal to run an empty world. I can't insert shapes, can't change gravitational physics on objects, nothing. When I run my custom world_edit file, it just creates a Gazebo empty world window that no user or developer can do any work on it. From what I've done thus far, it seems like my problem is more like a plug-in issue, but if it is I would like to know how to solve that problem for future reference.

I doubt my issues are caused by the "grass.dae" file b/c I took that image straight from Google 3D-Warehouse, scaled down the size of it through Sketch-Up Pro 2013, and simply converted it from having a .skp extension to having a Collada .dae extension instead. I haven't changed any other aspect of that image file though.

By the way, how do we post files on this forum board anyways? Seems like the only way we can attach stuff is if it comes from a URL link. Why can't we attach files directly from sources like our external hard drive?

osrf-migration commented 10 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


Regarding attaching files, if you are the issue owner, you should be able to click the "edit" button at the top right corner of the issue, and upload files.

osrf-migration commented 10 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).