robocup uva老版本代码改写

老代码Uva或者二进制不能连接,解决问题看这里:http://sourceforge.net/forum/forum.php?thread_id=2055268&forum_id=76439

针对这个问题的解答,我摘录到这里

Almost all past binaries and source code are not compatible with the version 12 simulator. This problem is caused by overflow of an array that keeps heterogeneous player types. If you want to run old binaries that cannot deal with the number of player types correctly, you need to change the following parameters in ~/.rcssserver/player.conf.

player::player_types = 7 (default : 18)
player::pt_max = 3 (default : 1)
player::allow_mult_default_type = true default : false)

翻译为:

几乎所有过去的二进制可执行文件和源代码和版本12的模拟器不兼容。 这个问题是有一个保存异构球员类型的数组越界所引起的。如果你想要与你运行那些不能正确处理队员类型数目的二进制文件,你需要修改~/.rcssserver/player.conf(即主目录下隐藏文件夹rcssserver下的player.conf)的如下参数

player::player_types = 7 (default : 18)
player::pt_max = 3 (default : 1)
player::allow_mult_default_type = true default : false)

下边我需要看下,如何将自己的代码成为能够正确处理队员类型数目的代码呢?

加油

呵呵,二十分钟之后,我又看到这篇

https://sourceforge.net/forum/forum.php?thread_id=1962875&forum_id=76439

原来改变代码到可以到新server下,更加简单,不用修改~/.rcssserver/player.conf文件,

If you use the UvA base code, you need to change the following value in SoccerTypes.h and compile the code again.

old: #define MAX_HETERO_PLAYERS 7 /*!< Maximum number of hetero players*/

new: #define MAX_HETERO_PLAYERS 18 /*!< Maximum number of hetero players*/

如果你用的是Uva代码,你需要把SoccerType.h文件按下免提是修改,然后编译代码。

old: #define MAX_HETERO_PLAYERS 7 /*!< Maximum number of hetero players*/

new: #define MAX_HETERO_PLAYERS 18 /*!< Maximum number of hetero players*/

哈哈,可以玩了

                                                                                 ---------------fromhttp://fangzhzh.info/blog/robocup-uva-rcssserver-12-segment-fault.html

你可能感兴趣的:(linux,uva,robocup2d)