Loading ...
Sorry, an error occurred while loading the content.

Ogre 1.7.2

Expand Messages
  • Jason
    Ethan, I recently reformatted my Ubuntu 9.04 work computer and installed Ubuntu 10.04 on it (I know, I should have done this a long time ago). I downloaded
    Message 1 of 6 , Nov 30, 2010
    View Source
    • 0 Attachment
      Ethan,

      I recently reformatted my Ubuntu 9.04 work computer and installed Ubuntu 10.04 on it (I know, I should have done this a long time ago). I downloaded all of the latest Bullet and Ogre source files as well as the latest cvs of Tekkotsu. I notice that when I try to run any robot executable in mirage, I get an error from mirage that says:

      mirage: /home/jason/Downloads/ogre_src_v1-7-2/OgreMain/src/OgreNode.cpp:393: virtual void Ogre::Node::setOrientation(const Ogre::Quaternion&): Assertion `!q.isNaN() && "Invalid orientation supplied as parameter"' failed.
      Aborted

      I never had a problem with 1.7.1, so I'm assuming that this is a problem with the newest Ogre, but I figured I would run it by you in case it's a simple fix (illegal division?).

      Before I got to that, I edited the project Makefile where -lskewlzone is added to have -lBotSense -lrnr -lRCB3 -li2c -lserial instead. I also changed the conditional to

      ifeq($(TEKKOTSU_TARGET_MODEL),TGT_KHR2)

      temporarily because the previous condition of

      ifneq ($(SKEWLZONE_ROOT),)

      wasn't allowing for the libraries to be linked in. I realize that this doesn't allow for compatibility with other platforms, but I wasn't sure what the previous condition was doing.

      I also edited Environment.conf by commenting out the condition around SKEWLZONE_ROOT, because like the condition in the Makefile, I wasn't sure what

      ifneq ($(filter TGT_KHR2,$(TEKKOTSU_TARGET_MODEL)),)

      was attempting to do. It looks like both check against a blank parameter, and should execute, but for some reason they don't. I am also not an expert on make files.

      After compiling, I had a run time error. Even though the Skewlzone root is /usr/local and I install all of the libraries to /usr/local/lib, the program still looks in /usr/lib at run time. I copied the libraries into /usr/lib for the time being.

      I thought that I would run all of this by you in case I am way off as far as usage.

      Thanks,
      Jason Tennyson
    • Ethan Tira-Thompson
      ... This is an annoying issue... Quaternions are supposed to stay normalized to a magnitude of ‘1’, or else their resulting usage gets invalid results.
      Message 2 of 6 , Nov 30, 2010
      View Source
      • 0 Attachment
        > mirage: /home/jason/Downloads/ogre_src_v1-7-2/OgreMain/src/OgreNode.cpp:393: virtual void Ogre::Node::setOrientation(const Ogre::Quaternion&): Assertion `!q.isNaN() && "Invalid orientation supplied as parameter"' failed.
        > Aborted

        This is an annoying issue... Quaternions are supposed to stay normalized to a magnitude of ‘1’, or else their resulting usage gets invalid results. Unfortunately, with the way computer arithmetic works, rounding errors accumulate and it may drift from perfect normalization. If it drifts under 1, things generally still work, but if it goes a hair over 1, some operations will result in NaN values, which then quickly kills everything.

        The other way this comes up is if the physics simulation screws up, that can result in NaN values being copied to an object, and Ogre is generally the first to notice and raise a fuss.

        I haven’t updated my libraries in a while, so I’m building the current Ogre and Bullet releases and we’ll see if I can replicate. Otherwise, a stack trace showing where the exception was generated would be extremely helpful. (note, not where it was *caught*, which doesn’t help as much... see ‘gdb catch throw’ to set a breakpoint where the exception is first generated)

        As for the Makefile stuff:

        The way I was hoping to set this up is that in Environment.conf SKEWLZONE_ROOT defaults to /usr/local, it then checks for libskewlzone.so/dylib... if found, it keeps the setting, otherwise it blanks it out. It only bothers checking this if the target model is KHR2. I use a filter list there just to make it easier to add other models to the filter list. (the filter directive should return the any filtered words from the first argument that it finds in the second... the ifneq with a blank second argument then triggers the condition to be included if any words were found) We could leave out the model check altogether if the library detection is working.

        The second step is where this is used in the Makefile, where you had trouble with the link flags not being applied. I have a feeling this is because the library detection above was looking for the wrong library, so it blanks the root setting, and then the Makefile avoids using the link flags.

        So I think this might start working if we fix the library detection in Environment.conf, and then supply all of the required linker flags in the Makefile. Instead of libskewlzone.so/dylib, what is the ‘definitive’ library to check for? I’m thinking libBotSense.so/dylib?

        Try these changes (relative to the repository version):

        project/Environment.conf:

        - SKEWLZONE_ROOT := $(shell if [ -r $(SKEWLZONE_ROOT)/lib/libskewlzone.dylib -o -r $(SKEWLZONE_ROOT)/lib/libskewlzone.so ] ; then echo $(SKEWLZONE_ROOT) ; fi)
        + SKEWLZONE_ROOT := $(shell if [ -r $(SKEWLZONE_ROOT)/lib/libBotSense.dylib -o -r $(SKEWLZONE_ROOT)/lib/libBotSense.so ] ; then echo $(SKEWLZONE_ROOT) ; fi)

        project/Makefile:
        - LDFLAGS:=$(LDFLAGS) -lskewlzone
        + LDFLAGS:=$(LDFLAGS) -L$(SKEWLZONE_ROOT)/lib -lBotSense -lrnr -lRCB3 -li2c -lserial

        -Ethan
      • Ethan Tira-Thompson
        ... Yeah, I see the same assert message, so we’ll assume it’s the same issue for now and I’ll try to fix this... using the release versions of Ogre 1.7.2
        Message 3 of 6 , Nov 30, 2010
        View Source
        • 0 Attachment
          > I haven’t updated my libraries in a while, so I’m building the current Ogre and Bullet releases and we’ll see if I can replicate.


          Yeah, I see the same assert message, so we’ll assume it’s the same issue for now and I’ll try to fix this... using the release versions of Ogre 1.7.2 and Bullet 2.77.

          Also, looks like the assert is aborting without unrolling the stack, so nevermind with the stack trace at catch vs. throw issue... sometimes that’s an issue but doesn’t seem to be this time :)

          -Ethan
        • Ethan Tira-Thompson
          ... Yeah, this seems to be the cause of problems on my end... falling back to Bullet 2.76 (instead of the current release 2.77) fixes the issue. As to *why*
          Message 4 of 6 , Nov 30, 2010
          View Source
          • 0 Attachment
            > The other way this comes up is if the physics simulation screws up, that can result in NaN values being copied to an object, and Ogre is generally the first to notice and raise a fuss.

            Yeah, this seems to be the cause of problems on my end... falling back to Bullet 2.76 (instead of the current release 2.77) fixes the issue. As to *why* bullet is returning NaNs, that will take more time.

            -Ethan
          • Jason
            ... I think that this looks like a good solution. However, the libraries are not linking in. I will try to find the issue tomorrow and come back with what I
            Message 5 of 6 , Dec 1, 2010
            View Source
            • 0 Attachment
              > Try these changes (relative to the repository version):
              >
              > project/Environment.conf:
              >
              > - SKEWLZONE_ROOT := $(shell if [ -r $(SKEWLZONE_ROOT)/lib/libskewlzone.dylib -o -r $(SKEWLZONE_ROOT)/lib/libskewlzone.so ] ; then echo $(SKEWLZONE_ROOT) ; fi)
              > + SKEWLZONE_ROOT := $(shell if [ -r $(SKEWLZONE_ROOT)/lib/libBotSense.dylib -o -r $(SKEWLZONE_ROOT)/lib/libBotSense.so ] ; then echo $(SKEWLZONE_ROOT) ; fi)
              >
              > project/Makefile:
              > - LDFLAGS:=$(LDFLAGS) -lskewlzone
              > + LDFLAGS:=$(LDFLAGS) -L$(SKEWLZONE_ROOT)/lib -lBotSense -lrnr -lRCB3 -li2c -lserial

              I think that this looks like a good solution. However, the libraries are not linking in. I will try to find the issue tomorrow and come back with what I was doing wrong.

              Jason
            • Jason
              I always think of the answer right after I hit send. There is no libBotSense.so, only a libBotSense.a. I changed it to check for librnr.so for the time
              Message 6 of 6 , Dec 1, 2010
              View Source
              • 0 Attachment
                I always think of the answer right after I hit send. There is no libBotSense.so, only a libBotSense.a. I changed it to check for librnr.so for the time being, since that is also a root library. It compiles but doesn't run because it can't find libi2c.so for some reason, but since I don't have an immediate answer for that (until I hit send again), I'm going to go ahead and switch gears to another project and fix it tomorrow.

                Jason
              Your message has been successfully submitted and would be delivered to recipients shortly.