Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Target is not reachable

#1
I want to take the inputs using root Tk() so I can make a target where the robot to move to do the necessary moves while it creates the target it show me that the target is not reachale which is not true because manually it can reach every point it needs to do all the work . This is the code for x,y,z inputs and this is the "error".

Code:
def RunProgram(x, y, z):
    # Use default global variables
    global PROGRAM_NAME
    global APPROACH
    global RADIUS
    global SPEED_WELD
    global SPEED_MOVE
    global SIDES
    global DRY_RUN
    global RUN_MODE
   
   
    RDK = Robolink()
    robot = RDK.Item('Comau Smart5 NJ 110-3.0', ITEM_TYPE_ROBOT)
    home = RDK.Item('Home')
    #target = RDK.Item('Target 1')
    target = RDK.AddTarget('Target1')
    target.setPose(transl(x, y, z))
    robot.MoveJ(target)


Attached Files Thumbnail(s)
   
#2
You are not specifying the orientation with the target you are creating.

You can try taking the orientation of your home target like this:
Code:
home = RDK.Item('Home')
target = RDK.AddTarget('Target1')
target_pose = home.Pose() # Create a copy of your home target
target_pose.setPos([x, y, z]) # Update the XYZ coordinates
target.setPose(target_pose) # Update the pose target
robot.MoveJ(target)
#3
ok thanks it works perfectly fine
#4
Great, thank you for your feedback.
  




Users browsing this thread:
1 Guest(s)