rayvburn / humap_local_planner

Human-aware robot trajectory planner using a hybrid trajectory candidates generation and spatiotemporal cost functions
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

weight the `map_grid` cost functions near the goal pose #102

Closed rayvburn closed 1 year ago

rayvburn commented 1 year ago

MapGridCostFunction scores trajectories using the following pattern:

  for (unsigned int i = 0; i < traj.getPointsSize(); ++i) {
    traj.getPoint(i, px, py, pth);

    // translate point forward if specified
    if (xshift_ != 0.0) {
      px = px + xshift_ * cos(pth);
      py = py + xshift_ * sin(pth);
    }
    // translate point sideways if specified
    if (yshift_ != 0.0) {
      px = px + yshift_ * cos(pth + M_PI_2);
      py = py + yshift_ * sin(pth + M_PI_2);
    }

which translated each point of the trajectory according to the "shifts" specified. This can be problematic when approaching a goal near in front of the obstacle. Consider weighting those cost functions near the goal (N meters from the goal pose).

rayvburn commented 1 year ago

In fact, the X shift should be the set according to the radius of the mobile base.

rayvburn commented 1 year ago

Implemented the solution as in dwa_local_planner