LeeKeyu/sarl_star

compute_cost() function cannot find map information.

Closed this issue · 1 comments

After I read your paper and code, I found that the map-based velocity screening mechanism should be inside the compute_cost() function, but I can't find where the input about the 2D grid map information is. I found that self.gc was initialized to none, and I didn't see any modifications later. Could you please help me out?

Hi, thanks for your quesstion :)
Yes, the map-based velocity screening mechanism is implemented in the compute_cost() function in the policy, and policy.gc is modified in the function get_gc() in sarl_star_node(line 172).
Note that in sarl_star_node.py (line 113), we defined a node to subscribe the global costmap published by move_base:
self.global_costmap_sub = rospy.Subscriber('/move_base/global_costmap/costmap', OccupancyGrid, self.get_gc)
which will call the function: get_gc()
That is why we need to launch the move_base before the sarl_star_node in the launch file

Hope this will help!