LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Documentation on how to decode the RBT binary file format

Looking to write a simple NXT robot simulator for FLL. I have binary file reading/writing experience, but need to know how the data structures are defined for NXT 2.0. Any clues out there?

 

thanks

0 Kudos
Message 1 of 10
(7,985 Views)

Hi Kevin, 

 

Can you give us some more details about this simulator? Are you trying to make a simulator that tests programs before they are downloaded to the NXT? Are you using LabVIEW or LegoMINDSTORMS? 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 2 of 10
(7,970 Views)

The simulator would ideally take a file saved in the mindstorms nxt 2.0 tool and read it to determine motor and senor actions. Given this i would like to approximate the location of the robot on an image of the FLL playing field. This would of course require some calibration to know how how much distance is traveled for a given robot design. The goal is to enable the kids to see a 2D picture of the playing field and determine approximately whether the robot is going where it's intended. I find that my younger team is spending a lot of time testing their program on the real robot which is fine if you have enough of them, but would like to enable them to get started at home on their own. Then fine tune with the real robot later. I'm comfortable reading binary files if the data structures that are packed within are documented and shared.

 

-kevin

0 Kudos
Message 3 of 10
(7,966 Views)

Hi Kevin, 

 

Thanks for the clarification, I see what you are trying to do. However, because the mindstorms nxt tool is based on labview it will be non-trivial to accomplish. Furthermore the documentation doesn't exist to parse a rbt file like you are talking about.


Labview robotics has a robotics simulator that may be able to work for you. Labview also has a NXT programming module. You could put these two together and use the simulator to test your nxt robot. You would need to switch from the NXT Tool to labview but for more complex programs this would be a good step anyway. 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 4 of 10
(7,962 Views)

That's very good to know, but if i'm not mistaken FIRST FLL doesn't allow the use of Labview for competition related work which is what we are doing. I think what you provided would be interesting to pursue for the "off season" but really want to take a stab at decoding RBT files. Can this format be shared?

 

Kind Regards,

Kevin

0 Kudos
Message 5 of 10
(7,960 Views)

Hi Kevin, 

 

There is no set simple format for the files, outside of re-engineering the source code it will not be possible to do what you are trying to.

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 6 of 10
(7,958 Views)

ok i hear you. One last suggestion though... not certain what language it was written in, but code snipits of data structure definitions would likely get me what i need to move forward. I imagine there is defined header record and from looking at a smaple file with a hex editor, there are repeating "ti" sections if i recall right. Each of those probably supports variable lengths depending on what is being done within that section. The code this was written with would have to have those structures defined in order to repeatably write a RBT file that other NXT programs could read back in. This would be useful in my endeavor if it could be made available.

 

-kevin

0 Kudos
Message 7 of 10
(7,955 Views)

Hi Kevin,

 

I will not be able to do that.

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 8 of 10
(7,952 Views)
I too am coaching an FLL team (#1063 Moderately Confused). I don't know if this will provide an alternate solution, but it has helped my teams reduce the number of guess-and-check iterations for movement. Once they have the base built I have them run the motors 5 rotations and measure the distance. From this they can get a degrees per inch (or cm if preferred). You can then measure how far you want to go and convert it to motor commands. A similar technique can be applied to turns. This doesn't eliminate the tweak iterations, but makes the process more controlled. Another team I know creates my blocks based on this and enters every thing as distance.
0 Kudos
Message 9 of 10
(7,921 Views)

Hi Paul, 

 

Thanks for the input, creating blocks based off the distances you measure is actually a really good idea. Increasing the number of rotations you use to calibrate will also increase accuracy. 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 10 of 10
(7,915 Views)