Example #1
0
 public async Task GoToPoseAsync(float x, float y, float angle, MotionSettings motionSettings = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     var motion = Map <PathMotionProfile>(motionSettings ?? DefaultMotionSettings);
     var result = await Client.GoToPoseAsync(new GoToPoseRequest()
     {
         IdTag = GetActionTagID(), XMm = x, YMm = y, Rad = angle, MotionProf = motion
     }, cancellationToken : cancellationToken);
 }
Example #2
0
        public async Task <bool> DockWithCubeAsync(MotionSettings motionSettings = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            //get last visible cube id
            var cubeID = _robot.World.ObservedCube.ObjectId;

            var motion = Map <PathMotionProfile>(motionSettings ?? DefaultMotionSettings);
            var result = await Client.DockWithCubeAsync(new DockWithCubeRequest()
            {
                IdTag = GetActionTagID(), ObjectId = cubeID, MotionProf = motion
            }, cancellationToken : cancellationToken);

            return(result.Result.Code == ActionResult.Types.ActionResultCode.ActionResultSuccess);
        }