I do better.I create a C code (like your libgazebo example) that do something similar to what my s-function do.
I send it to you so you can try it and tell me if you have the same problem I have (because also in this case I have the rendering deformation problem!)
If not, it is a problem of my system/gazebo/installation/whatever interaction. And in this case... I have no idea how to solve it!
In the .rar file you can find the C code, the scons for compilation and the world file (simplificated as respect to the real one I use).
Launch gazebo and then launch the example. Thank you Domenico ps: apparently there isn't memory leak of gazebo using top. Nate Koenig ha scritto:
Just a quick and dirty test, can you rerun your code, and monitor the output of 'top'. I'm particularly interested in the memory used by gazebo. There might be a memory leak somewhere. I believe that in a previous email you mentioned you had C code that would also call libgazebo. Does the C code have the same problems as the Matlab code? -nate On Thu, Mar 27, 2008 at 8:05 AM, Domenico Leonello <[EMAIL PROTECTED]> wrote:I did the same tests I talked about last mails with the helicopter upside down and the results are the same. Sometimes the simulation crashes, some other not. Last thing: I incresed the frequency of calling from matlab the libgazebo (from 1 Hz to 10 Hz) and now (as I expected), if the simulation crashes, it does around 10 seconds and not 50. Domenico Jordi Polo ha scritto: > > I don 't think it's a problem with that code. > If you just make the helicopter go up and turn it upside down, the > cameras don't fall but will fall even with the physics disabled if you > wait in that position 50 seconds? > > > > > On Fri, Mar 21, 2008 at 11:55 PM, <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:>Yes, it is a possibility also if it's strange that the crash> happens only > after 50-55 seconds. > > There is a command to impose directly the quaternion instead of euler > angles, using libgazebo? In this case I can do other tests to > verify this > hypothesis! > > Thank you > > Domenico > > > > Then it really seems like a quatern etc conversion bug. > > Unfortunately I will not be able to use the computer in 3 or 4 > days. I'll > > try to find it once I come back. > > If someone has related problem please explain them, it may help > to find > > the > > bug. > > > > > > On Thu, Mar 20, 2008 at 7:53 PM, Domenico Leonello> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> > wrote: > > > >> I tried it right now and I confirm you that now the pause > option works > >> well (It is possible to see on the GUI window that the > simulation is > >> paused). On the other side the camera problem remains. So now > we can > >> probably exclude an ODE problems. > >> > >> Any other idea? > >> > >> Thank you > >> > >> Jordi Polo ha scritto: > >> > > >> > Since revision 4427 (1 minute ago). > >> > The pause boolean in the Simulator interface should behave like a > >> > pause/play button (couldn't try it, I need to sleep now) so > write true > >> > there each time you want to change the state. > >> > The value of the state can be read in the new state member. > >> > So > >> > > >> > if (simIface->data->state==1) //running > >> > simIface->data->pause =true; //pause it > >> > > >> > or similar should work > >> > > >> > Note that this interface can be modified soon (Nate should > review it) > >> > > >> > > >> > On Thu, Mar 20, 2008 at 2:23 AM, Domenico Leonello > >> > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]><mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote: > >> > > >> > for me it's not important the physics so I would like to > turn it > >> off. > >> > > >> > There is any method via libgazebo? > >> > > >> > Jordi Polo ha scritto: > >> > > > >> > > You can turn off the physics simulation pressing the > SPACE key > >> > in the > >> > > gazebo window. Do you need to access to that method via > >> libgazebo? > >> > > No physics means everything static and bodies can > collide and > >> enter > >> > > one another. > >> > > > >> > > The camera problem is really weird... > >> > > > >> > > > >> > > On Thu, Mar 20, 2008 at 1:35 AM, Domenico Leonello > >> > > <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>>> > <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>>> > >> > wrote: > >> > > > >> > > Hi, > >> > >>> > > I did other tests with my program and I noticed this:> >> > > > >> > > when the euler angles I passed are minor or equal > to 12 deg > >> > (I passed > >> > > the equivalent radiant value), all worked fine. > Otherwise I > >> > had that > >> > > strange camera problem. It can be a problem with some > >> > internal setting > >> > > position/attitude? A strange conversion > euler/quaternion? > >> > > > >> > > I don't believe it is a ODE problem because I don't > have any > >> > real > >> > > dynamic integration (I impose the position/attitude > >> > recursively to an > >> > > object, nothing else) but eventually what kind of > change can > >> > I do with > >> > > ODE parameters? Is it possible to turn off the ODE > >> > integration during > >> > > libgazebo calls? (ie, can I use a completely static > >> > environment?) > >> > > > >> > > Thank you > >> > > > >> > > Domenico > >> > > > >> > > Jordi Polo ha scritto: > >> > > > > >> > > > You said that you haven't this problem before. > >> > > > Do you mean that you were using the same control > program, > >> > > upgrading to > >> > > > Gazebo make the problem appears and downgrading > it don't > >> > make it > >> > > > disappear? > >> > > > > >> > > > If the camera is really falling from the object > it should > >> be > >> a > >> > > problem > >> > > > with the physics, something have being changed, for > >> > instance the > >> > > > friction parameter mu1 now is taken into account > for the > >> > > friction. You > >> > > > can try changing that. > >> > > > Also the rendering method of the system can be > configured > >> > in the > >> > > > .gazeborc file now. > >> > > > I can not remember of any other big change that > may be > >> > affecting > >> > > you. > >> > > > > >> > > > Do you have the original file of the gazelle? It > may be a > >> good > >> > > > addition to the sets. > >> > > > > >> > > > > >> > > > On Mon, Mar 3, 2008 at 7:57 PM, Domenico Leonello > >> > > > <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>>>> > > <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>>>> > >> > > wrote: > >> > > > > >> > > > Thank you for the advice. > >> > > > > >> > > > I attached the .world file (I tried some other > >> > configuration > >> > > and the > >> > > > result is the same, so...) and here the C code > >> > > > > >> > > > > >> > > > >> > > >> > /******************************************************************************************/ > >> > > > Initialization .... > >> > > > > >> > > > >> > > >> > /******************************************************************************************/ > >> > > > > >> > > > /// Connect to the libgazebo server > >> > > > try > >> > > > { > >> > > > client->ConnectWait(ServerID, ClientID); > >> > > > //client->Connect(ServerID); > >> > > > } > >> > > > catch (gazebo::GazeboError e) > >> > > > { > >> > > > std::cout << "Gazebo error: Unable to > connect\n" << > >> > e << > >> > > "\n"; > >> > > > return; > >> > > > } > >> > > > /// Open the Left Camera interface > >> > > > try > >> > > > { > >> > > > cam_leftIface->Open(client, > "left_iface-name"); > >> > > > } > >> > > > catch (gazebo::GazeboError e) > >> > > > { > >> > > > std::cout << "Gazebo error: Unable to > connect to > >> > the left > >> > > camera > >> > > > interface\n" > >> > > > << e << "\n"; > >> > > > return; > >> > > > } > >> > > > > >> > > > /// Open the Right Camera interface > >> > > > try > >> > > > { > >> > > > cam_rightIface->Open(client, > "right_iface-name"); > >> > > > } > >> > > > catch (gazebo::GazeboError e) > >> > > > { > >> > > > std::cout << "Gazebo error: Unable to > connect to > >> the > >> > > right camera > >> > > > interface\n" > >> > > > << e << "\n"; > >> > > > return; > >> > > > } > >> > > > > >> > > > /// Open the Simulation Interface > >> > > > try > >> > > > { > >> > > > simIface->Open(client, "default"); > >> > > > } > >> > > > catch (gazebo::GazeboError e) > >> > > > { > >> > > > std::cout << "Gazebo error: Unable to > connect > >> > to the sim > >> > > > interface\n" << e << "\n"; > >> > > > return; > >> > > > } > >> > > > > >> > > > /** Pausing simulation... (maybe not > needed!!) **/ > >> > > > simIface->Lock(1); > >> > > > simIface->data->pause = 1; > >> > > > > >> > > > /// Setting command name for imposing 3D > position > >> > > > uint8_t model_req[32] = "set_pose3d"; > >> > > > memcpy(simIface->data->model_req, > model_req, 32); > >> > > > > >> > > > /// Setting model name for imposing new > Pose in > >> > Simulation > >> > > > Interface > >> > > > uint8_t model_name[512] = "helicopter"; > >> > > > memcpy(simIface->data->model_name, model_name, > >> 512); > >> > > > > >> > > > /** Writing the current odometric > position... **/ > >> > > > simIface->data->model_pose.pos.x = > >> cmd_pos_change[0]; > >> > > > simIface->data->model_pose.pos.y = > >> cmd_pos_change[1]; > >> > > > simIface->data->model_pose.pos.z = > >> cmd_pos_change[2]; > >> > > > > >> > > > simIface->data->model_pose.roll = > >> > cmd_rot_change[0]; > >> > > > simIface->data->model_pose.pitch = > >> cmd_rot_change[1]; > >> > > > simIface->data->model_pose.yaw = > >> cmd_rot_change[2]; > >> > > > > >> > > > /** Unlock simulation interface ... **/ > >> > > > simIface->Unlock(); > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > >> > > >> > /******************************************************************************************/ > >> > > > The cycle (called by matlab-simulink recursively) > >> > > > > >> > > > >> > > >> > /******************************************************************************************/ > >> > > > > >> > > > /** Lock simulation interface ... **/ > >> > > > simIface->Lock(1); > >> > > > > >> > > > uint8_t model_name[512] = "helicopter"; > >> > > > memcpy(simIface->data->model_name, > model_name, 512); > >> > > > > >> > > > /** Writing the current odometric > position... **/ > >> > > > simIface->data->model_pose.pos.x = > >> cmd_pos_change[0]; > >> > > > simIface->data->model_pose.pos.y = > >> cmd_pos_change[1]; > >> > > > simIface->data->model_pose.pos.z = > >> cmd_pos_change[2]; > >> > > > > >> > > > simIface->data->model_pose.roll = > >> cmd_rot_change[0]; > >> > > > simIface->data->model_pose.pitch = > >> cmd_rot_change[1]; > >> > > > simIface->data->model_pose.yaw = > >> cmd_rot_change[2]; > >> > > > > >> > > > /** Unlock simulation interface ... **/ > >> > > > simIface->Unlock(); > >> > > > > >> > > > > >> > > > >> > > >> > /******************************************************************************************/ > >> > > > > >> > > > >> > > >> > /******************************************************************************************/ > >> > > > > >> > > > > >> > > > Here two screenshot of the left camera view: > the first > >> > > > (left_frame_0001) > >> > > > during a normal call, the last > (left_frame_0059) when > >> > > already the > >> > > > simulation starts crashing after 50-60 calls. > >> > > > > >> > > > Any idea? Is it possible that any system > update (using > >> > aptitude) > >> > > > created > >> > > > any problem, for example to the ode or ogre > libraries? > >> > > > Note that before I haven't encountered this > problem! > >> > But now > >> > > I have it > >> > > > also downgrading the SVN version of Gazebo! > >> > > > > >> > > > I'm using Kubuntu (both Gusty and Feisty). > >> > > > > >> > > > Tell me if I post any other usefull information! > >> > > > > >> > > > Thank you > >> > > > > >> > > > > >> > > > Jordi ha scritto: > >> > > > > > >> > > > > Send me as much info as you can. > >> > > > > If you can not send me the code or the > world file > >> > for whatever > >> > > > reason, > >> > > > > send me a screenshot. > >> > > > > Also send this mail to the ML so Nate and > others can > >> > give some > >> > > > advise. > >> > > > > Lately I have not much time for Gazebo but > I'll try > >> > to help > >> > > > > > >> > > > > > >> > > > > On Fri, Feb 29, 2008 at 10:21 PM, Domenico > Leonello > >> > > > > <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>> > >> > > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>>> > >> > > > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> > >> > > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> > >> > > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >> > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>>>>> > >> > > > wrote: > >> > > > > > >> > > > > Hi, > >> > > > > > >> > > > > maybe I found a bug in libgazebo. The > situation > >> > is the > >> > > > following. > >> > > > > > >> > > > > Using MATLAB S-function I impose > recursively > >> > position and > >> > > > attitude > >> > > > > to an > >> > > > > object (with an helicopter mesh) with 2 > cameras > >> > mounted on > >> > > > (like a > >> > > > > stereo pair). > >> > > > > > >> > > > > I observed a strange behaviour during > the calls > >> to > >> > > > libgazebo. If I > >> > > > > impose an attitude (also constant) > different > >> > from (0, > >> > > 0, 0), > >> > > > after a > >> > > > > variable number of calls (it depends on the > >> > entity of the > >> > > > imposed > >> > > > > angles) the cameras seem to fall from the > >> > helicopter and > >> > > > give deformed > >> > > > > images (and then normally the simulation > >> crashes). > >> > > Sometimes it > >> > > > > happens > >> > > > > also that the trimesh attached to the > helicopter > >> > body > >> > > stretches > >> > > > > and deforms. > >> > > > > > >> > > > > If the imposed attitude is (0, 0, 0), I can > >> > move the > >> > > > cameras around > >> > > > > with no problem. > >> > > > > > >> > > > > I didn't find any explanation to this > behaviour. > >> > > > > A memory error is unlikely (otherwise I > can't > >> > explain why > >> > > > with (0, > >> > > > > 0, 0) > >> > > > > values all goes ok!). > >> > > > > > >> > > > > Maybe it is a sort of conversion error > between > >> > euler and > >> > > > quaternions. > >> > > > > This can explain why the mesh > stretches, if the > >> > quaternion > >> > > > is not > >> > > > > normalized to1! But why it happens only > after > >> 50-60 > >> > > calls of > >> > > > libgazebo > >> > > > > and not immediatly? And wht it doesn't > happen > >> when > >> > > euler angles > >> > > > > are (0, > >> > > > > 0, 0)? > >> > > > > > >> > > > > If you need, I can send you pictured of the > >> deformed > >> > > > helicopter and > >> > > > > camera sight. And I can also send any > >> information > >> > > about the > >> > > > C code > >> > > > > that > >> > > > > calls libgazebo. > >> > > > > > >> > > > > Thank you > >> > > > > > >> > > > > Domenico > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > -- > >> > > > > Jordi Polo Carres > >> > > > > NLP laboratory - NAIST > >> > > > > http://www.bahasara.org > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > >> > > >> > ------------------------------------------------------------------------- > >> > > > This SF.net email is sponsored by: Microsoft > >> > > > Defy all challenges. Microsoft(R) Visual > Studio 2008. > >> > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >> > > > _______________________________________________ > >> > > > Playerstage-gazebo mailing list > >> > > > [email protected] > <mailto:[email protected]> > >> > <mailto:[email protected] > <mailto:[email protected]>> > >> > > <mailto:[email protected] > <mailto:[email protected]> > >> > <mailto:[email protected] > <mailto:[email protected]>>> > >> > > > > <mailto:[email protected] > <mailto:[email protected]> > >> > <mailto:[email protected] > <mailto:[email protected]>> > >> > > <mailto:[email protected] > <mailto:[email protected]> > >> > <mailto:[email protected] > <mailto:[email protected]>>>> > >> > > > > >> > > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > -- > >> > > > Jordi Polo Carres > >> > > > NLP laboratory - NAIST > >> > > > http://www.bahasara.org > >> > > > > >> > > > >> > > >> > ------------------------------------------------------------------------ > >> > > > > >> > > > > >> > > > >> > > >> > ------------------------------------------------------------------------- > >> > > > This SF.net email is sponsored by: Microsoft > >> > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > >> > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >> > > > > >> > > > >> > > >> > ------------------------------------------------------------------------ > >> > > > > >> > > > _______________________________________________ > >> > > > Playerstage-gazebo mailing list > >> > > > [email protected] > <mailto:[email protected]> > >> > <mailto:[email protected] > <mailto:[email protected]>> > >> > > <mailto:[email protected] > <mailto:[email protected]> > >> > <mailto:[email protected] > <mailto:[email protected]>>> > >> > > > > >> > > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > >> > > > > >> > > > >> > > > >> > > > >> > > > >> > > -- > >> > > Jordi Polo Carres > >> > > NLP laboratory - NAIST > >> > > http://www.bahasara.org > >> > > >> > > >> > > >> > > >> > -->> > Jordi Polo Carres> >> > NLP laboratory - NAIST > >> > http://www.bahasara.org > >> > > > > > > > > -- > > Jordi Polo Carres > > NLP laboratory - NAIST > > http://www.bahasara.org > > > > > > > > -- > Jordi Polo Carres > NLP laboratory - NAIST > http://www.bahasara.org ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Playerstage-gazebo mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Playerstage-gazebo mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
example_gazebolib.rar
Description: application/rar-compressed
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ Playerstage-gazebo mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
