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

Controlling OnRobot Eyes Camera with Python in RoboDK

#1
Hi everyone,

I'm currently working on a JAKA Zu7 robot with an OnRobot RG6 gripper and an OnRobot Eyes camera.

At the moment, I'm controlling the robot movements and the RG6 gripper successfully using Python scripts both in RoboDK and actual. My next goal is to integrate the OnRobot Eyes camera into my Python workflow.

I would like to know:
  • Is it possible to control the OnRobot Eyes camera directly from a Python script?
  • Is there a Python API or SDK available for the camera?
  • How can I trigger an image capture or object detection from Python?
  • Once an object is detected, how can I retrieve its pick coordinates (X, Y, Z and orientation) so that I can send them to RoboDK and move the robot to pick the object?
  • Has anyone integrated the OnRobot Eyes camera with RoboDK while controlling everything through Python?

I've gone through the OnRobot Learning courses and documentation but couldn't find any examples showing Python integration with the OnRobot Eyes camera.

If anyone has experience with this setup or can point me to relevant documentation, example code, or a recommended workflow, I would really appreciate your help.

Thank you!
#2
You can simulate cameras with RoboDK using the UI and the API. You can find the documentation here:
https://robodk.com/doc/en/Computer-Vision.html

And some examples using the Python API here:
https://robodk.com/doc/en/PythonAPI/exam...#camera-2d

We don't have an official integration with OnRobot Eyes, however, you can simulate any camera using RoboDK as shown in the examples. You can trigger taking pictures from the API and process them to obtain the desired information such as the pick coordinates etc.
#3
Hi Albert, thank you for you response. I have configured the OnRobot camera. I just want to know how can I read digital input pins of the robot controller. I can set the digital outputs but when I'm reading digital inputs it's stucking somewhere in between. What I have done is that I'm trigger the camera by set DO 3 and then I have to read DI2 to decide whether the object is detected or not. I have attachted the code below for reference.

Code: Use waitDI() command
Code:
from robolink import *
from robodk import *

# ==========================================
# CONNECT TO ROBODK
# ==========================================
RDK = Robolink()

robot = RDK.Item('JAKA Zu7', ITEM_TYPE_ROBOT)

if not robot.Valid():
    raise Exception("JAKA Zu7 robot not found.")

# ==========================================
# TRIGGER VISION SYSTEM
# ==========================================
print("Triggering vision system...")

# Set DO3 HIGH
robot.setDO(3, 1)

# Wait up to 5 seconds for DI1 to become HIGH
if robot.waitDI(2, 1, 5000):
    print("Needle detected.")
else:
    print("No needle detected.")

# Reset DO3
robot.setDO(3, 0)

print("Finished.")
#4
I noticed you posted a new thread to cover the issue with the Jaka Driver and IOs. We'll get back to you here:
https://robodk.com/forum/Thread-Unable-t...from-getDI

By the way, are you using the latest version? Note that we made some improvements to the Jaka driver recently.
#5
I'm using v5.7.5 with educational license activated
  




Users browsing this thread:
1 Guest(s)