What to use,where to start (robot arm simulation)

Started by
5 comments, last by Shaoboy 9 years, 7 months ago

Hello!

I'm looking for some advices to getting started with a graphic programming related subject.

This is my last semester in my electrical engineering studies. We got a project to make a 5-axis robot arm. My part was to build its software side, controlling the motors,receiving position information of the servos and images from the attached camera.

Now we need to upgrade it and i decided to make a simulation part for the software.

At first i want to make something similar to this(without the text of course):

http://www.societyofrobots.com/images/robot_arm_FBD.png

- want to display its joints(axis-points) and arms
- providing enough information (x,y coords) and using forward/inverse kinematics i want it to find a certain point on the canvas (considering some restriction like angles)
- my final goal is to implement this whole thing in 3d with a rigged 3d model

My first thought was to use OpenGL, but i'm not sure if it's the best consedering the fact that i have only 3 months until the deadline and never done anything like this.

So should i stick to OpenGl or find an engine?

And also don't know that what technique could do this trick, i read little about bone animation but it's really not my field.

I would be grateful for any advices,experiences,resources you can share with me to start this journey.

Thank you in advance.

Advertisement

1. Are you doing a 3D version of the picture or just something in 2D just like that?

2. What programming language / OS is the project?

3. How familiar are you with the math behind 3D graphics? Vectors, matrix transformation, projects, etc.

OpenGL is very difficult to learn. There are lots of little problems that come up.

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532


My part was to build its software side, controlling the motors,receiving position information of the servos and images from the attached camera.

That is a large task list. You don't mention any previous experience with real-time 3D rendering, or your familiarity with programming in general. If you have none or just "some," and considering your limited time (unless you can devote 24-7 to it), I would recommend that you (at least) start with a simpler interface, possibly 2D. Just learning about rigged 3D model animation can be a very lengthy process by itself, and you mention possibly having to get the I/O set up, and displaying or otherwise interfacing with camera images. Just FYI, I have a bit of experience with that sort of thing. Though some time ago, I worked as an instrument engineer interfacing instruments of various types (including LVDTs and stepmotors) to a project. Given only 3 months, your first task is to settle on a design that is implementable in that timeframe.

If you decide to continue with a 3D model, you may want to consider finding an existing application of some sort that displays an animated model. I am most familiar with animation of skinned meshes using matrices in DirectX and Direct3D 11, for which you can get the flavor in this article, though the principles are applicable to any 3D API. You may also want to browse the Graphics Programming and Theory articles here on gamedev for other possibilities. Several may be of interest. Take note of the tab labeled "Articles" just below the gamedev logo above on this page.

Other considerations:

- Creating a rigged 3D model from scratch using a modeling program such as Blender has its own learning curve. Alternatively, spend some time looking for an existing model that could be easily modified for your purpose. In either case, count on spending some time becoming familiar with the concept.

EDIT: If you have access to books (or a budget for same), the older versions (possibly the newer versions also) of the Red Book (OpenGL "Bible") specifically discussed the math and rendering of a robot arm. Frank Luna (author) has good books for both DirectX 9 and Direct3D 11 with extensive information on skinned mesh animation.

EDIT2: Unless you're an absolute whiz with programming analog and digital I/O boards, consider that you may have to generate and test some code for accessing the device real time that supports your rendering needs.

EDIT3: You don't mention your math capabilities - you will need to be quite familiar with 3D vectors, matrices and quaternions to support your app. When you get into rendering, you will need to understand row-major vs. column-major matrices, conversion of matrices to quaternions (and vice-versa), etc. Several APIs have math libraries available to do most of that work for you. Just sayin'

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Hello!

First of all I would like thank you to expended your time on me.

1. Are you doing a 3D version of the picture or just something in 2D just like that?

2. What programming language / OS is the project?

3. How familiar are you with the math behind 3D graphics? Vectors, matrix transformation, projects, etc.

OpenGL is very difficult to learn. There are lots of little problems that come up.

Sorry i forgot to mention some info smile.png

1. At first I would like something simple so i will stick to 2D. My final goal will be something like you can see in this presentation:


2. I would like to use Qt with C++ under Linux OS (ubuntu 12.04)

3. We have been thought for these things at the university(not particularly for 3D graphic but the basis of linear algebra) but unfortunately not on an advanced level.


That is a large task list. You don't mention any previous experience with real-time 3D rendering, or your familiarity with programming in general. If you have none or just "some," and considering your limited time (unless you can devote 24-7 to it), I would recommend that you (at least) start with a simpler interface, possibly 2D.

You are absolutely right, that's why i would like to make something like a linked above at first then move one step forward. I have strong background in C programming and a moderate one in OOP. So I think programming won't be my weak spot but the mathematic much rather clearly understanding and implementing them in my app.

That's great to see that the Red Book covers this topic, there are some available copies in the library thanks for the tip. Besides that I see I need to get my hands on a book which related to graphic mathematics.


Take note of the tab labeled "Articles" just below the gamedev logo above on this page.

Great I will look around there.


Creating a rigged 3D model from scratch using a modeling program such as Blender has its own learning curve. Alternatively, spend some time looking for an existing model that could be easily modified for your purpose. In either case, count on spending some time becoming familiar with the concept.

The 3D model is done just as the rigging. The only problem is that i have no clue at all how they will be manipulated in a program how will it know about the rigging (skeleton).
But as I mentioned the manipulation of my rigged 3D model is the last line on my to-do list.


You don't mention your math capabilities - you will need to be quite familiar with 3D vectors, matrices and quaternions to support your app.

I have some basic knowledge of them but of course I need to lose my self in the topic.I would be grateful If you can provide any link which is for begginers and clear to understand.


Several APIs have math libraries available to do most of that work for you.

http://en.wikipedia.org/wiki/List_of_3D_graphics_libraries

Do you have any background from any of them (except DirectX that you mentioned )? Which one would you recommend for a begginer like me consedering the task to be done?

Thank you for helping!

Given you skill level and time constraints, I would suggest SFML. I would use this only for 2D, but if you decide to add some 3D, you can use the SFML for the base application.. Either way, I think it's easy enough that you can use it, but robust enough that you won't be limited.

http://www.sfml-dev.org/

Good luck with whatever you choose.

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532


The 3D model is done just as the rigging. The only problem is that i have no clue at all how they will be manipulated in a program how will it know about the rigging (skeleton).
But as I mentioned the manipulation of my rigged 3D model is the last line on my to-do list.

Not sure what your first sentence means, unless you mean the model and rigging would be done together. That is the most common approach. With regard to deforming the model (mesh) with the skeleton, that's what the article I linked above discusses. In any case, leaving 3D for later sounds like a good choice.


Do you have any background from any of them (except DirectX that you mentioned )?

Some in OpenGL a long time ago. That's why I knew about the robot simulation mentioned in the Red Book. Other than that, I'm afraid not. Glass Knife seems to be pointing you in a good direction.


[math] I would be grateful If you can provide any link which is for begginers and clear to understand.

There are some articles here on gamedev (same tab but under Technical->Math and Physics). Googling for "matrix quaternion tutorials" yields quite a few pertinent hits, many of them graphics oriented. "Clear to understand .. quaternions?" wink.png We're talkin' quaternions here. Oxymoronic. However, in particular, the graphics oriented math tutorials should get you started or refreshed in that area.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.


Given you skill level and time constraints, I would suggest SFML. I would use this only for 2D, but if you decide to add some 3D, you can use the SFML for the base application.. Either way, I think it's easy enough that you can use it, but robust enough that you won't be limited.

http://www.sfml-dev.org/

Good luck with whatever you choose.

Thank you so much I will give it a try. smile.png


Not sure what your first sentence means, unless you mean the model and rigging would be done together.

Exactly meant that smile.png Until now I have used the "3D model" term without stating that it's rigged, just the pure model. Thank you for correcting me.


With regard to deforming the model (mesh) with the skeleton, that's what the article I linked above discusses. In any case, leaving 3D for later sounds like a good choice.

Sorry I slip through that line I definitely check it out!


"Clear to understand .. quaternions?" We're talkin' quaternions here. Oxymoronic.

That's what I'm afraid of biggrin.png but google is my friend and the topics you mentioned above as well so i think there will be no problem smile.png

Thanks both of you there is now something i can follow.

This topic is closed to new replies.

Advertisement