@@ -8,14 +8,13 @@ This repo defines the __naoqi_driver__ package for ROS2. The driver is in charge
8
8
The __ naoqi_driver__ is a ROS node.
9
9
It connects to a robot running NAOqi using libQi.
10
10
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.
17
15
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 ) .
19
18
20
19
21
20
## Installation
@@ -88,6 +87,8 @@ assuming the author of the job has agreed to the license terms.
88
87
89
88
## Launch
90
89
90
+ ### Avoid interference with autonomous life
91
+
91
92
To have full control of the robot with ROS,
92
93
you may want to disable autonomous behaviors first:
93
94
@@ -97,20 +98,48 @@ qicli call ALAutonomousLife.setState disabled
97
98
qicli call ALMotion.wakeUp
98
99
```
99
100
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:
101
105
102
106
``` sh
103
107
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
105
109
```
106
110
111
+
112
+ ### NAOqi 2.9 and higher
113
+
107
114
Username and password arguments are required
108
115
for robots running NAOqi 2.9 or greater:
109
116
110
117
``` 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
112
130
```
113
131
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
+ ```
114
143
115
144
## Check that the node is running correctly
116
145
0 commit comments