I find your use of the Chrome driver as an execution medium pretty neat! Mine works... usually. An occasional failure just to let people put their training to the test.
I’m imagining an astronaut floating off into the void saying, “The docking algorithm doesn’t always work, but we knew the risks. Thanks for trying! Please tell my spouse that I’m sorry that I forgot to take out the trash.”
If you would like to try writing an Autopilot bot yourself, I've made a script that adds a text editor to the page and hooks it into the simulation. You can then implement a control function that on each frame receives the current position and velocity, and returns movement commands that the spacecraft will execute:
This autopilot doesn't use the rotation and translation rates as input, just the momentary values. It also uses the same control function for all axes.
Given that the docking simulator is blissfully oblivious about real-life orbital dynamics and attitude control problems, you are playing the simulator right.
One tip - I noticed that you use XPath selector and send click events, however you can simply send keyboard events to the browser. But overall I like that the solution is quite similar! One thing is - might be worth merging the Axis modules into one and make it parametrised.
You should use requestAnimationFrame and inspect the timestamps passed to the callbacks to check how much time has elapsed (a setInterval of 1 second may not run every 1 second, so I would not feel safe!)
16 comments
[ 4.3 ms ] story [ 41.4 ms ] threadCode: https://gist.github.com/inariakagane/58a65db8c9d629b00d55621...
Video in action: https://www.youtube.com/watch?v=e-QTZWGFVc8
I find your use of the Chrome driver as an execution medium pretty neat! Mine works... usually. An occasional failure just to let people put their training to the test.
Code: https://gist.github.com/ggerganov/092b86a59fa34926998953701a...
Video: https://youtu.be/jWQQH2_UGLw
https://github.com/andrey-leshenko/ISSDockingBotGame
This autopilot doesn't use the rotation and translation rates as input, just the momentary values. It also uses the same control function for all axes.
Video: https://youtu.be/jLTr6UwuSd4
Am I playing it wrong?
For more verisimilitude, use Orbiter.
One tip - I noticed that you use XPath selector and send click events, however you can simply send keyboard events to the browser. But overall I like that the solution is quite similar! One thing is - might be worth merging the Axis modules into one and make it parametrised.
https://gist.github.com/xaedes/de252d992dab0ca9c38867197f38f...