private async void Sim_HasStarted(object sender, EventArgs e) { //sync hardware arm with simulator var comm = new EmulatorCommunication(_calSim.SimArm, null); var simArm = new Arm(comm, comm.Arm.Settings.Values.ActiveServos.GetValueOrDefault(5)); await simArm.LoadSettingsAsync(); //load setting App.Instance.Arm.Behaviors.Add(new SyncronizeCommands(simArm) { SuppressSync = true }); }
private async void Sim_HasStarted(object sender, EventArgs e) { //create simulated arm; var arm = App.Instance.Arm; var comm = new EmulatorCommunication(_motionSim.SimArm, null, arm.Settings); //use real robots current settings var simArm = new Arm(comm, comm.Arm.Settings.Values.ActiveServos.GetValueOrDefault(5)); await simArm.LoadSettingsAsync(); //load setting //sync arm with simulator arm.Behaviors.Add(new SyncronizeWithSimulator(simArm)); //setup IK in simulator _ikSim = new IKSim(_motionSim.TransformGimbal, _motionSim.SimArm, new KinematicsUI(arm)); }