pepper名前変更

方法1: APIを利用
バージョンが2.4から、「旧ロボットページで名前変更できなくなっちゃったし・・・」


pepper [err 1] ~ $ cat /etc/hostname
pepper

nano changename.py
from naoqi import ALProxy
system = ALProxy("ALSystem","192.168.11.5",9559)
print("before change:" + system.robotName())
system.setRobotName("salt")
print("after change:" + system.robotName())
print("system is goning to reboot")
system.reboot()

pepper [0] ~/work_outan $ python changename.py
[I] 4946 qimessaging.session: Session listener created on tcp://0.0.0.0:0
[I] 4946 qimessaging.transportserver: TransportServer will listen on: tcp://127.0.0.1:43797
[I] 4946 qimessaging.transportserver: TransportServer will listen on: tcp://198.18.0.1:43797
[I] 4946 qimessaging.transportserver: TransportServer will listen on: tcp://192.168.11.5:43797
[W] 4955 qi.path.sdklayout: No Application was created, trying to deduce paths
before change:pepper
after change:pepper
system is goning to reboot

再起動が必要らしい。


方法2: 直接ファイル修正
There is a way to change the name of your robot without using the web interface. Now that you are root, edit the following file with:
nano /etc/hostname
When you are done, save the file with Ctrl+O and Enter, and leave the editor with Ctrl+X. The name change will be applied after rebooting (more on this later).