zm0612 / Hybrid_A_Star

Hybrid A Star algorithm C++ implementation
Other
670 stars 139 forks source link

Modify the value of resolution under file map.yaml #6

Closed klxxxx closed 4 months ago

klxxxx commented 2 years ago

An error is reported after modifying the variable value of resolution under file map.yaml. When I modify the variable resolution value to a decimal less than 1, an error will be reported. The specific error information is as follows: [run_hybrid_astar-6] process has died [pid 21446, exit code -11, cmd /home/klxxxx/Documents/src715/devel/lib/hybrid_a_star/run_hybrid_astar name:=run_hybrid_astar log:=/home/klxxxx/.ros/log/c3eeeb6c-fe94-11ec-a59d-1c1b0da6edc7/run_hybrid_astar-6.log]. log file: /home/klxxxx/.ros/log/c3eeeb6c-fe94-11ec-a59d-1c1b0da6edc7/run_hybrid_astar-6*.log

piaomiaohuanchen commented 1 year ago

I have encountered the same problem recently, Maybe you can try change: unsigned int map_w = std::floor(current_costmap_ptr_->info.width / map_resolution); unsigned int map_h = std::floor(current_costmap_ptr_->info.height / map_resolution);

-------> unsigned int map_w = std::floor(current_costmap_ptr_->info.width *current_costmap_ptr_->info.resolution / map_resolution); unsigned int map_h = std::floor(current_costmap_ptr_->info.height *current_costmap_ptr_->info.resolution/ map_resolution);

in /hybrid_a_star_flow.cpp I guess this problem is related to c++space management

zm0612 commented 4 months ago

hello, have fixed this bug. thx!