VCS Modkit support for Field Control/Competition Switch

  1. 4 months ago

    Paul Meyers

    Sep 4 Indianapolis, Indiana 6210

    There doesn't seem to be a way for VCS Modkit to be used with the Field Control System or Competition Switch. Does that mean that VCS Modkit can not be used for Competition VRC Robots?

    Support for competition control is partially implemented but not finished yet. Modkit uses an event driven approach to programming, the competition control will use "When" blocks that trigger for autonomous and driver control periods, you can see an example in the screenshot below. Although we can trigger these events, the program cannot yet be interrupted when the robot is disabled, that should hopefully be finished for the October update of VCS. If the autonomous code is simple, then you can use these events by creating them using the "text" entry method of programming Modkit and adding code as necessary, however, make sure any code added to the autonomous event finishes before the driver control period.

    be sure to enable competition using the checkbox in project settings.

    [attachment:5b8f40b309503]

  2. jpearman

    Sep 5 Moderator, ROBOTC Tech Support, V5 Beta Moderator Answer Los Angeles 8888
    Edited 4 months ago by jpearman

    Support for competition control is partially implemented but not finished yet. Modkit uses an event driven approach to programming, the competition control will use "When" blocks that trigger for autonomous and driver control periods, you can see an example in the screenshot below. Although we can trigger these events, the program cannot yet be interrupted when the robot is disabled, that should hopefully be finished for the October update of VCS. If the autonomous code is simple, then you can use these events by creating them using the "text" entry method of programming Modkit and adding code as necessary, however, make sure any code added to the autonomous event finishes before the driver control period.

    be sure to enable competition using the checkbox in project settings.

    modkit_comp.png

  3. 2 months ago

    tanigross

    Nov 10 61300A

    @jpearman Support for competition control is partially implemented but not finished yet. Modkit uses an event driven approach to programming, the competition control will use "When" blocks that trigger for autonomous and driver control periods, you can see an example in the screenshot below. Although we can trigger these events, the program cannot yet be interrupted when the robot is disabled, that should hopefully be finished for the October update of VCS. If the autonomous code is simple, then you can use these events by creating them using the "text" entry method of programming Modkit and adding code as necessary, however, make sure any code added to the autonomous event finishes before the driver control period.

    be sure to enable competition using the checkbox in project settings.

    [attachment:5b8f40b309503]

    I don't see the option competition.started or ocmpetition.autonmous and does that mean I can't run the code if I just run it regularly?

  4. tanigross

    Nov 11 61300A

    help...? Comp tomorrow

  5. last week

    I can not find the autonomous or driver control dropdown either. Please advise

    VCS competition problem.jpg

  6. OscarMNOVA12

    Jan 9 Event Partner, V5 Beta Tester Northern VA and Pittsburgh MASON, 12, 22172

    It's still not implemented for VCS Modkit. RobotMesh Blockly is a good alternative and has a lot of support, documentation and examples.

  7. jpearman

    Jan 9 Moderator, ROBOTC Tech Support, V5 Beta Moderator Los Angeles 8888

    ok, so as I said back in September

    Support for competition control is partially implemented but not finished yet.

    and as there has been no update to VCS, Modkit still does not support competition control. The above example I showed is a workaround that will work *with very simple code*, either you have no autonomous (in which case you don't need a competition template anyway, just use when(STARTED) ) or a very simple autonomous that perhaps just drives forward for a few seconds. If the autonomous is any more complicated than that, then VCS Modkit should not be used for competition.

    The issue is that the initial support has no way to interrupt/stop a "when" statement part of the way through. If the robot is disabled and, for example, a loop is running then it will not be stopped. This has all been addressed in the next version of the SDK (the development kit that VCS uses to run a program on the brain) but we cannot release that until VCS is itself updated.

    I am attaching an example that shows what can be done, but my real advise is do not try and use Modkit for a competition robot, switch to VEX C++.

    The Competition.STARTED_AUTONOMOUS and Competition.STARTED_DRIVER_CONTROL events do not appear in any drop down menus, you have to add those using the text tab if you start with a new project. The competition checkbox should be enabled in project settings.

    mod_comp.png

  8. jpearman

    Jan 9 Moderator, ROBOTC Tech Support, V5 Beta Moderator Los Angeles 8888

    in addition to this.
    when going to a match, make sure to plug into the field control cable before launching the code. If the driver control code runs for any length of time before the autonomous period of the match, the autonomous code will probably not function correctly.

 

or Sign Up to reply!