Mr-Tony921 / xju-robot

xju robot project for algorithm teaching.
Apache License 2.0
227 stars 72 forks source link

range_relocation没起作用 #8

Closed Qin-Yuan closed 1 year ago

Qin-Yuan commented 1 year ago

启动relocation.cpp 文件后,不能像b站中大佬的效果,基本上没有起作用,确保节点编译通过、能订阅地图和雷达的话题,如下输出给定的就是最后计算出的,好像没有起作用 :

[INFO] [1680866422.659020978] [range_relocatoin]: Receive original initial pose for amcl node [0.003, 0.217, 0.399] [INFO] [1680866423.726686561] [range_relocatoin]: Get new best pose [0.003, 0.217, 0.399] score [279], time go 1.068

[INFO] [1680866413.634283631] [range_relocatoin]: Receive original initial pose for amcl node [-0.213, 0.280, -0.327] [INFO] [1680866414.578891224] [range_relocatoin]: Get new best pose [-0.213, 0.280, -0.327] score [49], time go 0.945

Mr-Tony921 commented 1 year ago

看起来这个LOG不是在小橘的DEMO里输出的,打印属性不一样 - -ll [ INFO] [1681091207.123734844, 912.924000000]: Receive original initial pose for amcl node [-4.790, -1.984, 0.242] [ WARN] [1681091207.516548227, 913.147000000]: Get new best pose [-5.090, -2.234, -0.055] score [135], time go 0.223 [ INFO] [1681091207.527650097, 913.157000000]: Setting pose (913.157000): -5.090 -2.234 -0.055 我试了最新的提交上是正常的,如果用在你自己的工程,要保证地图障碍值和小橘地图是一致的才行(100),然后调一下rangeRelocate函数的搜索范围