11-11-2015 11:00 AM
Hi Daniella.
Ok great, so far so good! When I have the LVODE.dll and ode_single.dll libraries in the same directory as the executable it doesn't prompt the user to find them. I still can't get the application builder to deploy them to this location but I can live with copy/pasting them into the correct spot. Also not sure what I changed but I got the hierarchy issue sorted out, so now the stl and ive files are in the correct folder paths.
Now the program is having trouble finding the xml document for the virtual world. I knew the path source in the default robotics vi wouldn't work correctly after deploying so I replaced it and the strip path block with an Application Directory block. Now the VI starts with a proper relative path so it should work on any computer, no matter where you drop the folder. The deployed application gives a warning message for error code 310210:
Warning 310210 occured at NI_Robotics_Simulator.lvlib: Load Engine From XML.vi->NI_RoboticsSimulator.lvlib:ODESimulator_Engine.lvclass:Create Simulator Engine.vi->NI_Robotics_Simulator.lvlib:ODESimulator_Engine.lvclass:SimulatorService.vi
This error code is undefined. Undefined error... [it goes on with a generic undefined message]
Clicking for further information brings up the error:
Error 7 occurred at Open File+.vi:Open File
Possible reason(s):
LabVIEW: File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS X, and / on Linux. Verify that the path is correct using the command prompt or file explorer.
It appears to be the xml document. On the latest deploy I put an indicator on the Start Simulator Service's manifest path to double-check the address being fed into it and sure enough it is being fed the correct location of the xml document. I have the xml in the data folder: [Application directory]\data\Tracker Visualization 3.xml and the indicator on the executable shows [Application directory]\data\Tracker Visualization 3.xml. I figured maybe the problem is that I'm asking the vi to look in a subfolder of where the vi/application is located, so I also tried putting the xml document in the same folder as the application and giving it that path. Same problem.
I can't crack open the Start Simulator Service block diagram to see if it's modifying the manifest file path so I'm not sure where to go from here. I quadruple-checked everything from my spelling on the file name to making sure the correct directories are being given. I still can't attach the deployed application because of file size limitations but here's a screenshot of the directory readouts on the front panel along with the file explorer view of the application directory.
Also still holding out for some tips on how to correctly handle textures.
Thanks for your help so far!
Marty
11-11-2015
12:26 PM
- last edited on
07-18-2024
03:19 PM
by
Content Cleaner
I just figured out the problem. I was digging through the help files for Start Simulator Service and found a handy page outlining pretty much exactly what you've been walking me through and then some. Here's the page: https://www.ni.com/docs/en-US/bundle/labview-robotics-module/page/lvrobogsm/robo_sim_distributing.ht...
The fix is in copying the text file Kinetic Friction Coefficient.txt to the support directory. I assumed the program was having trouble finding the xml document because of that 310210 error but actually it was looking for this. I copied the file in and it worked like a charm! Great news, and thank you so much for the help so far!
Now just the texture problem and I'll be good to go.
Marty
12-11-2015 02:00 PM
Hi mburns,
Solidworks and other CAD programs (and CAD models) generally do not have texture. They provide tools to display and render but the textures cannot be exported.
You have to use 3D formats that support texture. The new version of the Haro3D library has now a VI to load .OBJ file models with texture. Using free programs like Blender or Meshlab, you can convert models in other formats with texture like .3ds, .fbx, .lwo into .obj format.
There are a lot of libraries to find 3D objects with texture in those formats like www.tf3dm.com or www.turbosquid.com. The problem is to find free models with commercial licenses (notice that the license for www.grabcad.com is non-commercial).
I found a wood table model with texture in .3ds on www.model3d.biz, which I converted into .obj using Blender. The only issue is that the texture map was coded over 8 bits instead of 24 bits, which was easily fixed using Irfanview. I also had to add the line to use the texture in the .mtl file.
I simply modified the .OBJ example coming with the Haro3d library v1.2 to read the .obj file of the table. Below is an image showing the result.
The Haro3D library is part of the LabVIEW Tool Network and can be downloaded using VIPM. You can get more information at www.harotek.com/products.
P.S.: I have just noticed a small bug with repetitive texture (not in the example above). If the texture looks weird when there is a repetitive pattern, let me know, I will provide a work-around. The bug will be fixed in the next release of the Haro3D library in the first quarter of 2016.