Grab and move objects with vrhands?

Grab and move objects with vrhands?

patrik7LNB2
Contributor Contributor
3,405 Views
17 Replies
Message 1 of 18

Grab and move objects with vrhands?

patrik7LNB2
Contributor
Contributor

Researching if it would be possible to in VRED to grab and move (transform) objects with VR hands in a natural way.

I know how to move objects with the laser, but actually grabbing and moving them is so much more intuitive.

Has anyone actually succeeded in doing this in VRED in a good way?

 

I was thinking to maybe set the object to be moved as a child/constrained to the touching VRhand with a sensor-Vset, but is that the best way?

 

Any thoughts? 🙂

0 Likes
3,406 Views
17 Replies
Replies (17)
Message 2 of 18

patrik7LNB2
Contributor
Contributor

Sorry, double post on the same subject. Mod can remove/hide this one if possible. Sorry again.

0 Likes
Message 3 of 18

vredeye
Enthusiast
Enthusiast

interested in the same topic , where is the double post ? 

0 Likes
Message 4 of 18

vredeye
Enthusiast
Enthusiast

i know that we can use controllers to control the functionalities in vred, what are the possibilities to do the same with hand gestures ? is this possible with the vred apis exisitng currently ? 

0 Likes
Message 5 of 18

__daniel.lincoln__
Alumni
Alumni

Hello,

 

Yes, it's possible by utilizing the 'getPinchStrengh' method along with constraints, collisions and timers.

 

See:

https://help.autodesk.com/view/VREDPRODUCTS/2025/ENU/?guid=VRED_Python_Documentation_Python_API_V2_c...

 

 

Message 6 of 18

vredeye
Enthusiast
Enthusiast
thanks will check
0 Likes
Message 7 of 18

Anonymous
Not applicable

tried to get this  vrdTrackedHand

getPinchStrength() but get an error that , it requires a parameter but i see in the api documentation , this function just returns a value 

is there any example in the examples , i couldnt find any though 

 

0 Likes
Message 8 of 18

__daniel.lincoln__
Alumni
Alumni

Hi, here is an example.

 

# Check RH pinch strength - while virtual hands are in view of HMD

rh_tracked = vrDeviceService.getRightTrackedHand()
print(rh_tracked.getPinchStrength())
Message 9 of 18

Anonymous
Not applicable

using pico headset with vred , in pico headset there is standard handtracking setting. if we enable it i assume it will work for vred ? or do we need to program the grabbing of objects manually with python ? any tips ?

0 Likes
Message 10 of 18

__daniel.lincoln__
Alumni
Alumni

My example was for the Varjo XR-3 HMD which has integrated hand tracking functionality.
I don't have experience with Pico headsets, but the link below has some tips for Setting up Hand Tracking for Other Devices.

https://help.autodesk.com/view/VREDPRODUCTS/2025/ENU/?guid=VRED_Preferences_ER_Interaction_Preferenc...

0 Likes
Message 11 of 18

Eduardt_AlbergEZ998
Participant
Participant

I implemented something like this for handtracking and controllers before. I had to struggle with the hierarchy of the nodes. Because when you want to move a wheel and you select it with the laserpointer, you maybe select a screw and then you have to go up the hierarchy until you selected the whole wheel. It was easy to do this with the controllers with the touchpad, but with handtracking you need to control the hierarchy with a extra menu. You can also prepare your scene so that there are no hierarchy problems. I can help you, if you want to implement something like that. 

0 Likes
Message 12 of 18

Anonymous
Not applicable

thanks for that , this doesnt work for pico controllers , i think i need to find out why 

0 Likes
Message 13 of 18

Eduardt_AlbergEZ998
Participant
Participant

Which Pico device do you have? I'm thinking about implementing custom hand tracking for the Quest 3, maybe the implementation will also work for the Pico glasses.

0 Likes
Message 14 of 18

kpmkhajaC26TK
Community Visitor
Community Visitor

I have PICO 4 Enterprise version

0 Likes
Message 15 of 18

Anonymous
Not applicable

Hi. the gifs you have attached , i am able to do the hand movements separately with pico controller.

but how is it possible to do this with python vred ? i couldnt see any examples in vred examples. ?

do we use external apis like ultraleap ? or opencv ?

I was able to do the handtracking very easily with opencv

 

the sample code i am able to do the control like sectioning with the controllers ( pico controller 4 ) but not able to connect the blue hands ( currently these dont move )  i.e i assume i have to connect the coordinates of the controllers to the left and right hand i assume. , see pic

 

kpmkhaja_0-1727318185022.png

 

0 Likes
Message 16 of 18

vredeye
Enthusiast
Enthusiast

finally looks like getPinchStrength was not working in Pico but did work in Varjo headset , thanks.

any idea if getPinchStrength which returns if the object is grabbed or not , the base vrdTrackedHand , does it return the world coordinates ? like the controller coordiantes from vrOpenVRController.getWorldMatrix ?

0 Likes
Message 17 of 18

gm1
Community Visitor
Community Visitor

Hi

 

I see that getpinchstrength works for pinch and move any object. But I see it holds to the middle of the object. 

 

Is there a way to make it pinch at end of the object? Imagine I have a object which looks like a flat plate rectangular I want to pinch and move at beginning of the plate

Thanks 

0 Likes
Message 18 of 18

extern.Sanju.Mathew
Contributor
Contributor

I am using VIVE headset and controller and using it for Object Move in VRED.
I am trying to grab and move the object using parent constrain code given as sample.

I just want to make a modification to this code by grabbing it from the same rotation orientation as I left it in the last grab. Somehow I am unable to achieve my objective and while using this code the delete constraint is not working and object gets stuck to the controller. Is there a way grab the object, then rotate it and leave it and grab it from the new rotated orientation?

 

Below is my code and I have modified def stopMove() function to flush rotation optimizations in the below code.

r = self.node.getRotationAsEuler()
vrOptimize.flushRotations(self.node)
self.node.setRotationAsEuler(r)

 

 

class ObjectAttacher():
def __init__(self):
self.moverEnabled = False
self.createMenu()
self.node = None
def startMove(self,action,device):
self.node = self.getMovable(device.pick().getNode())
if not self.node.isNull():
vrSessionService.addNodeSync(self.node)
self.constraint = vrConstraintService.createParentConstraint([device.getNode()],self.node,False)
def stopMove(self, action, device):
if self.node is not None and not self.node.isNull():
r = self.node.getRotationAsEuler()
vrOptimize.flushRotations(self.node)
self.node.setRotationAsEuler(r)
vrSessionService.removeNodeSync(self.node)
vrConstraintService.deleteConstraint(self.constraint)
def createMenu(self):
self.tool = vrImmersiveUiService.createTool("CustomObjectAttacher")
self.tool.setText("Attach")
self.tool.setCheckable(True)
self.tool.setChecked(True)
self.tool.setOnOffIconData(onIcon, offIcon)
self.tool.signal().checked.connect(self.enableMover)
self.tool.signal().unchecked.connect(self.disableMover)
def deleteMenu(self):
vrImmersiveUiService.deleteTool(self.tool)
def enableMover(self):
if not self.moverEnabled:
pointer = vrDeviceService.getInteraction("Pointer")
start = pointer.getControllerAction("start")
start.signal().triggered.connect(self.startMove)
execute = pointer.getControllerAction("execute")
execute.signal().triggered.connect(self.stopMove)
self.moverEnabled = True
def disableMover(self):
if self.moverEnabled:
pointer = vrDeviceService.getInteraction("Pointer")
start = pointer.getControllerAction("start")
start.signal().triggered.disconnect(self.startMove)
execute = pointer.getControllerAction("execute")
execute.signal().triggered.disconnect(self.stopMove)
self.moverEnabled = False
def getMovable(self,node):
while not node.isNull():
print((node.getName()))
if node.getName().startswith("Movable"):
return node
node = node.getParent()
return node

mover = ObjectAttacher()

0 Likes