{"action":"closed","issue":{"url":"https://api.github.com/repos/bulletphysics/bullet3/issues/1873","repository_url":"https://api.github.com/repos/bulletphysics/bullet3","labels_url":"https://api.github.com/repos/bulletphysics/bullet3/issues/1873/labels{/name}","comments_url":"https://api.github.com/repos/bulletphysics/bullet3/issues/1873/comments","events_url":"https://api.github.com/repos/bulletphysics/bullet3/issues/1873/events","html_url":"https://github.com/bulletphysics/bullet3/issues/1873","id":359033346,"node_id":"MDU6SXNzdWUzNTkwMzMzNDY=","number":1873,"title":"Unable to change the mass of link with changeDynamics","user":{"login":"ethanluoyc","id":6040760,"node_id":"MDQ6VXNlcjYwNDA3NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6040760?v=4","gravatar_id":"","url":"https://api.github.com/users/ethanluoyc","html_url":"https://github.com/ethanluoyc","followers_url":"https://api.github.com/users/ethanluoyc/followers","following_url":"https://api.github.com/users/ethanluoyc/following{/other_user}","gists_url":"https://api.github.com/users/ethanluoyc/gists{/gist_id}","starred_url":"https://api.github.com/users/ethanluoyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethanluoyc/subscriptions","organizations_url":"https://api.github.com/users/ethanluoyc/orgs","repos_url":"https://api.github.com/users/ethanluoyc/repos","events_url":"https://api.github.com/users/ethanluoyc/events{/privacy}","received_events_url":"https://api.github.com/users/ethanluoyc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-11T12:52:35Z","updated_at":"2018-09-11T16:19:12Z","closed_at":"2018-09-11T16:19:12Z","author_association":"NONE","body":"Hi,\r\n\r\nI think there might be some issue with changing the mass of object\r\nin the Gym environment. Specifically I am not able to change the mass of the link\r\n\r\n```python\r\nenv = gym.make('HalfCheetahBulletEnv-v0')\r\nunwrapped = env.unwrapped\r\nunwrapped.reset()\r\np = unwrapped._p\r\npart = unwrapped.robot.parts['torso']\r\nbodyIndex = part.bodyIndex\r\npartIndex = part.bodyPartIndex\r\ninfo = p.getDynamicsInfo(part.bodies[bodyIndex], partIndex)\r\nprint('before mass', info[0])\r\np.changeDynamics(bodyIndex, partIndex, mass=5)\r\ninfo = p.getDynamicsInfo(part.bodies[bodyIndex], partIndex)\r\nprint('after mass', info[0])\r\n```\r\n\r\nThe output is \r\n```\r\nWARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.\r\nWARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.\r\nWalkerBase::__init__ start\r\nbefore mass 9.45733335583469\r\nafter mass 9.45733335583469\r\n```\r\nHowever this works for \"InvertedPendulumBulletEnv-v0\", if we change the mass of the pole (i.e., we\r\nchange the mass of the part \"pole\")\r\n\r\nI am using Pybullet version 2.1.4 (just upgraded from PyPI)\r\n"}}
{"actor":{"display_login":"erwincoumans"}}