public RobotTwoWheelStateProvider(IRobotTwoWheel robot, IPoseProvider poseProvider)
 {
     this.robot = robot;
     robot.WheelSpeedUpdate += new EventHandler<Magic.Common.TimestampedEventArgs<IRobotTwoWheelStatus>>(robot_WheelSpeedUpdate);
     robot.WheelPositionUpdate += new EventHandler<Magic.Common.TimestampedEventArgs<IRobotTwoWheelStatus>>(robot_WheelPositionUpdate);
     poseProvider.NewPoseAvailable += new EventHandler<NewPoseAvailableEventArgs>(poseProvider_NewPoseAvailable);
 }
Esempio n. 2
0
 public RobotTwoWheelStateProvider(IRobotTwoWheel robot, IPoseProvider poseProvider)
 {
     this.robot                     = robot;
     robot.WheelSpeedUpdate        += new EventHandler <Magic.Common.TimestampedEventArgs <IRobotTwoWheelStatus> >(robot_WheelSpeedUpdate);
     robot.WheelPositionUpdate     += new EventHandler <Magic.Common.TimestampedEventArgs <IRobotTwoWheelStatus> >(robot_WheelPositionUpdate);
     poseProvider.NewPoseAvailable += new EventHandler <NewPoseAvailableEventArgs>(poseProvider_NewPoseAvailable);
 }
Esempio n. 3
0
 public static Pose GetTargetPose(this IPoseProvider poseProvider)
 {
     return(new Pose(poseProvider.GetTargetPosition(),
                     poseProvider.GetTargetRotation()));
 }