Preserve native command ownership for a moving direction hint
This commit is contained in:
@@ -209,11 +209,16 @@ class RoutedMission(WaypointMission):
|
||||
def orientation_target(self):
|
||||
if self.route_target is None or self.route_failure or self.fault:
|
||||
return None
|
||||
return {
|
||||
target = {
|
||||
"key": self.orientation_key(f"route-{self.index}-{self.segment_index}"
|
||||
+ (f"-revision-{self.route_revision}" if self.route_revision else "")),
|
||||
"xy": list(self.route_target),
|
||||
}
|
||||
if self.advisory_joint():
|
||||
segment = self.leg["segments"][self.segment_index]
|
||||
direction = np.asarray(segment["end_xy"]) - segment["start_xy"]
|
||||
target["direction_xy"] = (direction / np.linalg.norm(direction)).tolist()
|
||||
return target
|
||||
|
||||
def observe_maneuver(self, maneuver, pose, seconds):
|
||||
"""A bound observed local placement earns time, never a route receipt."""
|
||||
|
||||
Reference in New Issue
Block a user