Returns the distance from the (rgb_front) camera to the target Args: target ([type]): [description] Returns: [type]: [description]
(self, target)
| 845 | return distance |
| 846 | |
| 847 | def _get_distance(self, target): |
| 848 | """Returns the distance from the (rgb_front) camera to the target |
| 849 | |
| 850 | Args: |
| 851 | target ([type]): [description] |
| 852 | |
| 853 | Returns: |
| 854 | [type]: [description] |
| 855 | """ |
| 856 | sensor_transform = self._sensors['rgb_front'].get_transform() |
| 857 | |
| 858 | distance = np.sqrt( |
| 859 | (sensor_transform.location.x - target.x) ** 2 + |
| 860 | (sensor_transform.location.y - target.y) ** 2 + |
| 861 | (sensor_transform.location.z - target.z) ** 2) |
| 862 | |
| 863 | return distance |
| 864 | |
| 865 | |
| 866 | def _get_depth(self, data): |
no test coverage detected