Ejemplo n.º 1
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="ip">The robot ip</param>
        /// <param name="port">The robot port</param>
        /// <param name="markInfo">The checkpoint's mark information</param>
        /// <param name="grabLocation">The grab location information</param>
        /// <param name="logger">The logger</param>
        public NaoCoopRobot(string ip, int port, WalkToLandMarkInfo markInfo, GrabLocationInfo grabLocation, ILog logger)
        {
            this._logger           = logger;
            this._connection       = new NaoConnectionHelper(ip, port);
            this._markInfo         = markInfo;
            this._grabLocationInfo = grabLocation;

            /*
             * if (this._connection == null || !this._connection.TestConnection())
             * {
             *  throw new Exception("Could not connect to the Robot.");
             * }
             */
            this._objectHandlingExecuter = new ObjectHandlingExecuter(_connection);
            this._robotSynch             = new RobotSynchronization(_connection);
            this.Initialize();
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="connection">Connection object</param>
 public NaoCoopCommandExecutionEngine(NaoConnectionHelper connection)
 {
     this._connection             = connection;
     this._robotSynch             = new RobotSynchronization(connection);
     this._objectHandlingExecuter = new ObjectHandlingExecuter(connection);
 }