Can you upload self-made code to Robot Virtual Worlds?

Hello, my teacher is trying to have students write their own code to use for the different robot presets in the Turning Point Virtual World, for Robot Virtual Worlds. Is there any way to upload your own created code to be used by the different robots because I cannot seem to be able to do so for either the autonomous or driver control. Also, is it possible to hook up a joystick to be used in virtual worlds alongside self-created code?

Thanks in advance for your help!

Yes, there is.
When you are on your RobotC (I assume you’re using that) file, click on Robot>Compiler Target>Virtual Worlds. That will automatically open the TP Virtual World (VW) and “upload” the code to the robot when you click “Download to Robot”. When the window pops up, it should let you select which robot you are using, and the skills run you’re doing. If you want to do a joystick-controlled Driver Skills run, I think you will plug your joystick into the computer via orange USB cable before you run it, but I haven’t tried to do that before.

Note: Your code should NOT be in a Competition Template. Just make your code in the stock “task main” format. You should also go to your “Motors and Sensors Setup” and select the robot preset you want to use (it’s the far-left tab along the top); it must match the robot you’re using in VW.

Hope that helps!

Hi RoboMadeline,

There are a few things that you will need to make sure you do in order to program the robots in Turning Point.

1) ROBOTC Menu Settings: Make sure that your platform type is set to VEX 2.0 Cortex. (Robot → Platform Type → VEX Robotics → VEX 2.0 Cortex) and make sure your compiler target is set to Virtual Worlds. (Robot → Compiler Target → Virtual Worlds).

2) World Selection: Make sure that your target world is set to VEX Turning Point. (Window → Select Virtual World to Use → VEX Turning Point)

3) Robot Configuration: Now it is time to set up your program. Open a new file. Once open select Motor and Sensor Setup. In the standard models tab, select your robot’s configuration. Turning point has three robots that you can pick from, RVW Fantasticbot, RVW Fantastilaunch, and RVW Launchbot. https://i.imgur.com/jxrx7ic.png

After you select your robot, Click Apply then ‘OK.’ Now you can start programming your robot. If you need to know what motor and sensors names are, you can refer back to the Motor and Sensors setup page. Navigate through the tabs to see your robot’s configuration.

4) Downloading the program: Once you are happy with your program, click the download to robot button. This will download your code to the virtual world and open up the virtual world. After you log in or continue as guest, you will see the main menu of Turning Point. This is where you can select your robot, game mode, and starting position. Make sure that you select the robot you previously configured in ROBOTC in step 3. Once you have everything set up, press start and your virtual robot will spawn on the field. At this point, you can run your program, or go back to ROBOTC and add to your program. Whenever you download the program again, it will be automatically loaded on the virtual robot.

You are able to use a controller with RVW; however, the VEXnet Joystick will not work for RVW. You will need to buy another third party controller. I prefer the Logitech Gamepad F310 which is around $15. Once you have a joystick, you can follow along with this short video to get it configured. ROBOTC Joystick Configuration - YouTube

After getting it set up, you can open one of our sample programs for the Turning Point Robots. In ROBOTC navigate to File → Open Sample Program. Once here navigate to the Turning Point folder. Here you can find sample programs for all of the robots. These programs contain the remote control code which will allow you to use a controller to control the robot.

If I did not answer your questions, or if you are still having trouble please send me some screenshots or even your code that you are trying to download to the virtual robot. This will allow me to see exactly where the issue is.

Thanks!
Lee