Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Targeting from Camera Intel d435 Realsense
#3
You should first calibrate the position of the camera in your cell.
For example, you can add a new coordinate system called "Camera Eye" that represents the position of the camera.

Are you holding the camera with the robot? If so, you should properly place the camera with respect to the robot (also known as Hand-eye calibration).

If the camera is static you could take 3 or more reference points to position your camera (common points for the camera and the robot).

For example, to retrieve the absolute XYZ coordinates of a target you can do something like this:
Code:
# Get the camera coordinate system item
camera_eye = RDK.Item("Camera Eye")

# Calculate absolute XYZ position clicked from the camera in absolute coordinates:
xyz_camera = [depth_point[0], depth_point[1], depth_point[2]]
xyz_abs = camera_eye.PoseAbs()*xyz_camera
You can then move to this position doing something like this:
Code:
# Take the current robot position as a full pose (you can then use this orientation)
target_pose = robot.Pose()

# Calculate absolute target coordinates (world/common reference frame)
#target_pose_abs = target.Parent().PoseAbs() * target_pose
target_pose_abs = target.PoseAbs () #previous line does the same

# Force XYZ absolute coordinates for this pose (with respect to the World reference frame)
target_pose_abs.setPos(xyz_abs)

# Set the pose of the target given the absolute position (the relative target is calculated accordingly)
target.setPoseAbs(target_pose_abs)

# Move to the target
robot.MoveJ(target)


Messages In This Thread
RE: Targeting from Camera Intel d435 Realsense - byAlbert- 12-09-2019, 08:29 PM



Users browsing this thread:
1 Guest(s)