Jump to content

Photo

Making a Simulator


  • Please log in to reply
6 replies to this topic

#1 SushiKitten

SushiKitten

    Coffee Cat

  • Members
  • 1,916 posts
  • LocationCanada

Posted 26 February 2013 - 11:23 AM

So my supervisor is happy with my work, he throws all this work my way and I do a good job of keeping up, but today he asked me to do something that is a little out of my skill level.

He wants to make a simulator that students can put their programming into and observe how a robot would react should they put the code on the robot.

I have never made a graphic user interface though,, I have never even made a window outside of eclipse. So I turn to you guys. How does a graphical user interface work? How can I go about making a simulator, preferably in c++?

#2 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

Posted 26 February 2013 - 11:46 AM

Take the easy way out. x:

You literally drag and drop controls on the form and it generates the code for you.
See: http://i.imgur.com/upWtDAB.png

So for the simulator portion... that's gonna get complicated. Does he want to it use their compiled code or source code?

I'm not entirely sure how references work in c++ or how calls to the robots API work - if you could elaborate on that, I could help you out. I would basically try to re-create the API for the robot and then you can just attach your appropriate actions. (ie rotating one wheel is going to turn it etc. etc.)

#3 SushiKitten

SushiKitten

    Coffee Cat

  • Members
  • 1,916 posts
  • LocationCanada

Posted 27 February 2013 - 07:58 AM

I just got through with a meeting with my supervisor. Unfortunately I cannot use Visual Studios as I must support all operating systems.

He suggested Qt, which what I can make of it, is a set of libraries. I also ended up with a few books on UML and the model-view controller? This will take a while..

#4 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

Posted 27 February 2013 - 10:02 AM

I believe KN has some experience with Qt. Have fun setting up GUIs by hand, it's a real pita. o.o;

Did he mention how he planned to have you emulate the robot, though? I'm assuming since he gave you books on mvc and UML he wants you to recreate the API?

#5 SushiKitten

SushiKitten

    Coffee Cat

  • Members
  • 1,916 posts
  • LocationCanada

Posted 27 February 2013 - 10:24 AM

I'm still a bit shaky on what's going on. He wants to implement the robot's library, or a modified version of it. Students would either enter their code in a window or have this thing as a plug-in off of the Eclipse IDE they're using and use the code there. Then, depending on the functions they called, have the program run the code like the robot would and show an animation on the screen somewhere.

I downloaded Qt with a couple examples, it's very interesting stuff that you can do with it.

#6 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

Posted 27 February 2013 - 10:27 AM

So you are recreating the robots API and just interpreting the commands. I wish I got projects half that interesting. :<_<:

#7 SushiKitten

SushiKitten

    Coffee Cat

  • Members
  • 1,916 posts
  • LocationCanada

Posted 27 February 2013 - 10:35 AM

It's challenging, but I really lucked out on my first work term, haha. I think the best part is I'm learning a lot of things I'll encounter again in my courses later on. Stuff like Unified Modeling Language and microcontrollers are stuff I'll be learning about in later courses, but I'll already have a handle on what they are.