how to create a new project PROS3? I just downloaded PROS3 and am trying to follow their clawbot tutorial. But I am stuck on the first step - create a new project. The PROS editor I downloaded has no such thing. I can only create new file, but not new project. Please help!
If everything was installed correctly, you should see the PROS menu at the top:
or go to terminal and type
prosv5 c new-project
Thank you very much! My mistake!
One follow up question. I don’t see any main() function in any of the 3 modules included in a PROS project. How do I just create a simple drive program, compiled/loaded to robot to run? Do I just use the opcontrol() module? But there is no main() function there. We use V5 system.
We came from IQ world using RobotC. Everything is in one place (our code) with header and main function().
VRC is a little intimidating, with competition controller involved. All of sudden, our own code doesn’t seem to control everything.
the initialize() function will be called at the start of the program. opcontrol() will be called after the initialize() function ended. There is also autonomous(), disabled() and competition-initialize() which can only be called using a field switch. to create drive control code, just do a while 1 loop in the opcontol() func
If you haven’t connected the controller to a competition switch or a field controller, you can just put your code inside opcontrol( ). That is the code that it will start running by default.
Thank you all very much!
So for the alliance match part, it seems to make sense. PROS provides the project template that has initialize(), autonomous(), and opcontol() modules. We just need to populate code there in all 3 modules. Field control will call them per tournament manager’s instruction.
Since auto() can only be called from field switch, does that mean we need to have a field switch in order to debug auto() (to call it)?
For robot skill part of the competition, we need a separate 60 sec long autonomous program. Do we need to create a separate PROS project? Then that project will have all 3 modules again. So we start this robot skills project/programs (instead of the alliance match project/programs). The field control will call the 60 sec autonomous program?
Do we need a separate driver program (other than the opcontrol() in the match template)?
I am still confused.
This is exactly right.
Also correct. You need to plug in the competition switch to test auto.
You can make a separate project and do what you said. The other option would be to create an autonomous selector in the initialize() function so before the 60 sec auton period begins, you can select which auton routine to run.
opcontrol stands for operator control, which is the same thing as driver control. You don’t need anything separate.
No. Acctually, you can run auton by pressing your program -> timed run or program->match-> auto skills
If you want, you can call
autonomous(); directly in your code.
You could make it run at the press of a button for example.
That is a very painful and difficult way of managing various autonomous programs.
You can totally have multiple autonomous programs in the same PROS project.
The easiest way to do this is to simply comment out the sections you are not using.
You could also put each routine in a separate function, and call that function in autonomous. Then you could control which one is called.
You could make a switch that reads a variable (either set in the code or from a custom selector) which decides which autonomous to run.