Announcement

Collapse

Technology Forum Has Moved!

The FIRST Tech Challenge Technology forum has moved to a new location! Please take a look at our forum blog for links and instructions on how to access the new forum.

The official blog of the FIRST Tech Challenge - a STEM robotics programs for students grades 7-12.


Note that volunteers (except for FTA/WTA/CSA will still access their role specific forum through this site. The blog also outlines how to access the volunteer forums.
See more
See less

Blocks Programs Stripped of Blocks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Blocks Programs Stripped of Blocks

    Well, this is a new one to me… Today after saving a copy of an opmode, adding a few blocks to the copy and saving and reopening at a later time, most of the functions have been stripped of all the blocks with just the function block remaining. Any ideas???

    this is very worrisome. When will we lose all the opmodes? Tonight??? At the competition??? Never??? Soon???


  • #2
    New info: doing a comparison using an enumerated type (the recognition labels) seems to be the culprit. This seems to be the offending code:
    You do not have permission to view this gallery.
    This gallery has 1 photos.

    Comment


    • #3
      After saving and reloading code is stripped. Downloading code and trying to upload gets
      Error: Could not generate code for blocks. TypeError:Unknown Block type:tfod_typedEnum_label

      Comment


      • #4
        Change the Label.Duck Block to a text Block "Duck".

        Comment


        • #5
          Also, before breaking out of that FOR loop, that's a good moment to capture the location info you will want later. Optional to process it there also.

          Comment


          • #6
            I originally tried that. Then I tried that with a cast to lower case. Then I tried that with a strip spaces and a cast to lower case. Didn’t seem to work.

            The really strange part is if you write the code and run it it works fine. Save it and try to reload into the browser to edit and you’re done.

            I don’t think the issue is with the code per say but the browser reading the stored code and translating it back to be editable in the browser. Same with download and upload…

            Originally posted by Westside View Post
            Change the Label.Duck Block to a text Block "Duck".

            Comment


            • #7
              Suggested approach:

              1. Create new OpMode from ConceptTensorFlowObjectDetectionWebcam. Change only the zoom from 2.5 to 1. Turn off timer, touch INIT, open Camera Stream, aim at a Duck with only game tiles in the background, see its Bounding Box, close Camera Stream, touch Start, observe the telemetry.

              2. Close and re-open that OpMode in your browser. Run again. This will validate the TFOD code, and isolate any browser issue.

              3. If all is well, work in small phases to edit that Sample into your Auto logic. At some point you will find the error.

              Comment


              • #8
                Originally posted by MikeRush View Post
                New info: doing a comparison using an enumerated type (the recognition labels) seems to be the culprit. This seems to be the offending code:

                Thank you for narrowing this down. You are correct... if you use the recognition label block (Label.Duck) and then reload your blocks, they won't load properly. This is a bug. Sorry about that.

                If you use a text block "Duck" instead of the Label.Dock block, it should work fine.

                Comment

                Working...
                X
                😀
                🥰
                🤢
                😎
                😡
                👍
                👎