Exemplo n.º 1
0
 /// <summary>
 /// Makes the robot move from the checkpoint to the specified grab location (A,B)
 /// </summary>
 /// <param name="grabLocationInfo"></param>
 public void GoToGrabLocation(GrabLocationInfo grabLocationInfo)
 {
     using (var motionProxy = _connection.GetProxy <MotionProxy>())
     {
         motionProxy.moveTo(grabLocationInfo.Position.x, grabLocationInfo.Position.y, grabLocationInfo.Position.z);
     }
 }
Exemplo n.º 2
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();
        }
        private void GoToGrabLocation()
        {
            GrabLocationInfo locationInfo = new GrabLocationInfo(Enums.GrabLocation.A);

            this._objectHandlingExecuter.GoToGrabLocation(locationInfo);
        }