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

Physical UR5 does not mimic movements of simulated UR5

#1
Hi there, i have trouble getting the physical robot when the simulated robot moves.
Both the simulated robot is a UR5, and the physical robot is also a UR5.

I have established connection between the two such that the "Connection Status" bar is colored green and writes "Ready"

   

I can get the "Get Position" from the button inside the "Connection to UR5" just fine, and i can even move the physical robot my moving the joints of the simulated robot and pressing "Move Joints", then the physical robot will mimic the position of the simulated robot.

However, when i inside my Python script call the a method such as MoveL() or MoveJ(), nothing happens with the physical robot, only the simulated robot will move. 

I am running an external control script on the ur5.

Then when the movement has stopped executing inside the simulation, i can once again move to robot to that given position using the "Move Joints" command inside Robodk.

So it seems that there is a stable connection between the robot and RoboDK, but for some reason the physical robot does not act on the MoveJ, MoveL etc.

Anyone got any idea why this might be?
#2
You should trigger a call to robot.Connect() to force sending the robot motion commands and other instructions to the real robot and not the simulated one.

Example:
Code:
# Connect to the robot using default IP
success = robot.Connect()  # Try to connect once
#success robot.ConnectSafe() # Try to connect multiple times
status, status_msg = robot.ConnectedState()
if status != ROBOTCOM_READY:
    # Stop if the connection did not succeed
    print(status_msg)
    raise Exception("Failed to connect: " + status_msg)

# This will set to run the API programs on the robot and the simulator (online programming)
RDK.setRunMode(RUNMODE_RUN_ROBOT)


You can find more information and examples here:
  




Users browsing this thread:
1 Guest(s)