Re: Simulating NXC Code?
Posted: 24 Nov 2010, 18:13
I've posted this idea of a NXT simulator already as a wish to the old nxtasy forum.
The usage though will be quite limeted , because how do you think the single sensor values could be entered?
As you can't plug any sensors to the PC you will probably have to enter all virtual values manually, and as there are no motors running you can't poll any encoders, and thus all what you get is sort of a snap shot mode.
So the NXT simulation probably will be restricted to complete complex robotic models in a complete specific virtual environment, e.g. a line follower tribot with a light sensor down to the ground and a bumper touch sensor at the front which is running along a black virtual line. Here you may enter your line follower code and the simulator processes it in the virtual world by calculating the predicted moves of the model and thus the predicted consequential sensor values (e.g. of the light sensor seeking the black line). That's in fact a simulation model that's featured by nxtOSEK.
http://lejos-osek.sourceforge.net/ecrobot_nxt.htm
Or you may have a tribot with a compass and a US sensor at the front running in a virtual labyrinth, and here you may test maze solver programs.
So I suppose for each specfic environment and robot construction you will have to use and build a specific unique simulator program.
The usage though will be quite limeted , because how do you think the single sensor values could be entered?
As you can't plug any sensors to the PC you will probably have to enter all virtual values manually, and as there are no motors running you can't poll any encoders, and thus all what you get is sort of a snap shot mode.
So the NXT simulation probably will be restricted to complete complex robotic models in a complete specific virtual environment, e.g. a line follower tribot with a light sensor down to the ground and a bumper touch sensor at the front which is running along a black virtual line. Here you may enter your line follower code and the simulator processes it in the virtual world by calculating the predicted moves of the model and thus the predicted consequential sensor values (e.g. of the light sensor seeking the black line). That's in fact a simulation model that's featured by nxtOSEK.
http://lejos-osek.sourceforge.net/ecrobot_nxt.htm
Or you may have a tribot with a compass and a US sensor at the front running in a virtual labyrinth, and here you may test maze solver programs.
So I suppose for each specfic environment and robot construction you will have to use and build a specific unique simulator program.