<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Grabbing objects in a scene with Open VR Controller in VRED Forum</title>
    <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7209508#M8612</link>
    <description>&lt;P&gt;Thank you Jochen! Unfortunately my VR rig got carted off to a conference for demos so I won't be able to test until mid-late next week, but that makes a lot of sense and I think it should work. If you're able to provide that sample scene without wasting too much of your time that would be fantastic.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2017 14:42:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-07-06T14:42:46Z</dc:date>
    <item>
      <title>Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7162556#M8606</link>
      <description>&lt;P&gt;I'm trying to create an application that would allow a user to "grab" and "hold" a single part from a large CAD assembly. Basically snap the part to the Vive controller location on a button click, then duplicate the controller's translations and rotations while the button is held so the user can manipulate and inspect the part in an intuitive manner.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I am having is that in the imported CAD assemblies, the "center" of the individual parts rarely in coincident with the geometry. When something is "grabbed," it will offset from controller location, sometimes by a significant amount, and rotations do not match the direction. I had&amp;nbsp;the same problems&amp;nbsp;when I made a similar application with OSG and VR Juggler many years ago, but every solution I used back then is not working VRED. I'm not sure if VRED handles matrices differently or if its just been too long since I've done this sort of thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems like this should be relatively standard, simple functionality - what is best practice for accomplishing it? My one caveat is that it must be done programmatically as these assemblies are many thousands of parts and it's just feasible to go through and make manual adjustments on every part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 18:10:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7162556#M8606</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T18:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7163818#M8607</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you look at the following commands already:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;getWorldTransform()&lt;/LI&gt;&lt;LI&gt;getBBCenter()&lt;/LI&gt;&lt;LI&gt;setPivot(index, point, x, y, z)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think with a combination of those you should be able to achieve what you are trying to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of yourse you could also unshare all part instances in your assembly and flush all transforms (via the optimize module). Then all parts should&amp;nbsp;be centered when you grab them.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 07:35:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7163818#M8607</guid>
      <dc:creator>Florian_Hilmer</dc:creator>
      <dc:date>2017-06-20T07:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7165081#M8608</link>
      <description>&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried setting the rotation pivot of the node to the node's bounding box center but have had no luck. I've used other commands, though, not setPivot(). I'm not clear on what the index input to that function is supposed to be.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just tried to run the optimizer as suggested, it does not seem to have effected the location of the geometry relative to the Vive controller when the part is set to the controller coordinates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any other ideas?&amp;nbsp;&amp;nbsp;Assuming you had properly centered objects, how would you go about "grabbing" them and tying them to the controller location? It's possible its my method for doing that that's faulty.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 15:28:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7165081#M8608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-20T15:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7194234#M8609</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think you can solve the Problem with&amp;nbsp;getBoundingBoxCenter() and getWorldTransform(). With these two informations you can calculate the Transformation matrix between the coordinate system of the&amp;nbsp;part and the position of the bounding box. Then you can transform the part position to the boundingbox position.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have implemented something similar, but the part is not snapping to the controlers Position. It is keeping its relative Position to the controler when the controler is moved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Jochen&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 08:29:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7194234#M8609</guid>
      <dc:creator>j.kaestle</dc:creator>
      <dc:date>2017-06-30T08:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7195369#M8610</link>
      <description>Thanks for the reply.&lt;BR /&gt;I've moved to a relative movement method like you described rather than the snap method I described in my original post. It works great for translation, but I'm having some really bizarre issues with rotation. I get the frame-to-frame rotation of the wand and apply it to the part I've grabbed, but axes of rotation don't always match between the part and the controller. I'm setting the part's rotation pivot the origin of the controller and the part's rotation orientation equal to the rotation orientation of the controller. Some parts work just fine, some work just fine if you grab them with the wand oriented the right way, and others will have misaligned axes no matter what. I'm having a really hard time finding a pattern or identifying what I'm overlooking. How are you tying the part rotation to controller rotation?&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Jun 2017 14:57:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7195369#M8610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-30T14:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7199843#M8611</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not surprised that you have some trouble with the rotation. To implement this functionality is not so easy. The best way is not to set translation and rotatipn seperately, but to calcalute it with Matrix operations.&lt;/P&gt;&lt;P&gt;I do it like this:&lt;/P&gt;&lt;P&gt;1. I read the controlers world transformation&lt;/P&gt;&lt;P&gt;2. I read the parts world transformation&lt;/P&gt;&lt;P&gt;3. I calculate the transformation Matrix&amp;nbsp; controler-&amp;gt;part (relative Position controler-part)&lt;/P&gt;&lt;P&gt;4. I read the world transformation of the parts parent node&lt;/P&gt;&lt;P&gt;5. When the controler is moved, i read the controlers new world transformation&lt;/P&gt;&lt;P&gt;6. I calculate the new world Position of the part with the transformation Matrix from step 3&lt;/P&gt;&lt;P&gt;7. unfortunately I cannot apply this Position directly to the part. So I calculate with the transformation Matrix of the parent node and the new Position of the part the new (lokal) transformation Matrix parent node-&amp;gt;part and apply it to the part&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do all these steps you must be familiar with Matrix calculations and transformation of coordinates.&lt;/P&gt;&lt;P&gt;To make the calculations in Python easier, I use Numpy. Ist a module with numerical functions. It's not included in VRED by default:&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/vred-forum/python-of-vred-with-library-numpy/td-p/6677176" target="_blank"&gt;https://forums.autodesk.com/t5/vred-forum/python-of-vred-with-library-numpy/td-p/6677176&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I check, if I can create a simple Scene for you, so you can reproduce it.&lt;/P&gt;&lt;P&gt;If somebody knows an easier/better way to do it, please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jochen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 08:06:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7199843#M8611</guid>
      <dc:creator>j.kaestle</dc:creator>
      <dc:date>2017-07-03T08:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7209508#M8612</link>
      <description>&lt;P&gt;Thank you Jochen! Unfortunately my VR rig got carted off to a conference for demos so I won't be able to test until mid-late next week, but that makes a lot of sense and I think it should work. If you're able to provide that sample scene without wasting too much of your time that would be fantastic.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 14:42:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7209508#M8612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-06T14:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7215868#M8613</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;here is my Scene. Maybe it's not programmed the best way (I am not a trained programmer), but it's working fine for me.&lt;/P&gt;&lt;P&gt;As written above, you must add numpy to Python (described in the link above).&lt;/P&gt;&lt;P&gt;One more remark: It's only working with Transform Nodes, not with geometry nodes. Means you Need a transform-parent-node for the geometry you want to grab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jochen&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 07:47:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/7215868#M8613</guid>
      <dc:creator>j.kaestle</dc:creator>
      <dc:date>2017-07-10T07:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/8056448#M8614</link>
      <description>&lt;P&gt;it seems like it grabbing everything is there away to tell it not to grab things u dont want it to?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 16:36:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/8056448#M8614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-08T16:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/8059317#M8615</link>
      <description>&lt;P&gt;You can check the name of the grabbed node. That's the way we do it. When importing geometry in our template, we add an extention to the node names&amp;nbsp;to have unique names. Only nodes with this Extension will be moved.&lt;/P&gt;&lt;P&gt;A second possibility is to add a tag to the nodes and check the tag (see the Autodesk Teleport example for walkable geometry). May be there are some more possibilities.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 07:36:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/8059317#M8615</guid>
      <dc:creator>j.kaestle</dc:creator>
      <dc:date>2018-06-11T07:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/8062301#M8616</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response. I have the same problem but very little python script knowledge.&amp;nbsp;Is there anyway you could show me an example of how to add extension tag and checking script to the previous script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 10:49:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/8062301#M8616</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-12T10:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing objects in a scene with Open VR Controller</title>
      <link>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/8818378#M8617</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;it's been a while since the beginning of this forum, but I'm using the script and i customized it according to my needs. But now I have the following questions:&lt;BR /&gt;- is there any way to activate / deactivate the ability to move objects generally (in few words, activate/deactivate the script)?&lt;BR /&gt;- Is it possible to have feedback when two objects collide with each other?&lt;BR /&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 13:09:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/grabbing-objects-in-a-scene-with-open-vr-controller/m-p/8818378#M8617</guid>
      <dc:creator>sergio.carena</dc:creator>
      <dc:date>2019-05-28T13:09:50Z</dc:date>
    </item>
  </channel>
</rss>

