Need a guide for using vrtracer and/or 3D World Editor

3 次查看(过去 30 天)
I was trying to use vrtrace for tracking an object in my simulation but cannot find a good document explaining how to use it. The specific problem that I am currently having is as follows:
I am not sure how to enable tracing of an object. I looked into the example 'vrtkoff_trace.mdl'. It seems like 'IS' mapping is required in the wrl file for the tracing option to be usable. (I am not sure if I am correct, but I believe so since translation of a marker node is set to "IS MarkerTranslation" in the vrtkoff_trace model's wrl file)
I tried to do that in my file as well, but when I right click similar nodes in my file, i get the "IS" option disabled. I don't know why it is disabled and how to tackle this issue.
A snapshot of the disabled option: http://i.imgur.com/8vB0dkg.png
If someone can guide me through this, it will be highly appreciated.
Thanks.

采纳的回答

Jan Houska
Jan Houska 2013-4-23
In most cases, there is no need to modify the virtual world you want to use for object tracing. So you don't need to care about the IS mappings, they are added automatically by the VR Tracer block.
Currently, you probably have a model that moves an object in a virtual world by sending the object's position signal computed by Simulink to the translation field of the enclosing Transform node of the object. All you need to do is to copy the VR Tracer block from the library to your model and connect the same position signal to the input of the block. Then, in the VR Tracer block parameters, you need to specify the parent transform node name relative to which the position is specified. If this is an absolute position, you leave the parent transform name empty (= relative to root).
You can also compare the vrtkoff and vrtkoff_trace examples. They use the same virtual world and also most of the Simulink model is the same, the only major difference is the added VR Tracer block in vrtkoff_trace. So the modification you need to do to your Simulink model is very similar to the changes between vrtkoff and vrtkoff_trace, and your virtual world probably does not need any change at all.
  1 个评论
Syed Bilal Mehdi
Syed Bilal Mehdi 2013-4-24
Thank you!
My model works fine now. As it turns out, it wasn't working for me for a very different reason.
I had connected vrtrace on the output of a VR Signal Expander (VR Signal Expander converted a 1 dimensional signal to a 3 dimensional one). Apparently, although vrsink was accepting output from VR Signal Expander as 3 dimensional, vrtrace wasn't.
Using MUX in place of VR Signal Expander has now solved the problem.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by