in safety_gym/envs/engine.py [0:0]
def render_compass(self, pose, color, offset):
''' Render a compass observation '''
robot_pos = self.world.robot_pos()
robot_mat = self.world.robot_mat()
# Truncate the compass to only visualize XY component
compass = np.concatenate([self.obs_compass(pose)[:2] * 0.15, [offset]])
pos = robot_pos + np.matmul(compass, robot_mat.transpose())
self.viewer.add_marker(pos=pos,
size=.05 * np.ones(3),
type=const.GEOM_SPHERE,
rgba=np.array(color) * 0.5,
label='')