ROSCORE Error
先日のこと.
$ roscore
$ rosrun uvc_camera uvc_camera_node
$ rosrun image_view image_view image:=/image_raw
Couldn't find an AF_INET address for [hostname -I]
なんぞ!?
どうやらMasterのネーム解決ができていないらしい.
ラズパイと接続のため,いろいろ環境変数をいじったのがあかんかったか.
とりあえずQiita読んでどうにか対処しようとする.
$ roscore
roscore cannot run as another roscore/master is already running.
Please kill other roscore/master processes before relaunching.
The ROS_MASTER_URI is http://**(A)**:11311/
The traceback for the exception was written to the log file
(一部書き換え)
どういうことなの?
ROS_MASTER_URIが指定間違えなのか?
とりあえず確認しよう.
$ echo $ROS_MASTER_URI
http://localhost:11311
あれ…?とりあえず初期設定に書き換え
$ export ROS_MASTER_URI=http://localhost:11311
$ sudo gedit /etc/hosts
$ source ~/.bashrc
$ echo $ROS_MASTER_URI
http://localhost:11311
これでいいのか? いや,よくない.なにも変わっていない.
再びググってみると,内部でROS_MASTER_URI=http://**(A)**:11311 の ROSCORE が動いているらしいことが分かった.なんで…?
ならばROSCOREを止めればいい.
$ killall -9 roscore
$ killall -9 rosmaster
$ roscore
$ rosrun uvc_camera uvc_camera_node
$ rosrun image_view image_view image:=/image_raw
今度はうまくいった.killallすればよかったのか.