PlayerClientをセットアップし、シミュレーションをそれに接続しようとしています。私が今持っているコードは-
/*
* Player/Stage manual tutorial example
*/
#include <stdio.h>
#include </usr/local/include/player-3.0/libplayerc++/playerc++.h>
//main
int main(int argc, char* argv[]) {
using namespace PlayerCc;
PlayerClient robot("localhost");
Position2dProxy p2dProxy(&robot, 0);
SonarProxy sonarProxy(&robot, 0);
BlobfinderProxy blobProxy(&robot, 0);
LaserProxy laserProxy(&robot, 0);
return 0;
}
私が得るエラーは-
playerc error : connect call on [localhost:6665] failed with error [111:Connection refused]
terminate called after throwing an instance of 'PlayerCc::PlayerError'
Aborted
コードを実行したときにPlayerが現在実行されていないことと関係があると思います。しかし、私はこれに非常に慣れていないので、よくわかりません。どうすればこれを修正または少なくともデバッグすることができますか?どんな助けでも大歓迎です。