Today I ran the cameracalibrator configuration file. I had to make some modifications to it due to the node I am using to communicate with the camera.
First, I verified that the camera's topics were being published.
$rostopic list
/usb_cam/camera_info
/usb_cam/image_raw
I then modified the node in the cameracalibrator.py file:
In line 128 instead of camera node we place usb_cam node:
self.set_camera_info_service = rospy.ServiceProxy("%s/set_camera_info" % rospy.remap_name("camera"), sensor_msgs.srv.SetCameraInfo)
self.set_camera_info_service = rospy.ServiceProxy("%s/set_camera_info" % rospy.remap_name("usb_cam"), sensor_msgs.srv.SetCameraInfo)
In line 100 as well:
for svcname in ["camera", "left_camera", "right_camera"]:
for svcname in ["usb_cam", "left_camera", "right_camera"]:
Now, in order to run the cameracalibrator node we must specify the topics we are using:
$rosrun camera_calibration cameracalibrator.py --size 6x4 --square 0.0508 image:=/usb_cam/image_raw camera:=/usb_cam
Here is a screenshot of the program's functionality:
No hay comentarios:
Publicar un comentario