Beta8397 / virtual_robot

A 2D robot simulator to help beginners learn Java programming for FTC Robotics
100 stars 171 forks source link

Fix Two issues #64

Closed ZhongxuanWang closed 3 years ago

ZhongxuanWang commented 3 years ago
  1. Random / Systematic errors are mistaken
  2. GUI when placing the robot, the robot would follow the cursor.
jkenney2 commented 3 years ago

Thanks. Dragging feature is nice. In the VirtualRobotController class, the naming of random error and systematic error is somewhat misleading. What "systematic error" means is: "Randomly generate a fractional error separately for each motor now; then apply that same fractional error during each motor update." What "random error" means is: "establish the standard deviation for motor error now; then during each motor update, randomly generate a new error fraction for each motor using that standard deviation." The randomization of "random error" is handled in the "update" method of the DcMotorImpl class. Will merge into a new branch, but keep the motor error handling as-is.

jkenney2 commented 3 years ago

@ZhongxuanWang See above comment.

ZhongxuanWang commented 3 years ago

Thanks. Dragging feature is nice. In the VirtualRobotController class, the naming of random error and systematic error is somewhat misleading. What "systematic error" means is: "Randomly generate a fractional error separately for each motor now; then apply that same fractional error during each motor update." What "random error" means is: "establish the standard deviation for motor error now; then during each motor update, randomly generate a new error fraction for each motor using that standard deviation." The randomization of "random error" is handled in the "update" method of the DcMotorImpl class. Will merge into a new branch, but keep the motor error handling as-is.

Thank you so much for the great explanation! That really motivates me to further contribute to this repo!