3d files in vb.net - vb.net

I know this will be a difficult question, so I am not necessarily looking for a direct answer but maybe a tutorial or a point in the right direction.
What I am doing is programing a robot that will be controlled by a remote operator. We have a 3D rendering of the robot in SolidWorks. What I am looking to do is get the 3D file into VB (probably using DX9) and be able to manipulate it using code so that the remote operator will have a better idea of what the robot is doing. The operator will also have live video to look at, but that doesn't really matter for this question.
Any help would be greatly appreciated. Thanks!

Sounds like a tough idea to implement. Well, for VB you are stuck with MDX 1.1(Comes with DirectX SDK) or SlimDX (or other 3rd party Managed DirectX wrapper). The latest XNA (replacement for MDX 1.1/2.0b) is only available for C# coder. You can try some workaround but it's not recommended and you won't get much community support. These are the least you need to get your VB to display some 3d stuffs.
If you want to save some trouble, you could use ready made game engine to simplified you job. Try Ogre, and it's managed wrapper MOgre. It was one of the candidate for my project. But I ended up with SlimDX due to Ogre not supporting video very well. But since video is not your requirement, you can really consider it. Most sample would be in C# also, so you need to convert to VB.Net to use. It won't be hard.
Here comes the harder part, you need to export your model exported from SolidWorks to DirectX Format (*.x). I did a quick search in google and only found a few paid tools to do that. You might need to spend a bit on that or spend more time looking for free converter tools.
That's about it. If you have more question, post again. Good Luck

I'm not sure what the real question is but what I suspect that you are trying to do is to be able to manipulate a SW model of a robot with some sort of a manual input. Assuming that this is the correct question, there are two aspects that need to be dwelt with:
1) The Solidworks module: Once the model of the robot is working properly in SW, a program can be written in VB.Net that can manipulate the positional mates for each of the joints. Also using VB, a window can be programmed with slide bars etc. that will allow the operator to be able to "remotely" control the robot. Once this is done, there is a great opportunity to setup a table that could store the sequencial steps. When completed, the VB program could be further developed to allow the robot to "cycle" through a sequence of moves. If any obstacles are also added to the model, this would be a great tool for collission detection and training off line.
2) If the question also includes the incorporation of a physical operator pendent there are a number of potential solutions for this. It would be hoped that the robot software would provide a VB library for communicating and commanding the Robot programatically. If this is the case, then the VB code could then be developed with a "run" mode where the SW robot is controlled by the operator pendent, instead of the controls in the VB window, (as mentioned above). This would then allow the opertor to work "offline" with a virtual robot.
Hope this helps.

Related

Is it impractical to use GNU Radio without the Companion GUI?

I have a relatively new M1-based Macbook but Companion isn't stable. It will, for example, crash as soon I as I try to choose the "File" or "Edit" menus and has crashed while I was attempting to adjust parameters.
I am able to communicate with and obtain samples from my Ettus N210 just fine but I'd like to eventually try to use the DVB-S2 receive blocks.
This is all a bit new to me, but I'm an experienced Python programmer and don't mind if I have to write some code. I don't necessarily need a Qt application to be generated--I'm fine with wiring things up and writing data to a file.
Is it practical to do this? Can someone point me to a resource, perhaps a tutorial, on writing things without using the Companion code generator?
The GNU Radio Companion (GRC) is just a design tool. It's a companion.
GNU Radio has tutorials that explain writing flow graphs in Python.
Go to https://tutorials.gnuradio.org and click on "Understanding a Flowgraph's Python Code".
Didactically, most of the things you need to learn are of the "what is the logic behind doing this DSP", which is really a math/signal processing thing, not just a Python coding excercise. Unless you've built similar signal processing flow systems before, I'd strongly discourage trying to do what you're intending to do. Get a VM in which GRC works (see comment), and do the tutorials from start to finish in the specified order. Trying to learn GNU Radio, flowgraph-based DSP design AND doing all by hand instead of having a handy graphical design tool is a recipe for frustration.

Alternatives for Using MATLAB Files and Deploying Them into DLL's

I have some source code for the BaNa Noise Resilient Pitch Detection Algorithm downloaded here, and I am planning to use the code they provided as a library for a mobile app I'm making. It's written in Objective-C for MATLAB and so I'd probably need to deploy it to a DLL to be able to use it for external applications.
The only thing is that I'm a student, and I don't really have the funds to purchase MATLAB just to be able to work with this algorithm, and so I'm downloading Octave, which was a suggested alternative. This should be able to make working and editing the code for my research possible, but my concern is if I can deploy the code into usable libraries for the application in which I'm going to make using the Unity Game Engine.
I'm not sure if the direction I'm going at will bring me to a dead-end or not, so I'd like to ask for insights regarding this.
What I have now:
1) Source code in MATLAB (.m files)
2) Octave (currently downloading, I'm not even sure if it has the built-in methods I need)
What I plan to do:
1) Use Octave to edit code and test out if the code I have works
2) Deploy it to a DLL file (Is this even possible with Octave?)
3) Use that DLL in Unity3D
Would you guys have any suggestions, alternative workarounds, or foreseeable problems I may encounter with this? Any advice would be greatly appreciated.
Thank you in advance,
Justin
Depending on what functionality from MATLAB (and especially toolboxes), the code should run just fine in Octave, maybe with some minor modifications. If however, the code relies heavily on some toolbox functionality that has not been implemented in Octave, then you have a fair amount of recoding to do.
There is not easy way that I know of to generate a DLL from Octave. Having said that, have a look at How do I create a simple Octave distributable without installing Octave and this section of the Octave documentation on the subject of generating standalone programs from Octave, it might point you in the right direction.

Using scripting to test a program

I've been tasked with testing a Windows program that is essentially a collection of links to various exe files. My job is basically to click all the links to make sure they work (yay!). To makes things a bit easier on myself, I want to create a simple script that will do the clicking for me. I have a programming background (familiar with C/C++, Java), but have never scripted anything before.
Despite googling and searching around on stackoverflow, I wasn't able to find anything that explains what would be involved in creating something like this. I downloaded a program called AutoHotKey (http://www.autohotkey.com/) that seems promising, but before I dive into it I want to see what suggestions you all have.
Thanks!
Never tried autohotkey so I can't give you feedback. But I played around a bit with Sikuli which is agnostic of the UI technology used (working with image recognition). It works fine and you should be able to come up with a working prototype in a couple of hours.
HP Unified Functional Testing (http://www8.hp.com/us/en/software-solutions/unified-functional-testing-automated-testing/) provides similar functionality as Sikuli. As licensed software, it isn't free, but provides a lot more features and support than Sikuli (which is open source) does.

plotting robot path

I am writing code for rrt(rapidly exploring random trees) which is a sampling based motion planning algorithm.I wrote the code in MATLAB but now i am writing it in c++.
I want to know how can we plot the robot path in real time with all the obstacles.
What I want is this: I want to see my robot traversing the space.So basically it's about the graphics.I am trying to use sfml but I am having problems with it.Some people suggested using opencv or opengl but I think they are not easy to use.I am looking for a simple to use library.
If opencv or opengl is the answer then please tell me what specifically i need to use in these libraries.I am working on linux(ubuntu 11.10)
You might want too look into using the internal matlab compiler for generating a standalone application directly from your M-code. That way you don't have to rewrite everything form scratch.
I have used the following link a couple of times just to refresh my memory
http://technologyinterface.nmsu.edu/5_1/5_1f/5_1f.html
Eg if you have made an M function with the following content(Example from link):
function y=PolyValue(poly,x)
poly=[1 2 -1 4 -5];
x=[5, 6];
y=polyval(poly, x)
you could use the command
mcc -m PolyValue
to compile the program.
This command would then give you the files necessary for implementation in a larger c++ program.
It should even support Gui elements and graphs.
Something like http://www.ros.org/news/2011/01/open-motion-planning-library-ompl-released.html
may be what you are looking for.
I've worked in both OpenCV for some image recognition projects and OpenGL for rendering displays and whether you go with a library like above or render it yourself is really up to how complex the display needs to be. Ask yourself some questions about how many different obstacle scenarios you are looking at. Are there a large multitude of possible shapes for the obstacles and the robot? Is the problem deterministic (in terms of both the robot's movement and the environment)?
In terms of OpenGL and OpenCV being not easy to use for those new to them, this is very much the case, but choosing to work in C++ makes the problem more difficult for beginners. As another user has mentioned, wrapping your Matlab code instead of throwing it away may be a viable option. Even running the matlab engine in the background to run your scripts through C++ may be viable, if speed is not a critical factor. See http://au.mathworks.com/help/matlab/matlab_external/introducing-matlab-engine.html for more information.

Can VB.NET be used as a game engine?

I know VB.NET, and I've been planning on creating a simple 2d game engine. I got no problems with creating such engine and running the actual game. However, I've been told that VB.NET might not be the best choice for "working too much with graphics". I'd like to know if that's true. Can VB.NET truly not manage efficiently loads of graphics simultaneously on the screen? If no, what kind of software am I supposed to use for creating this engine?
I have found that people generally view VB.NET as a subpar language, and mostly associate it with Visual Basic 6.0 (or earlier).
In the .NET world, VB.NET is a first class citizen that simply has a verbose syntax. It's particularly because of the verbosity that I would probably choose C#, if not going with C++.
Still, you can use VB.NET to work with whatever drawing libraries that you want, and you can even use it with XNA and Managed DirectX. It can even be linked against unmanaged libraries as long as you are willing to do to the required interop.
As for managing the graphics on the screen efficiently, it really depends on how well you do it, and how much you want done. If someone can do it well in C#, then you can do it well in VB.NET with the exception of unsafe code. It's too general to say either way given the vague "simple 2D game engine" description, but chances are it is more than possible.
These days, managed code is quickly catching up to unmanaged code, and while it's not quite perfect, it is really impressively good.
It's not the language you need to consider as much as the Framework.
Suggest you look at XNA:
Your First Game - XNA Game Studio in 2D (step-by-step tutorial)
Also, DirectX:
DirectX Developer Center
Learn DirectX
VB.NET Already supports XNA including on Windows Phone 7. So if you are looking to develop games and if you language of choice is VB + XNA you are all set to go.
Take a look at the official announcement: http://blogs.msdn.com/b/lisa/archive/2011/03/28/xna-is-coming-to-visual-basic.aspx
Visual Basic's primary use is for Win 32 Apps with a standard GUI. If you are planning on building a game I definitely recommend C++. It has faster execution speed and better libraries for game development. Visual Basic will not deliver as good of performance of C++ would give you. IMO It would be better for you and the user.
I don't know much of the graphics issues in vb but as far as i have heard you can't create games for xbox using vb.net, it only supports PC.
XNA game studio can be used for game development. Although it is supposed for c#, you can find how to use it with vb in here...
http://www.alanphipps.com/VisualBasicdotNET-XNA.html
If you are still relatively new to programming then C++ is more than likely to make you quit early.
Don't aim at C++ until you have at learned C#.
C++ is a great and diverse language but definitely not friendly grounds for anyone who hasn't been programming for a long time. This is ESPECIALLY considering if your first language is one such a VB.
To Answer the Topic?
Yes vb.net can make a game, arcade,FPS,RPG,MMO or what ever you what within your ability to code. if you wanna learn some find playing with open source engines to get the feel helps. so try looking up some and give that a go.
my comment is at the person above's comment,
Visual Basic can do alot, and we find out new stuff all the time.
i seen vb6 game engines work well, graphical and feature wise.
wile visual basic is more down to earth for writing, C++ isnt ik its not, ive tried it.
but VB i can pick up easyr.
my experience ?? 2007 to present day, ive work with vb6 mmo game engine source codes,
Mirage,Elysium,Eclipse,EA,EFF
ive also tried using irrlect engine years back.
for a beginner should learn VB.net or C# .
C++ is to complex.