Skip to content

Commit 82aeaca

Browse files
Improve README about audio service
1 parent d6a4c06 commit 82aeaca

File tree

1 file changed

+39
-10
lines changed

1 file changed

+39
-10
lines changed

README.md

+39-10
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ This repo defines the __naoqi_driver__ package for ROS2. The driver is in charge
88
The __naoqi_driver__ is a ROS node.
99
It connects to a robot running NAOqi using libQi.
1010

11-
It also listens to a libQi endpoint (specified by the option `qi_listen_url`).
12-
This endpoint should be public (*e.g.* `qi_listen_url:=0.0.0.0:0`)
13-
to enable collecting audio buffers remotely.
14-
It should be set to a local address (*e.g.* `qi_listen_url:=127.0.0.1:0`)
15-
when running on the robot.
16-
It can be disabled by setting `qi_listen_url:=` when audio is not required.
11+
To support the audio features, __naoqi_driver__ opens a libQi endpoint.
12+
It is set by default to `127.0.0.1:0` (random port on local host),
13+
so it should be set with the option `qi_listen_url`,
14+
*e.g.* `qi_listen_url:=0.0.0.0:0` to allow collecting audio buffers remotely.
1715

18-
> Audio can be disabled in [boot_config.json](src/naoqi_driver2/share/boot_config.json).
16+
Audio features are enabled by default and can be disabled in
17+
[boot_config.json](src/naoqi_driver2/share/boot_config.json).
1918

2019

2120
## Installation
@@ -88,6 +87,8 @@ assuming the author of the job has agreed to the license terms.
8887

8988
## Launch
9089

90+
### Avoid interference with autonomous life
91+
9192
To have full control of the robot with ROS,
9293
you may want to disable autonomous behaviors first:
9394

@@ -97,20 +98,48 @@ qicli call ALAutonomousLife.setState disabled
9798
qicli call ALMotion.wakeUp
9899
```
99100

100-
The driver can be launched using the following command:
101+
102+
### NAOqi 2.8 and lower
103+
104+
The driver can be launched from a remote machine this way:
101105

102106
```sh
103107
source /opt/ros/<distro>/setup.bash # or source <ws>/install/setup.bash if built from source
104-
ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=<robot_host>
108+
ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=<robot_host> qi_listen_url:=0.0.0.0:0
105109
```
106110

111+
112+
### NAOqi 2.9 and higher
113+
107114
Username and password arguments are required
108115
for robots running NAOqi 2.9 or greater:
109116

110117
```sh
111-
ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=<robot_host> nao_username:=nao nao_password:=<robot_password>
118+
ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=<robot_host> nao_username:=nao nao_password:=<robot_password> qi_listen_url:=0.0.0.0:0
119+
```
120+
121+
122+
### From a Docker container
123+
124+
If you run __naoqi_driver__ from a Docker container with audio features enabled,
125+
you must specify the libQi endpoint with, *e.g.* for port 56000:
126+
127+
```sh
128+
source /opt/ros/<distro>/setup.bash # or source <ws>/install/setup.bash if built from source
129+
ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=<robot_host> qi_listen_url:=0.0.0.0:56000
112130
```
113131

132+
Then you must [expose](https://docs.docker.com/engine/reference/commandline/run/#publish) it from the container.
133+
134+
135+
### On the robot or on the same machine
136+
137+
If you run the driver directly from the robot (or your machine running a virtual robot),
138+
you can omit the options:
139+
140+
```sh
141+
ros2 launch naoqi_driver naoqi_driver.launch.py
142+
```
114143

115144
## Check that the node is running correctly
116145

0 commit comments

Comments
 (0)