

This interrupt is used for time keeping and for running all the periodic tasks of the system." So every 1ms your program stops while the NXT drivers talk to sensors and motors. According to Sivan Toledo, "he Interval Timer of the AT91SAM7S256 is used to generate an interrupt every 1 ms. The nxtOSEK project reports their test program achieves a maximum speed of 1,864,000 loop iterations per minute.īut at any rate, I'd bet peripheral pooling, not processing speed, will be you main speed limiting factor.

How this translates to actual speed again depends on whether RobotC programs run natively or on top of the VM. In other words, RXE programs have a 32KB limit for data structures, but bytecode instructions are not included in this total – they are executed directly from Flash memory, which has a size of 256KB (minus the size of the NXT VM – unfortunately I couldn't find a number for this).Īs for processing speed, the NXT HDK says the main processor runs at 48MHz. The bytecodes never change at run-time, so these bytecodes remain entirely in flash memory."
Robotc tasks code#
The code space is an example of a non-volatile sub-component. (.) Non-volatile sub-components remain in the file, which the VM can refer to at any time during program execution. RXE file specifies the layout and default content of this pool. RXE file format from flash memory and initializes a 32KB pool of RAM reserved for use by user programs. If however your program runs on top of the NXT VM, the Executable File Specification says that "hen the VM runs a program, it reads the encoded Of course in this case your program will also have to include drivers to control robot sensors, motors and so on. That is the amount of memory available for bare metal programming, that is if you load a native program into the brick, bypassing the original firmware. Also I couldn't find information on how RobotC works on NXT – if it loads native code straight to memory or generates RXE files to run on the NXT VM – so I'll cover both scenarios.Īccording to the NXT Hardware Developer Kit, the NXT brick's main processor is connected to 64KB RAM. Just to be clear, my answers assume you are asking about NXT, not the more recent EV3. I'd love some feedback and answers to my question if anyone has any.

The fact that I'm working with a square layout will allow me to use a 2D array for the map needed to reconstruct the path. Instead of a set, I'll probably use a boolean array for the set of nodes visited. Roughly 8 paths would be cached if I decide to use the pre-cached lookup tables. I plan to have a 64圆4 grid and be running Djisktra's A* algorithm with a heuristic function that assigns a penalty to turns and is as close to consistent as possible (not sure if consistency/monotonicity is doable with the turn penalty). My major interest at this point with these questions is for pathfinding.
Robotc tasks generator#
I'm writing a C code generator geared toward RobotC and complex tasks for an FTC team, and was wondering about some performance and storage concerns:
