External libraries in VEXcode V5 with python

Hi everyone, I have been working on programming my team’s robot for the new High Stakes competition. I am trying to use math such as cos, sin, or atan2. But unfortunately, these functions are only available in the math python library. Will importing math into my VEXcode program work, and if so, is it legal?

Welcome to the VEXForum Community!

  1. Will importing math into my VEXcode program work?

Yes, I’ve used the math, random, and time packages plenty of times (I haven’t used random as much as the rest).

  1. Is it legal?

Firstly, Inspectors don’t inspect your code, so anything in there is most likely legal (remind me if there are any illegal things for the code, viewers).

Secondly, This is not stated at all in the Game Manual, and doesn’t violate common sense, therefore you are probably allowed to do this.


Remember, the Game Manual always has the final say. If something isn’t written, then it is likely legal. This includes Common Sense.

5 Likes

Generally the consensus behind library use is that it’s legal provided you’re able to prove that you have the knowledge to understand it. Of course, this is a pretty loose rule and doesn’t apply to things like the standard library and supporting runtime (I doubt most people competing could roll their own libm :sweat_smile:). It’s mainly intended for controls libraries like ez-template, LemLib and VOSS that have the potential to give competitive advantage.

5 Likes

Replying to just 100% finish any other question related

These are the built-in libraries you can access: (time, math, system, typing)
Screenshot 2024-06-11 at 1.01.31 PM

There are some ways to get other small libraries shown here: How do I download modules to the brain?

2 Likes

full list of frozen libraries (micropython libraries from version 1.13)

random - generate random numbers
time - time related functions
binascii - binary/ASCII conversions
re - simple regular expressions
asyncio - asynchronous I/O scheduler
json - JSON encoding and decoding

3 Likes