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:
Buscar este blog
miércoles, 16 de febrero de 2011
lunes, 14 de febrero de 2011
Error message with Genius webcam
I was provided a new webcam to work with. It is a Genius Slim 1322AF. When trying to run usb_cam node (on dev/video1) I get the following error message:
VIDIOC_S_FMT error 22, Invalid argument
I have tested it on Ubuntu's Cheese Webcam Booth application and it works fine so I don't think the problem lays on the driver.
I am very tired... and haven't found any satisfying answer on linux forums so I'm just going to ask someone on ROS' mailing list.
VIDIOC_S_FMT error 22, Invalid argument
I have tested it on Ubuntu's Cheese Webcam Booth application and it works fine so I don't think the problem lays on the driver.
I am very tired... and haven't found any satisfying answer on linux forums so I'm just going to ask someone on ROS' mailing list.
domingo, 6 de febrero de 2011
jueves, 3 de febrero de 2011
Running usb_cam node
I have created a launch file with the help from this guide: http://www.princeton.edu/~ctralie/Projects/DukeDusty2/Tutorial/
Note: /dev/video0 is the device of the integrated webcam of my laptop and /dev/video1 is the device of the Logitech Quickcam I am currently using.
When running this launch file with the /dev/video0 device I can successfully visualize video on rviz. However, a status error is displayed:
CameraInfo/P resuted in an invalid position calculation (nans or infs)
According to ROS users, I should calibrate my camera in order to avoid this error. I had no idea on how to do so until I found this tutorial:
http://www.ros.org/wiki/camera_calibration/Tutorials/MonocularCalibration. I hope this does the trick.
miércoles, 2 de febrero de 2011
Reconfiguring sicklms node
Well, after reinstalling everything in my computer and losing all my backup data (I dropped my external hard drive ¬¬), I have ROS running again.
I had some issues while configuring the sicklms node. I downloaded the original code from a ROS repository and the following error was being displayed:
A scan was probably missed. The last scan was 0.10704 seconds ago. sicklms.
I sent my inquiry to the mailing list and this was the answer.
"See https://code.ros.org/trac/ros-pkg/ticket/4673 for a ticket about that warning. How is your SICK connected to the computer? RS232 or RS422? With or without a USB->Serial adapter? At what rate should you be getting scans from the LIDAR as currently configured? 10Hz?
Is the SICK driver set to less than one degree of angular resolution? I only see this warning with my LMS291's when they are set to 0.5 degree angle increments. With 1 degree increments the warning is not output."
So I downloaded the code that the SSC Rovers team uses for the sicklms and it, i fact, had some differences with the degree angle increments.
}
if (inverted) {
scan_msg.angle_min = M_PI/2;
scan_msg.angle_max = -M_PI/2;
} else {
scan_msg.angle_min = -M_PI/2;
scan_msg.angle_max = M_PI/2;
}
scan_msg.angle_increment = (scan_msg.angle_max - scan_msg.angle_min) / (double)(num_values-1);
scan_msg.scan_time = scan_time;
scan_msg.time_increment = scan_time / (double)(num_values-1);
scan_msg.range_min = 0;
if (scale == 0.01) {
scan_msg.range_max = 81;
}
else if (scale == 0.001) {
scan_msg.range_max = 8.1;
}
if (inverted) {
scan_msg.angle_min = M_PI/2;
scan_msg.angle_max = -M_PI/2;
} else {
scan_msg.angle_min = -M_PI/2;
scan_msg.angle_max = M_PI/2;
}
scan_msg.angle_increment = (scan_msg.angle_max - scan_msg.angle_min) / (double)(num_values-1);
scan_msg.scan_time = scan_time;
scan_msg.time_increment = scan_time / (double)(num_values-1);
scan_msg.range_min = 0;
if (scale == 0.01) {
scan_msg.range_max = 81;
}
else if (scale == 0.001) {
scan_msg.range_max = 8.1;
}
Suscribirse a:
Entradas (Atom)