feat: add dock_anchor mating_edge for goals already offset to the docked pose
The charger detector offsets its target to the docked base_link pose (offset_x 0.40 from the V apex), so the charger face is at the robot's rear edge at the goal. dock_anchor=face places the face at the goal itself, so the pivot vertex came out 0.624 m in front of the goal, about 0.40 m more than needed. Robots standing 0.38-0.58 m out had to back off or failed to plan. dock_anchor=mating_edge keeps every face behaviour, except that the on-the-spot pivot clearance is measured from the real face, mating_extent behind the goal: vertex = max(straight_length, circumscribed - mating_extent + pivot_safety_margin). For the KIT robot (0.65 x 0.69) the vertex drops from 0.624 m to 0.4 m. footprint_dock is ignored, as with face. center, face, direct entry and single cusp are unchanged. Test: the 29/10 starts 0.579/0.292 and 0.427/0.155 now pivot directly at 0.4 m; 0.375/-0.149 backs off only to 0.45 m (26 poses against 36 with face).
This commit is contained in:
@@ -85,7 +85,13 @@ bool readDockAnchor(const robot::NodeHandle& nh, DockAnchor& anchor, std::string
|
||||
anchor = DockAnchor::kFace;
|
||||
return true;
|
||||
}
|
||||
error = "parameter 'dock_anchor' must be 'center' or 'face' (got '" + parsed + "')";
|
||||
if (parsed == "mating_edge")
|
||||
{
|
||||
anchor = DockAnchor::kMatingEdge;
|
||||
return true;
|
||||
}
|
||||
error = "parameter 'dock_anchor' must be 'center', 'face' or 'mating_edge' (got '" +
|
||||
parsed + "')";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user