# Sonars¶

## Specifications¶

• Frequency: 40kHz.
• Sensitivity: -86dB.
• Resolution: 1cm.
• Detection range: 0.25m - 2.55m.
• Effective cone: 60°.

NAO is equipped with two ultrasonic sensors (or sonars) which allow it to estimate the distance to obstacles in its environment. The detection range goes from 25 cm to 255 cm, but under 25 cm there is no distance information, the robot only knows that an object is present.

## Location¶

Position relative to the Torso frame.

Sonar name X(m) Y(m) Z(m) WX(rd)[deg]* WY(rd)[deg]* WZ(rd)[deg]*
US sensor 1 0.0537 -0.0341 0.0698 0.0 -0.1745 [-10.0] -0.3490 [-20.0]
US sensor 2 0.0477 -0.0416 0.0509 0.0 0.2618 [15.0] -0.4363 [-25.0]

Note

We adopt the roll, pitch and yaw notation for angle representation. So, to construct an homogeneous transform with rotation (Wx,Wy,Wz) use T=rotZ(Wz)*rotY(Wy)*rotX(Wx)

• US sensor 3 is symmetrical to US sensor 1 with respect to sagittal plane of the robot.
• US sensor 4 is symmetrical to US sensor 2 with respect to sagittal plane of the robot.

## Accessing value using ALMemory keys¶

Access echos value by using ALMemory key name.

Left sonar(m):

```Device/SubDeviceList/US/Left/Sensor/Value
Device/SubDeviceList/US/Left/Sensor/Value1
Device/SubDeviceList/US/Left/Sensor/Value2
Device/SubDeviceList/US/Left/Sensor/Value3
Device/SubDeviceList/US/Left/Sensor/Value4
Device/SubDeviceList/US/Left/Sensor/Value5
Device/SubDeviceList/US/Left/Sensor/Value6
Device/SubDeviceList/US/Left/Sensor/Value7
Device/SubDeviceList/US/Left/Sensor/Value8
Device/SubDeviceList/US/Left/Sensor/Value9
```

Right sonar(m):

```Device/SubDeviceList/US/Right/Sensor/Value
Device/SubDeviceList/US/Right/Sensor/Value1
Device/SubDeviceList/US/Right/Sensor/Value2
Device/SubDeviceList/US/Right/Sensor/Value3
Device/SubDeviceList/US/Right/Sensor/Value4
Device/SubDeviceList/US/Right/Sensor/Value5
Device/SubDeviceList/US/Right/Sensor/Value6
Device/SubDeviceList/US/Right/Sensor/Value7
Device/SubDeviceList/US/Right/Sensor/Value8
Device/SubDeviceList/US/Right/Sensor/Value9
```