首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Player/Stage如何连接?

Player/Stage如何连接?
EN

Stack Overflow用户
提问于 2011-01-02 04:16:00
回答 1查看 817关注 0票数 0

我正在尝试设置PlayerClient并将模拟连接到它。我现在有的代码是-

代码语言:javascript
复制
/*
 * 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;
}

我得到的错误是-

代码语言:javascript
复制
playerc error   : connect call on [localhost:6665] failed with error [111:Connection refused]
terminate called after throwing an instance of 'PlayerCc::PlayerError'
Aborted

我认为这与我运行代码时播放器当前没有运行有关。但我对此非常陌生,所以我不确定。我怎样才能修复或者至少调试更多呢?任何帮助都是非常感谢的。

EN

回答 1

Stack Overflow用户

发布于 2011-12-07 06:37:02

如果您有ip地址或是否有防火墙阻止您,您将收到连接被拒绝的检查。为了让你的客户端正常工作,你可以阅读一些示例代码。我在这个页面的.tar文件中发现了一些有用的东西:

http://web.eecs.utk.edu/~parker/Courses/CS594-fall07/handouts/PlayerStageGettingStarted.html#eight

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4575584

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档