Set camera position
(self, x, y, z, pitch, yaw, roll)
| 91 | exit() |
| 92 | |
| 93 | def set_camera_pose(self, x, y, z, pitch, yaw, roll): |
| 94 | '''Set camera position''' |
| 95 | x = x * 100 |
| 96 | y = - y * 100 |
| 97 | z = z * 100 |
| 98 | camera_settings = { |
| 99 | 'location': {'x': x, 'y': y, 'z': z}, |
| 100 | 'rotation': {'pitch': pitch, 'yaw': -yaw, 'roll': roll} |
| 101 | } |
| 102 | |
| 103 | self._client.request('vset /camera/0/location {x} {y} {z}'.format(**camera_settings['location'])) |
| 104 | self._client.request('vset /camera/1/location {x} {y} {z}'.format(**camera_settings['location'])) |
| 105 | self._client.request('vset /camera/0/rotation {pitch} {yaw} {roll}'.format(**camera_settings['rotation'])) |
| 106 | self._client.request('vset /camera/1/rotation {pitch} {yaw} {roll}'.format(**camera_settings['rotation'])) |
| 107 | print('camera_settings', camera_settings) |
| 108 | |
| 109 | def _camera_init(self): |
| 110 | '''Camera initialization''' |
no outgoing calls
no test coverage detected