inaccurate cost value

asked 2021-11-10 02:04:24 -0500

dinesh gravatar image

updated 2021-11-10 03:03:54 -0500

The cost value of cells inside local costmap is comming inaccurate as a result the robot is considering it has stuck. I'm using neo local planner as local_base_planner for my robot with move_base. Here the function which is calcuating the cost value of given cell is:

double get_cost(costmap_2d::Costmap2DROS* cost_map_ros, const tf2::Vector3& world_pos)
    auto cost_map = cost_map_ros->getCostmap();

    int coords[2] = {};
    cost_map->worldToMapEnforceBounds(world_pos.x(), world_pos.y(), coords[0], coords[1]);

    return cost_map->getCost(coords[0], coords[1]) / 255.;

The screenshot of robot being stuck is: image description

The warning msg i'm getting at this time is:

We are stuck: yaw_error=-0.466964, obstacle_dist=-0.350000, obstacle_cost=0.992157, delta_cost_x=2.010893

The source code of neo_local_planner is here.

As i observed after stuck robot is not executing the recovery_behaviour like rotate_recovery. When i list the parameteres of move_base i see the enable_recoverY_behaviour parameter but didn't see which recovery_behaviour is currently set or way to set/change this value. What am i mission?

I am currently testing my robot in gazebo simulator. ROS version: Noetic OS: Ubuntu 20.04

edit retag flag offensive close merge delete