Exemplo n.º 1
0
    def __init__(self, target_speed=40, **kwargs):
        super().__init__(**kwargs)
        self.logger = logging.getLogger("PID Agent")
        self.route_file_path = Path(self.agent_settings.waypoint_file_path)
        self.pid_controller = VehiclePIDController(
            agent=self,
            args_lateral=PIDParam.default_lateral_param(),
            args_longitudinal=PIDParam.default_longitudinal_param(),
            target_speed=target_speed)
        self.mission_planner = WaypointFollowingMissionPlanner(agent=self)
        # initiated right after mission plan

        self.behavior_planner = BehaviorPlanner(agent=self)
        self.local_planner = SimpleWaypointFollowingLocalPlanner(
            agent=self,
            controller=self.pid_controller,
            mission_planner=self.mission_planner,
            behavior_planner=self.behavior_planner,
            closeness_threshold=1)
        self.visualizer = Visualizer(agent=self)

        self.occupancy_grid_map = OccupancyGridMap(absolute_maximum_map_size=800)

        self.logger.debug(
            f"Waypoint Following Agent Initiated. Reading f"
            f"rom {self.route_file_path.as_posix()}")
        self.curr_max_err = 0
        self.counter = 0
        self.total_err = 0
 def __init__(self, **kwargs):
     super(PointCloudMapRecordingAgent, self).__init__(**kwargs)
     self.logger.debug("GPD2 Agent Initialized")
     self.route_file_path = Path(self.agent_settings.waypoint_file_path)
     self.mission_planner = WaypointFollowingMissionPlanner(agent=self)
     # initiated right after mission plan
     self.controller = \
         self.pid_controller = VehiclePIDController(agent=self,
                                                    args_lateral=PIDParam.default_lateral_param(),
                                                    args_longitudinal=PIDParam.default_longitudinal_param(),
                                                    target_speed=20)
     self.behavior_planner = BehaviorPlanner(agent=self)
     self.local_planner = SimpleWaypointFollowingLocalPlanner(
         agent=self,
         controller=self.controller,
         mission_planner=self.mission_planner,
         behavior_planner=self.behavior_planner,
         closeness_threshold=1)
     self.ground_plane_point_cloud_detector = GroundPlanePointCloudDetector(
         agent=self,
         max_points_to_convert=20000,
         ground_tilt_threshhold=0.05)
     self.visualizer = Visualizer(agent=self)
     self.map_history: List[MapEntry] = []
     self.file_written = False
Exemplo n.º 3
0
 def __init__(self, vehicle: Vehicle, agent_settings: AgentConfig,
              **kwargs):
     super().__init__(vehicle, agent_settings, **kwargs)
     self.controller = VehiclePIDController(
         agent=self,
         args_lateral=PIDParam.default_lateral_param(),
         args_longitudinal=PIDParam.default_longitudinal_param())
     self.floodfill_lane_detector = FloodfillLaneDetector(agent=self)