Virtual way to test code?

Hi, So I was wondering if there was any type of website, app, or program where I could test my code with an autonomous selector. Or maybe test if certain tasks a robot would do would work. My reason being is because for a about 2 months of robotics practice I won’t be able to be there and would like to get better at coding. And having something virtual for now would be a big help. And I already know what vex code vr but I use text. Sorry if there is already another topic on this but if someone could help this would be great.

3 Likes

You could try RobotMesh Mimic. I haven’t actually tried it in depth myself but I have heard that’s it’s good.

1 Like

Well. At the beginning of the season I did make a robot design with that because at the time I didn’t know what cad was and I also tried to use the code part but could never figure that out. So I think for what I want wouldn’t work. For example I would want to test an auto index feature and I have never used sensors before which they don’t have in the website.

there isn’t really a good way to test your code without your robot. best you can do is make the program and comment it well so you can alter it if necessary when you get the opportunity to test it.

2 Likes

If you know lua, I have created a game that mimics robot odometry and movement on Roblox. I may figure figure something out for that in the future if youd like :slight_smile:

2 Likes

While that sounds really cool. I probably won’t be able to use it for a while. I haven’t even learned how to use pid or anything yet. I think I looked at your turtorial before but didn’t understand it that well. I might try it soon again but odometry is way to advanced for me right now.

Oh, I didn’t read your comment properly. Yes that would be really cool if you could do something like that. Roblox is an interesting place to create something like that but that could be really helpful for people if something like this ever happens again.

You can create a javascript simulation to demonstrate what your code should do in a visual manner. I believe @theol0403 is familiar with this

1 Like

I think it may be possible to code in C++ since Roblox is coded in C++, but it depends on the restrictions from lua emulated from Roblox Studio:

RMS Mimic is very good at this. I’d take a look at that before trying any harder alternatives.

4 Likes

I’ve spent about 90% of my time programming for VEX away from the robot.

This is because I mostly work on higher level algorithms and such, which aren’t necessarily specific to a VEX robot. This means I can run and test the code on my computer, and then I only need to test on the robot once it is complete.

For example, I used a canvas drawing API (you can use any, I used js canvas) to work on my pure pursuit path following algorithm:

Then, when it was time to write it for the robot, I just had to copy and paste already tested code.

These days, I’m working on code to generate trajectories, and for that I use python’s matplotlib to generate graph visualizations of the program.

However, your question was about testing an autonomous selector. If you use VEXCode, you can use RMS mimic to simulate the screen. If you use PROS & LVGL, you can run your LVGL selection code on any device including your computer:

You also said you just wanted to become better at coding - in that case, your best option is to actually drop VEX altogether and learn c++ properly from https://learncpp.com . Then, when you do have access to your robot, you will spend less time trying to figure out errors and more time writing the code you want.

Unfortunately, there aren’t really any “simulation” platforms out there except for RMS mimic, and in reality they aren’t that good for learning to program. In the off season, it is always best to get a solid understanding of fundamentals to support you for the rest of the competition season.

Hope this makes sense!

23 Likes

How do I use RMS to simulate the screen? I don’t really know how RMS works in the first place

Not sure, hopefully someone else can help you with that. I’ve never used RMS. It should be something along the lines of going to https://www.robotmesh.com/studio/ , making a mimic project, and then doing something to simulate the display.

2 Likes

Yah i tried going through projects and stuff to figure it out and I have no clue what to do. Thanks for the help though