LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Robotics Simulation: Wood Texture & Exporting Project

Hi all,

 

I'm working on a fairly basic simulation which I'm using to visualize the location of a set of position trackers in space. In my simulation I have a table model as the environment and a set of 8 colored ball obstacles which I programmatically place at the positions output by the tracking system in real time. The table environment is from a Solidworks model I found on grabcad and tweaked to match the dimensions of our setup.  So far I've been completely unable to import the table model in a way that preserves the wood-grain appearance from the CAD model. I attached screencaps of the CAD model and the front panel of my simulation. Right now I export the assembly CAD model to VRML 97 and import the model into a new simulation via the Robotics Environment Simulator Wizard. I've tried defining the appearance at the part level, assembly level, and both with no luck. Messing around with the material settings also didn't do anything (right now I have no material specified). I also tried importing the table as the environment, as a robot, or as an obstacle with similar results. I haven't tried any of the other available file types (.ive, .dae, or .lvsg) because there isn't really an obvious way to do that from Solidworks. So my question is how do I give my table in the Labview simulation a wood texture? Should I use a different program to generate the VRML file? Should I try another file type (if so, how)? Can I define the texture/appearance of the table programmatically in Labview? I'm open to any solution that works, none of the tutorials/documentation I've been able to find has been much help at all. The closest I could find is http://www.ni.com/tutorial/14780/en/, but this method just plain doesn't work as far as preserving the appearance.

 

I can provide the CAD models for the table and the VIs I use to run the simulation if needed, although I'll have to strip the position tracking parts out so it'll run for you all.

 

Also, does anyone have any experience with creating standalone applications from a Robotics Simulation project? I'll need this program to run on another computer (which has labview with the robotics toolkit) and haven't been able to get it working for the life of me. I've rolled out executables and source distributions in the past but this is a whole other story. I can post this as another topic if I need to.

 

Thanks!

Download All
0 Kudos
Message 1 of 13
(4,377 Views)

Hi mburns,

 

I was able to look into your question about adding a texture to your simulation file, and I found a few general starting point links on interfacing your model with the Robotics Simulation Module:

 

Setting up your Solidworks assembly for LabVIEW

Controlling your SolidWorks model in LabVIEW

LabVIEW support for VRML

 

Otherwise, I would suggest trying out different materials and file types in SolidWorks to see if they work (SolidWorks is usually able to save files to plenty of different filetypes, and there are also some free third party softwares out there that can help you change filetypes). Posting your CAD model and VIs might be a good idea, especially concerning your application export question; what kind of application are you looking into creating?

 

 

0 Kudos
Message 2 of 13
(4,319 Views)

Hi Daniella,

 

Sorry for the huge delay on my part, had a lot of stuff come up over the past weeks and I finally have an opportunity to come back to this. 

 

I looked at your links for the solidworks interfacing/wood texturing issue. Unfortunately I'm getting a runtime error when I try to import the solidworks assembly (see this thread for exactly what I'm getting:http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/Soft-Motion-Runtime-Error/td-p/2294244). It works on another computer in the lab so I know it's probably an issue with my install of LabVIEW. I'll look into that, but what I figure at this stage is that this approach wouldn't really work for my application anyway. I need a live simulation in LabVIEW being shown in a LabVIEW window; I wil definitely be using this kind of functionality in the future but not for this particular project. It may be a workaround, but for now I need everything to happen in one easy-to-deploy program and I can't assume the target computers will have Solidworks.  As for attempting different materials and file types, do you have some place I can start with? I can't count how many different combinations of material configs and file types I'd have to try, let alone throwing third party software into the mix. This has to have some kind of precedent, right? I can't seriously be the first person to want to import a scenery object with a texture. Don't get thrown by how I approached this problem so far, I'm open to any solution/approach that has been demonstrated to work. 

 

I attached a zip of the CAD models for the table, including the different VRML files I tried out. I downloaded the model from https://grabcad.com/library/wooden-dining-table-1. 

 

I also attached the LabVIEW files. Fair warning, I haven't been able to get this to work on the computer sitting next to mine so it might not open properly for you, either. I replaced the tracking system drivers with dummy VIs and removed all of its dependencies, other than that it is entirely 100% identical to what I'm trying to deploy. The VIs should run, but the tracker functionality will just return the default position of the spheres. As far as deploying goes we want to be able to use this simulation on computers which don't necessarily have LabVIEW or the robotics toolkit. I've tried Source Distribution, Application, and started trying to get the Installer to work before I got in over my head. I've been through every tutorial/walkthrough available on how to generate each of these, but there was nothing tailored to deploying a robotics toolkit/simulation project and from what I can tell all of my issues were related to deploying the toolkit.

 

Try your hand at it, I'll be active on this thread from here on out so feel free to throw any questions/pointers my way.

 

Thanks for your time,

mburns

Download All
0 Kudos
Message 3 of 13
(4,204 Views)

Hey mburns,

 

It seems like you're on the right track. If you keep having trouble getting things to run on your computer, I might suggest re-installing LabVIEW, since importing seemed to work on another computer and it looked like that was the solution to your import error in the forum post you linked.  As far as getting your assembly to import with the texture you want, I would test to see if you're able to import another part with the colors you want to see what file type will work for what you need (.ive, .dae, or .lvsg). If you're having trouble attaching materials to your part or saving it as a separate filetype in SolidWorks, I would recommend checking out the SolidWorks forums as a starting point. From there, I would use the same import procedure you've been using to test those changes in your simulation.

 

As far as creating an application from your simulation, from what I've seen you should be able to create an installer or executable of your project using the normal Application Builder Module, which would allow you to run it on computers without LabVIEW.

 

 

0 Kudos
Message 4 of 13
(4,173 Views)

Hi Daniella,

 

I tried some parts and assemblies and from what I can tell is that materials defined in solidworks that give a single color appearance to a part will import fine. I was even able to import a whole assembly in .wrl and each individual part had its unique material appearance preserved. I guess the problem may be on the Solidworks end. It also doesn't help that out of the compatible file types, Solidworks seems to only be able to export to .wrl. I'll chase down some solutions on that front, but in the mean time what approach do you recommend for what I'm trying to do? Forget solidworks, .wrl files, whatever I've been doing in my approach. If you were to import an assembly into Robotics Simulator with a wooden texture what softwares/procedure would you use? Better yet, I can already see that some of the stock environments in the simulator have wooden and other textures, how were those made? 

 

On the deployment front, do you have any good resources you can point me towards on how to properly generate an executable? I've lost days before posting to this forum trying to get an application which I could run on other computers. I've been able to do it in the past for some programs I made which didn't have a VR simulation involved, but for some reason the presence of the Robotics Simulation toolkit changes everything. I'll look back at my latest attempt and find the errors that popped up, but in the mean time do you have any resources specific to generating an executable for the robotics toolkit?

 

Thanks for your help,

Mburns

0 Kudos
Message 5 of 13
(4,151 Views)

Hi Daniella,

 

Had a little more time to go through the application builder process. I'm going to take a step back and roll the project down to just the fundamental simulation. I created a brand new project, added a new robotics simulation (Project Explorer>My Computer>New>Robotics Environment Simulator), set the table model as the environment (still untextured, but lets ignore that), and set the attributes for each of my 8 marker balls exactly as they are in my full simulation. I attached a zip of this project (Tracker Visualization 3), including copies of the 3D models generated by the simulation wizard along with the .wrl and Solidworks source files that were used to make them. At this stage I didn't include any control code; just added the simulation, made sure the main VI would run and show the scene, then went straight to build an application.

 

I set Tracker Visualization 3.vi (the generated main VI) as the Startup VI, then set the accompanying ID list and xml document to the Always Included category. In source File Settings I put the ID List and xml documents to the same destination as caller. I left all other settings at default. I would have attached a zip of the application I generated, but it's an 8mb file.

 

When I run the application I get a prompt to locate "LVODE.dll". In my other attempts at the build I copy/pasted the dll into the support directory (data) and directed the application to that file, but since we're going to take this step by step I'd like to know what the proper way to solve this problem is. Is there a setting I missed in the Application Builder which would tell the application where to find LVODE? For obvious reasons I can't leave it up to the end-user to dig up this library when they want to run the program. Fingers crossed that the answer to this one might clear up some other issues I have further down the line!

 

Thanks again,

Marty Burns

0 Kudos
Message 6 of 13
(4,137 Views)

Hi Marty,

 

It sounds like you're definitely on the right track with your application build. I would check this knowledgebase article for the missing DLL error you're getting (You should be including the DLL in your source files).    http://digital.ni.com/public.nsf/allkb/862567530005F09C862565C50068363D

 

It looks like a promising solution, hopefully it will clear up any other issues you're getting in your build. 

0 Kudos
Message 7 of 13
(4,118 Views)

Hi Daniella,

 

That link is broken, care to give an updated link or the title to the knowledgebase article so I can look up? 

 

And can you point me in the right direction for this texturing issue? How were the existing models that had wood textures generated? Sorry if I'm being a pain on this one, but I spent weeks trying to figure it out and look it up on my own before even starting this topic and got nowhere. 

 

Thanks,

Marty Burns

0 Kudos
Message 8 of 13
(4,092 Views)

Hi Daniella,

 

Quick update on the next issue with the application builder. For now I have the dlls export with the application through the builder but the software still requires you to manually point it to the files. This is still a problem that I'm hoping you can help me out with.

 

Moving on, in order for the Robotics Simulator to load the simulation it opens up .stl and .ive files kept in "[Project Directory]>[Simulator Name]RSC>ive>file" and "[Simulator Name]RSC>stl>file". Nothing wrong with this, except that when deployed as an application this file structure gets completely wiped, so the main VI throws an error when the expected directories aren't there. The offending subVI, "Start Simulator Service.VI" has a password-protected block diagram so I can't change the folder hierarchy it's expecting to match the post-deployment setup. It also doesn't appear that I can make subfolders in the Destinations tab of the application builder so I can't match the deployed hierarchy to what the VI is expecting. In the Application Builder I tried making an identical directory, [Simulator Name]RSC, and checked "Preserve Disk Hierarchy" but on Preview/Deploy the contained files are still just dumped into the RSC folder with no attempt at preserving the necessary subfolders.

 

Hopefully someone can help out with this! 

 

Regards,

Marty

0 Kudos
Message 9 of 13
(4,081 Views)

Hi Marty,

 

My apologies, this link should work: http://digital.ni.com/public.nsf/allkb/862567530005F09C862565C50068363D?OpenDocument

 

As far as the application builder works, you should be able to include your .stl and .ive files into your project and include those in your build when you create you executable, which should eliminate the file path error you were getting.

0 Kudos
Message 10 of 13
(4,061 Views)