{"action":"opened","issue":{"url":"https://api.github.com/repos/benelot/pybullet-gym/issues/17","repository_url":"https://api.github.com/repos/benelot/pybullet-gym","labels_url":"https://api.github.com/repos/benelot/pybullet-gym/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/benelot/pybullet-gym/issues/17/comments","events_url":"https://api.github.com/repos/benelot/pybullet-gym/issues/17/events","html_url":"https://github.com/benelot/pybullet-gym/issues/17","id":387755020,"node_id":"MDU6SXNzdWUzODc3NTUwMjA=","number":17,"title":"Camera adjust not working","user":{"login":"unrealwill","id":11304248,"node_id":"MDQ6VXNlcjExMzA0MjQ4","avatar_url":"https://avatars0.githubusercontent.com/u/11304248?v=4","gravatar_id":"","url":"https://api.github.com/users/unrealwill","html_url":"https://github.com/unrealwill","followers_url":"https://api.github.com/users/unrealwill/followers","following_url":"https://api.github.com/users/unrealwill/following{/other_user}","gists_url":"https://api.github.com/users/unrealwill/gists{/gist_id}","starred_url":"https://api.github.com/users/unrealwill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unrealwill/subscriptions","organizations_url":"https://api.github.com/users/unrealwill/orgs","repos_url":"https://api.github.com/users/unrealwill/repos","events_url":"https://api.github.com/users/unrealwill/events{/privacy}","received_events_url":"https://api.github.com/users/unrealwill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-05T13:23:47Z","updated_at":"2018-12-05T13:23:47Z","closed_at":null,"author_association":"NONE","body":"Calling env.env.camera_adjust()\r\n\r\nresults in undefined attribute self._p at following line : \r\nhttps://github.com/benelot/pybullet-gym/blob/5bae28508e97564dad062af820ef7faeee31bdff/pybulletgym/envs/mujoco/env_bases.py#L132\r\n\r\nIn pybulletgym/envs/mujoco/env_bases.py\r\nThe fix is to inject the env into the camera with : \r\nin init : \r\n\r\n`self.camera = Camera(self) `\r\n\r\nand then \r\n\r\n```\r\nclass Camera:\r\n\tdef __init__(self,env):\r\n\t\tself.env = env\r\n\t\tpass\r\n\r\n\tdef move_and_look_at(self,i,j,k,x,y,z):\r\n\t\tlookat = [x,y,z]\r\n\t\tdistance = 10\r\n\t\tyaw = 10\r\n\t\tself.env._p.resetDebugVisualizerCamera(distance, yaw, -20, lookat)\r\n\r\n\r\n\r\n```"}}
{"actor":{"display_login":"unrealwill"}}