Boost Error + Customize a Playground?

Good morning,
My students have completed the Disc Mover activities in unit 8 and I’m creating a bridge activity so that the students can complete the Castle Color Match challenge. I created my own code but ran into 2 issues for which I made a video of each so it can be better understood:

  1. In the disc mover playground, with my own challenge, when I pick up my first blue disc, it works but if I hit the restart button to re-run the code, the robot will not pick up the disc. I have to close out of the playground and click the start triangle button again to relaunch the playground. This works. I don’t think it’s my code since it works when I close and re-open the playground. Here’s the video to show it. Have you heard of that happening before?

  2. In the same code, any other disc I try to pick up after that first blue disc that I pick up and drop off, will not be picked up. Here’s that video. Is there another code besides the BOOST and DROP commands that need to be incorporated?

  3. Is there a way for me to customize a playground? I want to add a wall to the disc mover playground to incorporate more of the while loops.

Thanks so much in advance for your time.
Michelle

Looking at the videos, it looks like for that first run with the first blue disc, you have the electromagnet directly over the disc, but every other time, it the magnet has already passed the disc.

Can you please share your project with me so that I can try to reproduce the issue? Once I can see the issue locally, I can either confirm that there is a bug with that VR Playground or explain what is happening so that you will be able to solve the issue and continue with your project.

Thanks Jacob.
I have attached the file. I used the while loop to detect each disc to make sure I didn’t drive over it before the BOOST. Is the electromagnet not over the disc when I do that? I thought it was since it did pick up the blue. Hmmm. Thank you for looking at the issue and I apologize in advance if it’s my coding!
Michelle

Disc Mover BRIDGE to Castle COlor Match (1).vrpython (3.6 KB)

So the update rate of sensors is an issue with both the VR Playgrounds and physical robots and things other than robotics. In this case the reason you are moving past the disc is because the robot is moving at full speed, but can only update the sensor values so fast. At that speed it is very easy for the sensor to first report that it detects the disc after it has already move to far for the electromagnet to pickup the disc.

One way to think about this is that you are walking/running/driving and you can only see a snapshot of the world every second. If you are walking, you are moving much slower and the distance traveled in that second before you get the next snapshot is shorter than if you are running and much shorter than if you are driving. This distance traveled between updates changes based on the speed of travel and the rate of “sensor” updates. So by slowing does, you reduce the distance traveled between “updates” and thus are less likely to miss something and go to far.

By changing the robot drive speed to 50% for the moves using the sensor, I found that it works every time.

We will take a look at what we can do to make the detection more reliable at higher speeds, but for now, I would recommend that you slow down to 50% for the moves when you are trying to find the discs.

Will do. Thank you very much Jacob.
I assume it is not currently possible to customize a playground but if I could put in an enhancement request, being able to add things like walls or discs to a playground would be great.
Again, thank you for your help! It is much appreciated.
Michelle

Hi @Michelle_Sherry! Some of the VR Playgrounds do have some customizable features, like the Wall Maze+ Playground.
Screenshot 2023-11-07 at 9.57.37 AM

@Audra_Selkowitz talks about how the flexibility of VEXcode VR Playgrounds supports differentiation for students of varying coding levels in this Lesson of the Making the Most of Teaching with VEXcode VR VEX Masterclass :smiley:

1 Like