public RobotControllerForm(Block <Vector3>[] points) { InitializeComponent(); _points = points; _contoller = new RobotContoller(InverseKinematicsComputer.ComputeLengths(points).ToArray(), new IPEndPoint(IPAddress.Parse("192.168.250.1"), 9600)); _contoller.Log += ContollerOnLog; _contoller.ValuesUpdated += ContollerOnValuesUpdated; _contoller.StateUpdated += Contoller_StateUpdated; UpdateRuntimeParametersLabel(); //RenderPoints(); }
public RobotContoller(Block <Vector4>[] cableLengths, IPEndPoint remoteEndPoint) { _trajectory = InverseKinematicsComputer.ComputeAnglesFromLengths(cableLengths).ToArray(); _commandCounter = 0; _blockCounter = 0; CommandCount = _trajectory.Select(_ => _.Elements.Length).Sum(); _angleSender = new AngleSender(remoteEndPoint, UpdateInterval); _angleSender.ProgressUpdated += AngleSenderOnProgressUpdated; _pauseEvent = new ManualResetEvent(true); File.WriteAllText("angles.txt", ExportAngles()); }
public static IEnumerable <Block <Vector4> > CodeToLengths(string code) => InverseKinematicsComputer.ComputeLengths( CoordinateComputer.ComputePoints( CrcParser.ParseCommands(code) ) );
/// <summary> /// Constructs code processing conveyor and executes it /// </summary> public static IEnumerable <Block <Angles> > CodeToAngles(string code) => InverseKinematicsComputer.ComputeAngles( CoordinateComputer.ComputePoints( CrcParser.ParseCommands(code) ) );