07-26-2023, 12:22 PM
Hello,
when i work with the real robot, and not the Simulation, i am not able to recieve an output.
My Question now is how can i run my script, and output the "prints" on the screen, while running the program live on the robot? When i simulate the Program it works just fine.
the function that should output is :
def record_position_callback():
while callback_running:
# Get the current position of the robot
robot = RDK.Item('KUKA KR 16 2')
# Print the current position
data = robot.Pose().Pos()
print("Robot Position:", data)
data = RDK.LaserTracker_Measure()
print("Laser Position:", data)
# Wait for the specified interval
time.sleep(0.01) # 10 ms
when i work with the real robot, and not the Simulation, i am not able to recieve an output.
My Question now is how can i run my script, and output the "prints" on the screen, while running the program live on the robot? When i simulate the Program it works just fine.
the function that should output is :
def record_position_callback():
while callback_running:
# Get the current position of the robot
robot = RDK.Item('KUKA KR 16 2')
# Print the current position
data = robot.Pose().Pos()
print("Robot Position:", data)
data = RDK.LaserTracker_Measure()
print("Laser Position:", data)
# Wait for the specified interval
time.sleep(0.01) # 10 ms