GithubHelp home page GithubHelp logo

Comments (2)

hooverryan avatar hooverryan commented on July 18, 2024 1

I inadvertently changed the shape of self.pos in the _housekeeping function. As a result, the iteration through the drones in _updateAndStoreKinematicInfo was creating an error. This was my error.

from gym-pybullet-drones.

JacopoPan avatar JacopoPan commented on July 18, 2024

EDIT: ok, thanks, never mind :D

Thanks @hooverryan, script

python fly.py

works fine on macOS and Ubuntu, can you check if replacing _updateAndStoreKinematicInfo with this

    def _updateAndStoreKinematicInfo(self):
        for i in range (self.NUM_DRONES):
            #self.pos[i], self.quat[i] = p.getBasePositionAndOrientation(self.DRONE_IDS[i], physicsClientId=self.CLIENT)
            #self.rpy[i] = p.getEulerFromQuaternion(self.quat[i])
            #self.vel[i], self.ang_v[i] = p.getBaseVelocity(self.DRONE_IDS[i], physicsClientId=self.CLIENT)
            pos, quat = p.getBasePositionAndOrientation(self.DRONE_IDS[i], physicsClientId=self.CLIENT)
            self.pos[i] = np.array(pos); self.quat[i] = np.array(quat)
            self.rpy[i] = p.getEulerFromQuaternion(self.quat[i])
            vel, ang_v = p.getBaseVelocity(self.DRONE_IDS[i], physicsClientId=self.CLIENT)
            self.vel[i] = np.array(vel); self.ang_v[i] = np.array(ang_v)

circumvents the problem?

from gym-pybullet-drones.

Related Issues (20)

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.