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
Mostrando entradas con la etiqueta usb_cam. Mostrar todas las entradas
Mostrando entradas con la etiqueta usb_cam. Mostrar todas las entradas
miércoles, 16 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, 12 de enero de 2011
usb_cam and rviz compilation
While I am waiting for the Logitech Pro 9000 camera to arrive I am provisionally working with an IBM webcam.
Today I installed and compiled the usb_cam package created by bosch.
The repository was taken from the following source: https://bosch-ros-pkg.svn.sourceforge.net/svnroot/bosch-ros-pkg/trunk/stacks/bosch_drivers/usb_cam
And the only trouble I went through during compilation was the following message: mkdir: cannot create directory `build': Permission denied
This problem was solved by changing the permissions of the directory using chmod as follows:
$ sudo chmod ugo+rwx usb_cam
Aftewards, I tested rviz's execution (since I am using a new laptop because my own is going through some BIOS dilemmas... long story...). And while i was compiling I got the following error:
Caught exception while loading: OGRE EXCEPTION(7:InternalErrorException)
It was easily solved by installing some of the missing packages of my video card:
$ nvidia-cg-toolkit-installer --install
I am currently trying to recover the configuration of my laptop without losing any data in order to continue with my navigation tasks. Meanwhile I am starting to make some tests with the mentioned camera.
Today I installed and compiled the usb_cam package created by bosch.
The repository was taken from the following source: https://bosch-ros-pkg.svn.sourceforge.net/svnroot/bosch-ros-pkg/trunk/stacks/bosch_drivers/usb_cam
And the only trouble I went through during compilation was the following message: mkdir: cannot create directory `build': Permission denied
This problem was solved by changing the permissions of the directory using chmod as follows:
$ sudo chmod ugo+rwx usb_cam
Aftewards, I tested rviz's execution (since I am using a new laptop because my own is going through some BIOS dilemmas... long story...). And while i was compiling I got the following error:
Caught exception while loading: OGRE EXCEPTION(7:InternalErrorException)
It was easily solved by installing some of the missing packages of my video card:
$ nvidia-cg-toolkit-installer --install
I am currently trying to recover the configuration of my laptop without losing any data in order to continue with my navigation tasks. Meanwhile I am starting to make some tests with the mentioned camera.
Suscribirse a:
Entradas (Atom)

