VirtualVEX: Open Source VEX Robotics Competition Simulator

This project has been in development for several months now and we’ve seen it fit to now release an open alpha to the community.

As the title of this post says, VirtualVEX is an open source VEX simulator. It is created using Unity3d (a free game development tool) and is programmed primarily in C# with some JavaScript (technically UnityScript) providing support scripts. It began in May of this year as an independent project and gained official support from Team 254 in late August. The aim of the VirtualVEX project is to provide a free platform which can be used by teams to practice their driving and operating skills when access to their physical robot is either unavailable or inconvenient for whatever reason.

Some of the CURRENT features of this release include:
[LIST]
*]Multiple robot types: right now only clawbot and conveyor belt robot (“ConveyorBot”) are implemented, with work on a vertical intake roller style robot in progress.
*]Programmable: You can change the controls of the virtual robot by downloading your own user code. VirtualVEX is compatible with the ROBOTC API, but user code must be compiled into a DLL which is loaded at runtime.
*]A lightweight IDE, VVDevelop, is also available for download to help with the creation of custom driver control code (since the program can’t interface with the regular ROBOTC IDE).
*]Timed Robot Skills mode: This allows teams to practice for the Robot Skills competition. It features a built-in game timer that disables your robot once 1 minute is up.
*]Automated Scoring: Your score is instantly calculated and updated throughout the simulation. Note that parts of this implementation, namely the doublers/negators, have not been added, but the first score bonus is implemented.
[/LIST]

As has been stated earlier, the program is still in an alpha stage. It is currently usable for general practice, but we hope to add some new features, such as autonomous support or AI opponents. Precedence however is given to adding more basic functions such as match loading.

You can obtain the current release from our website:

https://sites.google.com/site/virtualvex/

Documentation can also be found on the website but it is still under construction. You can also see screeenshots there.

If you do use VirtualVEX, I won’t ask for payment since it’s free, but I do ask that you leave feedback in this thread.

-Jonathan

EDIT: List of known issues, please don’t post these as we know about them…
-Conveyor intake twists when it runs into a goal at high speed. Normally this corrects itself after driving a while
-Keyboard shortcuts for gate raising causes gates to move strangely
-Clawbot intake loose at full height

Wow, very cool. I can’t wait to try it out. I guess that this is an alternative to ROBOTC Virtual Worlds. Any plans to add custom robots sometime in the future? Perhaps user designed CAD models?

It’s not really designed as a competitor to virtual worlds as that is more focused on autonomous and non-competition setting, while this is more focused on driver control in a competition setting. Though I’ll admit the idea is similar.

As far as custom models the ability to load a custom robot at runtime is probably no possible or else extremely difficult in Unity. We are trying to make generic versions of most intake styles. However, since it is open source the option is available to program your own robot into it, and documentation for that is being constructed.

Awesome! I had the idea to make something like this a while back but it appears you have beaten me to it. At present, the controls seem a tad too clunky to be useful for legitimate practice. Driving is great, but I find it somewhat difficult to pick up objects with the claw because of the it’s odd shape. Also, objects seem to glitch into intersecting with one of the other robot’s treads and become stuck. But I see that this is very much a work in progress, and it has great potential.

I have a few suggestions of things you may want to implement later, but I assume you’ve already thought of some of them:
-More feed types, like horizontal rollers and vertical boxes
-More drive train layouts, like holo or h-drive
-More arm types, like 6-bar and vertical lift
-Motor allocation system
-Interchangability, i.e. use the ability to select drive train A, arm type C, and feed type B, etc.
-Networking for realistic matches
-Ability to choose starting location

Seriously, this is cool. And knocking over all of the objects in the beginning is really fun :D. Looking forward to the next build!

Could you specify what you mean by “clunky”? I’d like to get that fixed in the next build if I can.

As far as the other suggestions, many are in fact planned for future releases. The only thing is that because of the way Unity works, having interchangeable systems would entail making separate robots for each combination, unless users were okay with having a holo drive robot that looks like a standard drive robot (the models are the issue here).

The clawbot is flimsy, I realize. There are issues I’m trying to resolve with the physics engine and at this point I think the easiest solution would be to make the lift for that an elevator…

Jonathon,

Congrats on getting to an Alpha release - There is a lot more to these than meets the eye.

I haven’t downloaded the simulator yet; but it sounds similar to the 5th Gear match simulator colleagues and I developed. If you want to chat about some of the growing pains we went through during 4 seasons of FRC simulations (some we solved, some we worked around, some defeated us), or want to run through a list of 5th Gear features to compare against your plans, let me know.

Blake

Just downloaded and tried this simulator and it looks really good to use though I’m not the a driver. Liked the ideas above and a networking system would be great so you could practise with other drivers anywhere.

Don’t know if is possible but I don’t like the ROBOTC virtual Worlds and this would be a lot better to use for autonomous mode in specifics to testing code.

Just a few ideas I had which (might) be possible to implement

  • Possibility to use CAD models to test on the simulator (is it possible to detect parts (i.e. motors)?)
  • Ability to move camera anywhere around the field for better viewing
  • Ability to compile ROBOTC files so current programs can be tested on this simulator

Otherwise very nice simulator and will be very good to use over the next few years. Thanks a lot for developing this

The simulator is really cool from what I can do.

A question:

How do you steer? Do you have to program, or can you free drive?

I have move forward with the “w” key but I just keep spinning in circles.
Help?!

It is kind of hard to drive maybe a better control system instead of using wt and sg… also I was driving around and one of the conveyor bot’s arm fell off…

Also it seems that you can still shove the game pieces through the goals.

Really hard to control :frowning:

It doesn’t have to be a perfectly realistic sim. It certainly doesn’t need to make a profit. Why is there suddenly a need to pay programmers anyway? 254 did a great job on their own. I think some teams could really start to benefit from something like this once it’s a bit farther in development. No sim will ever be as useful as driving a real robot around, but if a team doesn’t have complete access to their robot or a field, or they don’t want to bother charging endless batteries, it’s the next best thing. And if networking is added, it could also help teams who have no one to scrimmage against plan a strategy.

Driving is fine. There are pretty much just the issues you mentioned, i.e. there are bugs picking up objects with the tread bot and the claw is quite difficult to use. But I’m sure these problems are fixable.

IN REPLY TO ALL THOSE WHO COMMENTED ON DRIVING/STEERING:

I’ m sorry, I should have specified this in the OP, but VirtualVEX is optimized for dual-pad joysticks. The most common model is the Logitech Dual Action (“gamepad”), but other models will work, such as the Xbox 360 controller. The reason this is the case is that these are very similar to VEXnet joysticks in layout, and there is currently no PC driver for the real VEXnet joysticks. While the keyboard controls exist as an alternative, I personally find them awkward and believe there is no good way to map the controls onto a keyboard. Joysticks are cheap, I got mine from Fry’s for like 20 apiece. If you only need one joystick I can also upload a single-joystick version of the driver control code to the website, or you can program it yourself if you want.

Hi,
I went to download virtual vex and got a message from my security scan that it conttained a threat to my computer from the setup file. did this happen to anyone else?

This did not happen to me. I have had the software on my computer for 3 days, and no such thing has happened to me.

What exactly did it say?

that there are many indications that this file is untrustworthy and therefore not safe (ws.reputation.1)

Nope I didn’t have anything…

Looks pretty interesting, I’ve never used unity before but I installed it today and downloaded the source so I could try under OSX. I needed to make a minor tweak to the scripts so main.dll could be found and it runs … sort of. I can drive the robot but there are no balls or barrels. Before I spend any time debugging just wanted to check that the source posted is the latest. I know, why would anyone want to run on a Mac anyway :slight_smile:

Some tips. (From my view)

Could you make it keyboard compatible. It is really hard even when you customize the controls.

Add some different robots and make them better. Maybe a Vertical Intake robot, and an AURA design robot. Don’t know if that’s possible, but I think it is…

The claw robot (My favorite) is good at picking up, but it is really hard to score the 30" goal because the claw bends to the side and the barrel falls out.

There should also be a stopping point for the angled intake robot because if you are trying to pick up a game object, it is really hard to get more than one because if you have one, then you pick up another object, the barrel you first picked up gets thrown off the back.

Also, could you make is MAC compatible? Is that possible, like maybe a separate download???

Is there a way to make the pieces you are using, VEX pieces? It would look tight.

Yes, more robots are currently planned. The vertical intake roller robot will show up either the next release or the one after. My priority right now is fixing the clawbot.

As far as keyboard controls, what do you have in mind? As I’ve said, I think it is not easy to create a keyboard setup that everyone will like, but I can try.

The reason there is no stop for the ConveyorBot is that it is based loosely on my team’s design, which outtakes out the back. I can add a hard stop if people want it.

Maybe using the up,down,left,right keys for maneuvering around the field. Not a tank drive set up, but an arcade. It would be so much easier.

Also with the angled intake robot.
If you have an object in the intake and you move a round a lot with jerky movements, then the object flies off the intake (At least is does for me).

Thank you for this awesome program!

For this, if you have Unity you can download the source code, open the project, change the settings to Mac, and build. I do not have a Mac so I couldn’t test this myself, but if someone who has a Mac wants to make a Mac build they can contact me and I can put it on the website.