I am trying to turnoff a robot arm through VR HMI by connecting the signals through an additional “PowerSignal” signal. I programmed “IsEnabled” property to reflect the status of the button … thinking that it would stop the robot’s operations/routine altogether.
Is my judgement right? If yes, what do you think is causing the error?
Expected Behaviour: red robot stops moving when the button is clicked
Current Behaviour: red robot continues working regardless of the button’s state
Visual Components Version: 4.5 Premium
07-02.vcmx (1.3 MB)
Action Script for HH30L #4 (My code starts after the comment “define the powerSignal”):
# Action Script v. 2021-08-16 (yyyy-mm-dd)
#
# Generic Action (grasp,release,mount,unmount,traceon,traceoff, sweptvolumeon, sweptvolumeoff) execution
# by triggering a specific robot output with a specific value
# Default Signal mapping:
# signals 01...16: grasp/release
# signals 17...32: trace_on/trace_off
# signals 33...48: mount_tool/unmount_tool
# signals 49...80: trace_extTCP_on/trace_extTCP_off
# signal 81: swept_volume_on/swept_volume_off
#
from vcScript import *
import vcVector
import vcMatrix
global grasp_association
from collections import defaultdict
comp = getComponent()
app = getApplication()
sim = getSimulation()
normal_vec = vcVector.new(0,0,1)
default_detection_volume = vcVector.new(50,50,50)
EPSILON = 10e-5
controller_flange_node = None
flange_node_tool_interface = None
detection_volume_tool = None
detection_volume_tools_list = []
ignore_as_release_target_filter_props = ['ExcludeRobotReleasingTo']
ignore_as_grasp_object_filter_props = ['ExcludeRobotGrasping']
# Define the powerSignal
signal = getComponent().getBehaviour("PowerSignal")
if signal.Value == False:
IsEnabled = True
else:
IsEnabled = False
.
.
.
.