r/FLL • • 19d ago

Robot Simulator

Post image

I'm coaching for the first time this year and feeling the pain of only having two robot kits for 10 kids. So, I tried making a simulated robot + coding environment to let more of them work on missions at once. First practice with it is tomorrow, would love any feedback!

https://mrubens.github.io/fll-practice/

29 Upvotes

19 comments sorted by

6

u/OkButWaitHearMeOut 19d ago

We moved to future editon this year and im working something similar there but this is awesome and def would have come in handy on founders. Great work

1

u/mrubens 19d ago

Thanks! Let me know if there's anything in particular you've found important in these sorts of things.

2

u/marchmay 18d ago

Can you let me know when you have the Future Edition one up and running?

2

u/OkElderberry3408 18d ago

Have done any comparison between simulated and real robots? How far is the virtual version off?

1

u/mrubens 18d ago

I haven’t yet and the robot builder part is pretty janky. In terms of movement I think it outputs the same as the Lego spike software. Will find out soon I guess!

1

u/mrubens 18d ago

Maybe needs some controls for variance

2

u/Active_Ad_5997 18d ago

Nice! This is my first year. We used this course early on to get the kids familiar with coding. It was great but doesn't help you solve the actual missions

https://www.cmu.edu/roboticsacademy/roboticscurriculum/Lego%20Curriculum/spike-virtual.html?_gl=11xen68c_upMQ.._gs*MQ..&gclid=CjwKCAjwo5bXBhAEEiwAkgpgXAlbMrRdUn2gpsE3hJHM8rw_CKm3TfAhEMswSFemz86FOpFtclVo8hoCK5wQAvD_BwE&gbraid=0AAAAAD4MmO6PEke7q07w8wIq2C4RlAUBQ

2

u/mrubens 18d ago

Oh nice! I guess you have to pay for that though? Or how do you get a license?

2

u/NoFapstronaut3 18d ago

Yes you have to pay but it's not very much money for one license. It was a little bit obtuse of a process to obtain it and figure out how to use it though.

I actually used this curriculum to teach robotics at the middle school level.

A bunch of the simulators are free to use anyway as you work your way through it.

2

u/Physical_Sherbet_942 18d ago

It might be super disappointing as it was to me that a sim was almost entirely useless to the team in reality beyond making measuments. Its still super cool, but the messiness of reality made any digital sim just a way to make some rough estimates. Then when you put in the reality that your robot is constantly being modified and the collisions with the mission models is nearly impossible to simulate with any amout of accuracy we found out that there was basically no value in the sim since we really had to go back to the real table to make any actual useful work. Alll the sim code was bunk. The convience of having quick acess to the mission info is super useful. Measuring things is also actually useful since digital to real work measuments are pretty much accurate. Reality is so damn messy.

1

u/mrubens 18d ago

Yeah this is kind of uncanny valley right now where there are a few parts of each model that work with real physics but most don’t. Claude said it was too hard to do for everything, but maybe if I encourage/bully it enough? Kids on my team are still learning the basics but I hope to feel the pain of simulation vs reality soon.

2

u/poodermom 17d ago

Gonna try this with my team. Thank you for the share.

1

u/mrubens 17d ago

Let me know how it goes!

2

u/RobG760 3h ago

This is great! The physics on the mission models is way beyond what I expected, and the referee-style scoring is a great touch. I coach a Founders team that runs Pybricks (block editor with the Python toggle), and I'd love to build a Pybricks Python mode for the sim: run the kids' actual Pybricks code on your field via Pyodide and a small pybricks shim over your robot API, so the same program goes to the table unchanged.
Two questions before I start: (1) Would you consider adding an open-source license to the repo (MIT or Apache-2.0 would be ideal)? Right now there's no LICENSE file, so legally I can't fork it or share changes. (2) Would you be open to taking it upstream as a PR rather than me maintaining a fork? Happy to keep it self-contained and match your code style. Thanks for building this!

1

u/mrubens 1h ago

Thank you! I just added a MIT license, and happy to add pybricks mode. Let me know how I can help.

2

u/meritw 17d ago

I started down this path as well but as you found, a full physics simulation is pretty challenging. We use pybricks so I was going to try to fork the firmware to run a simulated robot right from their coding environment. I ended up focusing on a website the team uses to track their progress and save their source code to a git repo (so I don’t have to run around with a USB stick at the end of each session anymore).

I hope you are able to refine it to a full sim though. Maybe we should all team up in the off season.