WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   ** ERROR: Link failed (source linkable is invalid) (https://forum.worldviz.com/showthread.php?t=4377)

mhead10 10-02-2012 02:34 PM

** ERROR: Link failed (source linkable is invalid)
 
What does the following error mean (I cannot find much help on the issue):

** ERROR: Link failed (source linkable is invalid)

this happens when I try to load a .dae file (which does load if it's the only code)

Code:

def openGrasp():
        global marker
        global link_1
        global devices
        global link_2
        global ob
               
        if link_2:
                link_2.remove()
                link_2 = None
                link_1.remove()
                link_1 = None
                marker.remove()
                pos = device.getPosition()
                rot = device.getQuat()
                print 'openGrasp1'
                marker = viz.add('open_babcock.dae')
                marker.translate(pos)
                marker.rotatequat(rot)
                marker.setScale(0.8,0.8,0.8)
                link_1 = viz.link(device,marker)
               
        else:
                link_1.remove()
                link_1 = None
                marker.remove()
                pos = device.getPosition()
                rot = device.getQuat()
                print 'open babcock2'
                marker = viz.add('open_babcock.dae')
                marker.translate(pos)
                marker.rotatequat(rot)
                marker.setScale(0.8,0.8,0.8)
                link_1 = viz.link(device,marker)

openGrasp()

The interactive display is as follows:
Code:

open babcock2
Loading File: open_babcock.dae
** ERROR: Link failed (source linkable is invalid)

Thank you in advance for any help.

Frank Verberne 10-03-2012 01:21 AM

Looking at the error, it specifies that there is some problem with the linking of the source object and the destination object, specifically with the source. Your source is device, which is (presumably) defined outside of the code you've provided. The error occurs because the source object 'device' is not known in your function, or is not a linkable object. I'm curious what values 'pos' and 'rot' have in your function, seeing as they also use the object 'device'.

mhead10 10-04-2012 01:18 PM

For some reason, my firewire card (connected to phantom omni's from sensable) has to be plugged in (even though I'm not using the omni joystick) for my code to not produce the previous error. I'm not currently sure why they have to be plugged in since initially I was able to run the code without them being plugged in.

If I don't have the omni's plugged in, I get the following error:
Code:

** ERROR: Failed to connect to haptic device (Invalid value specified for a function that is attempting to set a value.)
** ERROR: Failed to create extension sensor with sensable3.dle
** ERROR: Flagged linkable failed (linkable is invalid)
Loading File: open_babcock.dae
** ERROR: Link failed (source linkable is invalid)

My device code is:
Code:

sensable = viz.add('sensable3.dle')
device = sensable.addHapticDevice()
device.workspace.setScale([100,100,100])
device.workspace.setPosition([0,0,0])

marker = viz.add('open_babcock.dae', pos=[0, -15, 5], euler=[0,300,0],scale=[.8,.8,.8])
link_1 = viz.link(device,marker)
link_2 = None

If I have my firewired card plugged into my laptop, then my code runs fine.


All times are GMT -7. The time now is 08:43 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC