Hello, I’m trying to read AprilTags from a camera and get the distance using the AprilTag.detect method. I need the camera intrinsics for this operation, but I don’t know how to obtain them. Currently, my code looks like this:
self.jetbot = world.scene.add(
WheeledRobot(
prim_path=Constants.JETSON_PRIM_PATH,
wheel_dof_names=["left_wheel_joint", "right_wheel_joint"]
)
)
self.controller = DifferentialController(
name="simple_control", wheel_radius=0.03, wheel_base=0.1125)
self.camera = Camera(prim_path=Constants.CAMERA_PRIM_PATH,
frequency=20,
resolution=Constants.IMAGE_RESOLUTION)
self.camera.initialize()
After I retrieve the camera from the stage, I need to calibrate it and capture a clear image to detect the tags on the plane. I attempted to acquire these intrinsics by using chessboard calibration and also by calculating them from the camera attributes, but the distance obtained by the AprilTag method is always incorrect. I also tried following the steps in this documentation page:
However, I don’t know where to get the width, height, and camera_matrix. Thank you!