Giter VIP home page Giter VIP logo

Comments (4)

kjyv avatar kjyv commented on July 17, 2024

Which version of pyOpt did you install? You should install the one mentioned in the readme.

Also, it seems that you have a zero mass somewhere in your model:
RuntimeWarning: invalid value encountered in true_divide
old_com = self.model.xStdModel[i10+1:i10+4] / self.model.xStdModel[i*10],

from flobaroid.

mouhyemen avatar mouhyemen commented on July 17, 2024

I installed the one in the readme. Simply cloned it and ran

sudo python setup.py install

The zero mass has been fixed. Not getting any feasible solutions by the way. Even for the kuka URDF provided.

from flobaroid.

crush0441 avatar crush0441 commented on July 17, 2024

@mouhyemen @kjyv
I met the same problem with you and I know the cause of this problem.

You can avoid this problem by editing *.yaml config file.

The cause of this problem:

        # amount of collision checks to be done
        eff_links = self.model.num_links - len(self.config['ignoreLinksForCollision']) + len(self.world_links)

        self.num_constraints = self.num_postures * (eff_links * (eff_links-1) // 2)

        #get neighbors
        nb_pairs = []  # type: List[Tuple]
        for link in self.neighbors:
            if link in self.config['ignoreLinksForCollision']:
                continue
            if link not in self.model.linkNames:
                continue
            nb_real = set(self.neighbors[link]['links']).difference(
                self.config['ignoreLinksForCollision']).intersection(self.model.linkNames)
            for l in nb_real:
                if (link, l) not in nb_pairs and (l, link) not in nb_pairs:
                    nb_pairs.append((link, l))
        self.num_constraints -= self.num_postures * (len(nb_pairs) +        # neighbors
                                  len(self.config['ignoreLinkPairsForCollision']))  # custom combination

There is a bug when calculating the amount of collision checks to be done.
The item:

self.config['ignoreLinksForCollision']
self.config['ignoreLinkPairsForCollision']

When the same link name occurs in these two items, the error you describe will happen. This error can be solved by improving the calculation logic of collision amounts.

from flobaroid.

kjyv avatar kjyv commented on July 17, 2024

About no feasible solutions found: I guess this has to do with newer versions of the libraries and tool stack producing different output than 2 years ago etc. Not sure how to easily find this at the moment but to go through the intermediate steps and look for wrong data. This is not a fire and forget software I guess but if you want to use some of the algorithms, you can use it as a starting point (I'm not actively working on it anymore).

Good find about the wrong calculation, for now it's best if you don't ignore links "twice" I guess :)

from flobaroid.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.