Page 2 of 2

Re: Simulating NXC Code?

Posted: 24 Nov 2010, 18:13
by HaWe
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.

Re: Simulating NXC Code?

Posted: 24 Nov 2010, 20:15
by fuzzball27
oniric, as it is apparent that there is no current NXT simulator, why not just work with others across the web? Stryker talks about this in this in an earlier discussion: https://sourceforge.net/apps/phpbb/mind ... p?f=4&t=45

Re: Simulating NXC Code?

Posted: 25 Nov 2010, 02:22
by nxtboyiii
Can you post a .exe file for it?

Re: Simulating NXC Code?

Posted: 25 Nov 2010, 03:16
by muntoo
Check out Xander's Blog.

Re: Simulating NXC Code?

Posted: 25 Nov 2010, 11:01
by HaWe
nice, but it's RobotC, not NXC

Re: Simulating NXC Code?

Posted: 26 Nov 2010, 06:33
by mightor
Ah, Doc, you forgot to RTFA (read the fine article).
The goal of the project over the next three years is to enable students to program their robots in the virtual world using the same programming language that they use when they program their robots in the real world (NXTG, LabVIEW, ROBOTC)
Make sure you read before you write, next time. This is going to be a firmware emulation system, so compiled NXC code (which is the same as compiled NXT-G code) will work just fine.

- Xander

Re: Simulating NXC Code?

Posted: 26 Nov 2010, 09:00
by HaWe
I apologize masta, I didn't realize the whole bandwidth of this project. I just read unforgivably
By May next year, students should be able to use ROBOTC to program their virtual robots.
ps: is it supposed to work for enhanced NXC fw code too?

Re: Simulating NXC Code?

Posted: 26 Nov 2010, 14:53
by mightor
ps: is it supposed to work for enhanced NXC fw code too?
I don't know, actually. I think they will probably focus on implementing the standard firmware. All I know about this project is what it says on the project's website. I will be sure to post more as the project develops.

- Xander