jsk-ros-pkg / jsk_robot

jsk-ros-pkg/jsk_robot
https://github.com/jsk-ros-pkg/jsk_robot
73 stars 97 forks source link

[jsk_naoqi_robot] NaOでaudioを使いたい #1682

Open a-ichikura opened 1 year ago

a-ichikura commented 1 year ago

https://github.com/jsk-ros-pkg/jsk_robot/tree/master/jsk_naoqi_robot#troubleshooting

上記のtrouble shootingに従って、~/catkin_ws/src/naoqi_driver/share/boot_config.jsonのaudioをfalseに設定しました。 NaOでjsk_nao_starupを実行するときに、falseのままだと/nao_robot/naoqi_driver/audioがpublishされず、speech recognitionが実行できませんでした。

実行したかったコードはhttps://github.com/jsk-ros-pkg/jsk_robot/tree/master/jsk_naoqi_robot/jsk_nao_startup を参考に、

roslaunch jsk_nao_startup jsk_nao_startup.launch network_interface:=enp4s0 launch_ros_speech_recognition:=true audio_org:=/nao_robot/naoqi_driver/audio

です。 trueにして実行したら、/nao_robot/naoqi_driver/audioもpublishされて、speech recognitionも実行できました。

なぜubuntu 18.04ではfalseにするのでしょうか? trueだとどんな問題が起きるのか知りたいです。

cc @Kanazawanaoaki

k-okada commented 1 year ago

これをfalseにしている理由は https://github.com/jsk-ros-pkg/jsk_robot/issues/1474#issuecomment-1110768907 にあって,これをしないとpepperが動かない,ということだったかとおもいます.

このIssueを見ると,Naoはこの変更をしなくても動くのか...

ちなみに,なぜfalseにしないといけないかは未解決問題なようで

https://github.com/ros-naoqi/naoqi_driver/issues/150 https://github.com/ros-naoqi/naoqi_driver/issues/96#issuecomment-350005128

Most probably, the issue is not related to Audio, the Audio is just the 1st service to start and when your system crushes it stops on the 1st service that is Audio.

From our previous experience, we had this issue because of firewalls blocking the connection. So it was related to the network problem.

という人もいるんだけど,だったら,audioをstartする前にsleep入れたら良いじゃん,となるとおもって試してみたんだけど,それだとダメだった気がします.

a-ichikura commented 1 year ago

NaOだと~/catkin_ws/src/naoqi_driver/share/boot_config.jsonのaudioをfalseにしてもnaoqi_driver.launchは問題なく立ち上がって、/nao_robot/naoqi_driver/camera/front/image_raw/nao_robot/naoqi_driver/bumperなどのtopicは正常に見えています。

ただ、怪しいのがNaOのautonomous lifeがONの状態でaudioをtrueにすると、常に周りの環境音に反応しようとしてNaOのheadの中にあるCPUの処理が追いつかなくて“Head processor hot”の状態になるのかなと思いました。参考

なので、NaOでもdefaultで立ち上がるautonomous lifeをOFFにしてから、使うのが良さそうです。 autonomous life