コード例 #1
0
    def open_source(self):

        file_name = QtGui.QFileDialog.getOpenFileName(
            self, 'Open robot source code file...', '.',
            'Python code (*.py);;Shell script (*.sh);;Any file (*)')
        self.status_bar_message('Loading source code from ' + str(file_name) +
                                ' ...')
        try:
            cmd_robot = construct_cmd_robot(str(file_name))
        except Exception as error:
            self.status_bar_message(MSG_EMP +
                                    'Robot source code compiling error: ' +
                                    str(error))
            return -1
        self.simulator_params['robot_controller'] = cmd_robot
        self.status_bar_message('Robot source code loaded from ' +
                                str(file_name))
コード例 #2
0
ファイル: gui.py プロジェクト: ktalik/krakrobot2016-online
    def open_source(self):

        file_name = QtGui.QFileDialog.getOpenFileName(
            self, 'Open robot source code file...', '.',
            'Python code (*.py);;Shell script (*.sh);;Any file (*)'
        )
        self.status_bar_message(
            'Loading source code from ' + str(file_name) + ' ...'
        )
        try:
            cmd_robot = construct_cmd_robot(str(file_name))
        except Exception as error:
            self.status_bar_message(
                MSG_EMP + 'Robot source code compiling error: ' + str(error)
            )
            return -1
        self.simulator_params['robot_controller'] = cmd_robot
        self.status_bar_message(
            'Robot source code loaded from ' + str(file_name)
        )
コード例 #3
0
ファイル: main.py プロジェクト: ktalik/krakrobot2016-online
simulator_params = {
                        # Robot parameters
                        "speed": options.speed,
                        "distance_noise": options.distance_noise,
                        "steering_noise": options.steering_noise,
                        "forward_steering_drift": options.forward_steering_drift,
                        "turning_speed": options.turning_speed,

                        # Simulation parameters
                        "command_line": options.command_line,
                        "execution_cpu_time_limit": options.execution_cpu_time_limit,
                        "simulation_time_limit": options.simulation_time_limit,
                        "frame_dt": options.frame_dt,
                        "iteration_write_frequency": options.iteration_write_frequency,

                        "robot_controller":  construct_cmd_robot(options.robot), #compile_robot(options.robot)[0],
                        "map": options.map,

                        # Krakrobot 2015 task doesn't allow for using GPS or sonar
                        "measurement_noise": 0.,
                        "color_noise": 0.,
                        "sonar_noise": 0.,
                        "gps_delay": 0.,
                    }


def main():
    if options.command_line:
        simulator = KrakrobotSimulator(simulation_dt=0.0, **simulator_params)
        print "Running simulator"
        results = simulator.run()
コード例 #4
0
    "seed": options.seed,
    # Robot parameters
    "speed": options.speed,
    "distance_noise": options.distance_noise,
    "steering_noise": options.steering_noise,
    "forward_steering_drift": options.forward_steering_drift,
    "turning_speed": options.turning_speed,

    # Simulation parameters
    "command_line": options.command_line,
    "execution_cpu_time_limit": options.execution_cpu_time_limit,
    "simulation_time_limit": options.simulation_time_limit,
    "frame_dt": options.frame_dt,
    "iteration_write_frequency": options.iteration_write_frequency,
    "robot_controller":
    construct_cmd_robot(options.robot),  #compile_robot(options.robot)[0],
    "map": options.map,

    # Krakrobot 2015 task doesn't allow for using GPS or sonar
    "measurement_noise": 0.,
    "color_noise": 0.,
    "sonar_noise": 0.,
    "gps_delay": 0.,
}

sim_gui = None


def main():
    global sim_gui
    if options.command_line: