Simulating NXC Code?

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Simulating NXC Code?

Post 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.
fuzzball27
Posts: 103
Joined: 29 Sep 2010, 17:14
Location: US

Re: Simulating NXC Code?

Post 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
fuzzball27 >>-->
nxtboyiii
Posts: 366
Joined: 02 Oct 2010, 07:08
Location: Everywhere

Re: Simulating NXC Code?

Post by nxtboyiii »

Can you post a .exe file for it?
Thanks, and have a nice day,
nxtboy III

programnxt.com
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: Simulating NXC Code?

Post by muntoo »

Check out Xander's Blog.
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Simulating NXC Code?

Post by HaWe »

nice, but it's RobotC, not NXC
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: Simulating NXC Code?

Post 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
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Simulating NXC Code?

Post 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?
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: Simulating NXC Code?

Post 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
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 5 guests