diff --git a/camera_calibration/doc/api.rst b/camera_calibration/doc/api.rst new file mode 100644 index 000000000..b898197c5 --- /dev/null +++ b/camera_calibration/doc/api.rst @@ -0,0 +1,8 @@ +API Documentation +================= + +.. autoclass:: camera_calibration.calibrator.MonoCalibrator + :members: + +.. autoclass:: camera_calibration.calibrator.StereoCalibrator + :members: diff --git a/camera_calibration/doc/changes.rst b/camera_calibration/doc/changes.rst new file mode 100644 index 000000000..264172a21 --- /dev/null +++ b/camera_calibration/doc/changes.rst @@ -0,0 +1,12 @@ +Changelog Notes +=============== + +Jazzy Jalisco +------------- +There are several major change between ``Iron`` and ``Jazzy``: + + * All components now properly support ``image_transport`` parameter. + * All components now properly support remapping the ``camera_info`` topic + for an associated ``image`` topic. For instance, if you remap ``image`` + to ``my/image`` then ``my/camera_info`` will be used. Previously you + would have to manually remap the ``camera_info`` topic. diff --git a/camera_calibration/doc/components.rst b/camera_calibration/doc/components.rst new file mode 100644 index 000000000..ec01c7bc3 --- /dev/null +++ b/camera_calibration/doc/components.rst @@ -0,0 +1,52 @@ +Nodes +===== + +This package includes a number of ROS 2 components that can be assembled +into image processing pipelines. +See the tutorial :ref:`Launch image_proc Components`. + +Alternatively, each component can be run as a standalone node. + +camera_calibrator +----------------- +``cameracalibrator`` subscribes to ROS raw image topics, and presents a +calibration window. It can run in both monocular and stereo modes. +The calibration window shows the current images from the cameras, +highlighting the checkerboard. When the user presses the **CALIBRATE** +button, the node computes the camera calibration parameters. When the +user clicks **COMMIT**, the node uploads these new calibration parameters +to the camera driver using a service call. + +Subscribed Topics +^^^^^^^^^^^^^^^^^ + * **image** (sensor_msgs/Image): Raw image topic, for monocular cameras. + * **left** (sensor_msgs/Image): Raw left image topic, for stereo cameras. + * **right** (sensor_msgs/Image): Raw right image topic, for stereo cameras. + +Services Called +^^^^^^^^^^^^^^^ + * **camera/set_camera_info** (sensor_msgs/SetCameraInfo): Sets the camera + info for a monocular camera. + * **left_camera/set_camera_info** (sensor_msgs/SetCameraInfo): Sets the camera + info for the left camera of a stereo pair. + * **right_camera/set_camera_info** (sensor_msgs/SetCameraInfo): Sets the camera + info for the right camera of a stereo pair. + +camera_check +------------ +``cameracheck`` subscribes to ROS rectified image topics and their associated +camera_info, and prints out an error estimate. It can run in both monocular +and stereo modes. The program expects to see a standard checkerboard target. + +Subscribed Topics +^^^^^^^^^^^^^^^^^ + * **monocular/image** (sensor_msgs/Image): Rectified image topic, for + monocular camera. + * **monocular/camera_info** (sensor_msgs/CameraInfo): Camera info for + the monocular camera. + * **stereo/left/image** (sensor_msgs/Image): Rectified left image topic, + for stereo cameras. + * **stereo/right/image** (sensor_msgs/Image): Rectified right image topic, + for stereo cameras. + * **stereo/camera_info** (sensor_msgs/CameraInfo): Camera info for the + stereo pair. diff --git a/camera_calibration/doc/conf.py b/camera_calibration/doc/conf.py index 82ad7fe0b..c4e4bd79f 100644 --- a/camera_calibration/doc/conf.py +++ b/camera_calibration/doc/conf.py @@ -22,7 +22,13 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.pngmath'] +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.doctest', + 'sphinx.ext.coverage', + 'sphinx_rtd_theme', +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -40,12 +46,6 @@ project = 'camera_calibration' copyright = '2009, Willow Garage, Inc.' -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '0.1' # The full version, including alpha/beta/rc tags. release = '0.1.0' @@ -195,7 +195,6 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - 'http://docs.python.org/': None, - 'http://docs.scipy.org/doc/numpy' : None, - 'http://www.ros.org/doc/api/tf/html/python/' : None - } + 'python': ('http://docs.python.org/', None), + 'numpy': ('http://docs.scipy.org/doc/numpy', None) +} diff --git a/camera_calibration/doc/images/cal0006.png b/camera_calibration/doc/images/cal0006.png new file mode 100644 index 000000000..5c200944d Binary files /dev/null and b/camera_calibration/doc/images/cal0006.png differ diff --git a/camera_calibration/doc/images/cal0007.png b/camera_calibration/doc/images/cal0007.png new file mode 100644 index 000000000..be60a198b Binary files /dev/null and b/camera_calibration/doc/images/cal0007.png differ diff --git a/camera_calibration/doc/images/cal0008.png b/camera_calibration/doc/images/cal0008.png new file mode 100644 index 000000000..92b015980 Binary files /dev/null and b/camera_calibration/doc/images/cal0008.png differ diff --git a/camera_calibration/doc/images/cal0009.png b/camera_calibration/doc/images/cal0009.png new file mode 100644 index 000000000..ab54bc5d6 Binary files /dev/null and b/camera_calibration/doc/images/cal0009.png differ diff --git a/camera_calibration/doc/images/cal0011.png b/camera_calibration/doc/images/cal0011.png new file mode 100644 index 000000000..148fe8a4b Binary files /dev/null and b/camera_calibration/doc/images/cal0011.png differ diff --git a/camera_calibration/doc/images/cal0012.png b/camera_calibration/doc/images/cal0012.png new file mode 100644 index 000000000..2ac92be42 Binary files /dev/null and b/camera_calibration/doc/images/cal0012.png differ diff --git a/camera_calibration/doc/images/check-108.png b/camera_calibration/doc/images/check-108.png new file mode 100644 index 000000000..049268f9f Binary files /dev/null and b/camera_calibration/doc/images/check-108.png differ diff --git a/camera_calibration/doc/images/mono_0.png b/camera_calibration/doc/images/mono_0.png new file mode 100644 index 000000000..dd9776ddf Binary files /dev/null and b/camera_calibration/doc/images/mono_0.png differ diff --git a/camera_calibration/doc/images/mono_1.png b/camera_calibration/doc/images/mono_1.png new file mode 100644 index 000000000..d62132b31 Binary files /dev/null and b/camera_calibration/doc/images/mono_1.png differ diff --git a/camera_calibration/doc/images/mono_2.png b/camera_calibration/doc/images/mono_2.png new file mode 100644 index 000000000..fe46e5534 Binary files /dev/null and b/camera_calibration/doc/images/mono_2.png differ diff --git a/camera_calibration/doc/images/stereo_0.png b/camera_calibration/doc/images/stereo_0.png new file mode 100644 index 000000000..b8ee5c0a9 Binary files /dev/null and b/camera_calibration/doc/images/stereo_0.png differ diff --git a/camera_calibration/doc/images/stereo_1.png b/camera_calibration/doc/images/stereo_1.png new file mode 100644 index 000000000..74ac8d285 Binary files /dev/null and b/camera_calibration/doc/images/stereo_1.png differ diff --git a/camera_calibration/doc/images/stereo_2.png b/camera_calibration/doc/images/stereo_2.png new file mode 100644 index 000000000..804048ad9 Binary files /dev/null and b/camera_calibration/doc/images/stereo_2.png differ diff --git a/camera_calibration/doc/images/stereo_3.png b/camera_calibration/doc/images/stereo_3.png new file mode 100644 index 000000000..bff2f0b87 Binary files /dev/null and b/camera_calibration/doc/images/stereo_3.png differ diff --git a/camera_calibration/doc/images/stereo_4.png b/camera_calibration/doc/images/stereo_4.png new file mode 100644 index 000000000..31686519e Binary files /dev/null and b/camera_calibration/doc/images/stereo_4.png differ diff --git a/camera_calibration/doc/index.rst b/camera_calibration/doc/index.rst index 741e4e5b7..247d0dd9b 100644 --- a/camera_calibration/doc/index.rst +++ b/camera_calibration/doc/index.rst @@ -1,18 +1,138 @@ -camera_calibration -================== +Overview +======== -The camera_calibration package contains a user-friendly calibration tool, -cameracalibrator. This tool uses the following Python classes, which -conveniently hide some of the complexities of using OpenCV's calibration -process and chessboard detection, and the details of constructing a ROS -CameraInfo message. These classes are documented here for people who -need to extend or make a new calibration tool. +This package uses OpenCV camera calibration, described +`here `_. +For detailed information on the parameters produced by the calibration, see this +`description `_. -For details on the camera model and camera calibration process, see -http://docs.opencv.org/master/d9/d0c/group__calib3d.html +The code API listed for this package is for convenience only. +This package has no supported code API. -.. autoclass:: camera_calibration.calibrator.MonoCalibrator - :members: +For pinhole type cameras this package names the distortion model as **plumb_bob** +or **rational_polynomial**, depending on number of parameters used. For fisheye +type cameras this package uses the **equidistant** distortion model. -.. autoclass:: camera_calibration.calibrator.StereoCalibrator - :members: +Tutorials +--------- +There are tutorials on how to run the calibration tool for monocular and +stereo cameras. + +Camera Calibrator Usage +----------------------- +To run the ``cameracalibrator`` node for a monocular camera using an 8x6 +chessboard with 108mm squares: + +.. code-block:: bash + + ros2 run camera_calibration cameracalibrator --size 8x6 --square 0.108 image:=/my_camera/image camera:=/my_camera + +When you click on the **Save** button after a succesfull calibration, +the data (calibration data and images used for calibration) will +be written to ``/tmp/calibrationdata.tar.gz``. + +To run the ``cameracalibrator`` node for a stereo camera: + +.. code-block:: bash + + ros2 run camera_calibration cameracalibrator --size 8x6 --square 0.108 right:=/my_stereo/right/image_raw left:=/my_stereo/left/image_raw left_camera:=/my_stereo/left right_camera:=/my_stereo/right + + +``cameracalibrator`` supports the following options: + + Chessboard Options: + You must specify one or more chessboards as pairs of --size and + --square options. + + -p PATTERN, --pattern=PATTERN + calibration pattern to detect - 'chessboard', + 'circles', 'acircles' + -s SIZE, --size=SIZE + chessboard size as NxM, counting interior corners + (e.g. a standard chessboard is 7x7) + -q SQUARE, --square=SQUARE + chessboard square size in meters + + ROS Communication Options: + --approximate=APPROXIMATE + allow specified slop (in seconds) when pairing images + from unsynchronized stereo cameras + --no-service-check disable check for set_camera_info services at startup + --queue-size=QUEUE_SIZE + image queue size (default 1, set to 0 for unlimited) + + Calibration Optimizer Options: + --fix-principal-point + for pinhole, fix the principal point at the image + center + --fix-aspect-ratio for pinhole, enforce focal lengths (fx, fy) are equal + --zero-tangent-dist + for pinhole, set tangential distortion coefficients + (p1, p2) to zero + -k NUM_COEFFS, --k-coefficients=NUM_COEFFS + for pinhole, number of radial distortion coefficients + to use (up to 6, default 2) + --fisheye-recompute-extrinsicsts + for fisheye, extrinsic will be recomputed after each + iteration of intrinsic optimization + --fisheye-fix-skew for fisheye, skew coefficient (alpha) is set to zero + and stay zero + --fisheye-fix-principal-point + for fisheye,fix the principal point at the image + center + --fisheye-k-coefficients=NUM_COEFFS + for fisheye, number of radial distortion coefficients + to use fixing to zero the rest (up to 4, default 4) + --fisheye-check-conditions + for fisheye, the functions will check validity of + condition number + --disable_calib_cb_fast_check + uses the CALIB_CB_FAST_CHECK flag for + findChessboardCorners + --max-chessboard-speed=MAX_CHESSBOARD_SPEED + Do not use samples where the calibration pattern is + moving faster than this speed in + px/frame. Set to eg. 0.5 for rolling shutter cameras. + +Unsynchronized Stereo +--------------------- +By default, the ``image_pipeline`` assumes that stereo cameras are triggered +to capture images simultaneously, and that matching image pairs have identical +timestamps. This is the ideal situation, but requires hardware support. + +If your stereo pairs are not (or inexactly) synchronized, enable approximate +timestamp matching ``--approximate=0.01`` option. This permits a "slop" of +0.01s between image pairs. If you still don't see a display window, or it +is sporadically updated, try increasing the slop. + +Dual Checkerboards +------------------ +It is possible to use multiple size checkerboards to calibrate a camera. + +To use multiple checkerboards, give multiple ``--size`` and ``--square`` +options for additional boards. Make sure the boards have different +dimensions, so the calibration system can tell them apart. + +Camera Check +------------ +To run the command-line utility to check the calibration of a monocular camera: + +.. code-block:: bash + + ros2 run camera_calibration cameracheck --size 8x6 monocular:=/forearm image:=image_rect + +To run the command-line utility to check the calibration of a stereo camera: + +.. code-block:: bash + + ros2 run camera_calibration cameracheck --size 8x6 stereo:=/wide_stereo image:=image_rect + +.. toctree:: + :maxdepth: 2 + + self + components + tutorial_mono + tutorial_stereo + api + changes diff --git a/camera_calibration/doc/tutorial_mono.rst b/camera_calibration/doc/tutorial_mono.rst new file mode 100644 index 000000000..5e3fbef99 --- /dev/null +++ b/camera_calibration/doc/tutorial_mono.rst @@ -0,0 +1,182 @@ +Tutorial: Monocular Calibration +=============================== + +This tutorial cover using the ``cameracalibrator`` node to calibrate +a monocular camera with a raw image over ROS 2. + +Before Starting +--------------- +Make sure that you have the following: + + * A large checkerboard with known dimensions. This tutorial uses a 8x6 + checkerboard with 108mm squares. Calibration uses the interior vertex + points of the checkerboard, so an "9x7" board uses the interior vertex + parameter "8x6" as in the example below. + * A well lit 5m x 5m area clear of obstructions and check board patterns + a monocular camera publishing images over ROS. + * Install ROS 2 and the ``camera_calibration`` package. + +Finally make sure your camera is publishing images. For instance: + +.. code-block:: bash + + $ ros2 topic list | grep camera + + /camera/camera_info + /camera/image_raw + +If you have multiple cameras or are running the driver in its own +namespace, your topic names may differ. + +Running the Calibration Node +---------------------------- +To start the calibration you will need to load the image topics that +will be calibrated: + +.. code-block:: bash + + ros2 run camera_calibration cameracalibrator --size 8x6 --square 0.108 image:=/camera/image_raw camera:=/camera + +This will open up the calibration window which will highlight the checkerboard: + +.. figure:: images/mono_0.png + :width: 90% + :align: center + +If it does not open up the window try the following parameter: + +.. code-block:: bash + + --no-service-check + +If you can't see any colored dots make sure you count the interior vertex points, +not the squares! + +Dual Checkerboards +------------------ +To use multiple checkerboards, give multiple ``--size`` and ``--square`` options +for additional boards. Make sure the boards have different dimensions, so the +calibration system can tell them apart. + +Moving the Checkerboard +----------------------- +In order to get a good calibration you will need to move the checkerboard around +in the camera frame such that: + + * checkerboard on the camera's left, right, top and bottom of field of view + + * X bar - left/right in field of view + * Y bar - top/bottom in field of view + * Size bar - toward/away and tilt from the camera + * checkerboard filling the whole field of view + * checkerboard tilted to the left, right, top and bottom (Skew) + +At each step, hold the checkerboard still until the image is highlighted in the +calibration window. + +|cal0007| |cal0009| |cal0011| + +|cal0006| |cal0008| |cal0012| + +.. |cal0007| image:: images/cal0007.png + :width: 32% + +.. |cal0009| image:: images/cal0009.png + :width: 32% + +.. |cal0011| image:: images/cal0011.png + :width: 32% + +.. |cal0006| image:: images/cal0006.png + :width: 32% + +.. |cal0008| image:: images/cal0008.png + :width: 32% + +.. |cal0012| image:: images/cal0012.png + :width: 32% + +As you move the checkerboard around you will see three bars on the calibration +sidebar increase in length. When the **CALIBRATE** button lights, you have enough +data for calibration and can click **CALIBRATE** to see the results. + +Calibration can take about a minute. The windows might be greyed out but just +wait, it is working. + +.. figure:: images/mono_1.png + :width: 90% + :align: center + +Calibration Results +------------------- +After the calibration is complete you will see the calibration results in the +terminal and the calibrated image in the calibration window: + +.. figure:: images/mono_2.png + :width: 90% + :align: center + +A successful calibration will result in real-world straight edges appearing +straight in the corrected image. + +A failed calibration usually results in blank or unrecognizable images, or +images that do not preserve straight edges. + +After a successful calibration, you can use the slider at the top of the +calibration window to change the size of the rectified image. A scale of +0.0 means that the image is sized so that all pixels in the rectified image +are valid. The rectified image has no border, but some pixels from the +original image are discarded. A scale of 1.0 means that all pixels in the +original image are visible, but the rectified image has black borders where +there are no input pixels in the original image. + +.. code-block:: bash + + D = [-0.33758562758914146, 0.11161239414304096, -0.00021819272592442094, -3.029195446330518e-05] + K = [430.21554970319971, 0.0, 306.6913434743704, 0.0, 430.53169252696676, 227.22480030078816, 0.0, 0.0, 1.0] + R = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] + P = [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0] + # oST version 5.0 parameters + + [image] + + width + 640 + + height + 480 + + [narrow_stereo/left] + + camera matrix + 430.215550 0.000000 306.691343 + 0.000000 430.531693 227.224800 + 0.000000 0.000000 1.000000 + + distortion + -0.337586 0.111612 -0.000218 -0.000030 0.0000 + + rectification + 1.000000 0.000000 0.000000 + 0.000000 1.000000 0.000000 + 0.000000 0.000000 1.000000 + + projection + 1.000000 0.000000 0.000000 0.000000 + 0.000000 1.000000 0.000000 0.000000 + 0.000000 0.000000 1.000000 0.000000 + +If you are satisfied with the calibration, click **COMMIT** to send the +calibration parameters to the camera for permanent storage. The GUI +exits and you should see "writing calibration data to ..." in the console. + +Creating a YAML File +-------------------- +The Camera Calibration Parser helps you to create a yml file, which you +can load with nearly all ros camera driver using the *camera_info_url* +parameter. + +Rectifying an image +------------------- +Simply loading a calibration file does not rectify the image. For +rectification, use the ``image_proc`` package. diff --git a/camera_calibration/doc/tutorial_stereo.rst b/camera_calibration/doc/tutorial_stereo.rst new file mode 100644 index 000000000..b5d59a8ba --- /dev/null +++ b/camera_calibration/doc/tutorial_stereo.rst @@ -0,0 +1,250 @@ +Tutorial: Stereo Calibration +============================ + +This tutorial cover using the ``cameracalibrator`` node to calibrate +a stereo camera with a left and right image over ROS 2. + +Before Starting +--------------- +Make sure that you have the following: + + * A large checkerboard (8x6) or checkerboard (7x6) with known dimensions. + This tutorial uses a 8x6 checkerboard with 108mm squares. + * A well lit 5m x 5m area clear of obstructions and check board patterns + a stereo camera publishing left and right images over ROS (if you want + to use two independent cameras as a stereo camera, you must make sure + the images have identical time stamps). + * Install ROS 2 and the ``camera_calibration`` package. + +**NOTE**: Checkerboard size refers to the number of internal corner, as +described in the OpenCV documentation (i.e. the 8x6 checkerboard contains +9x7 squares) + +Finally make sure your camera is publishing images. For instance: + +.. code-block:: bash + + $ ros2 topic list | grep stereo + + /stereo/left/camera_info + /stereo/left/image_raw + /stereo/right/camera_info + /stereo/right/image_raw + +If you have multiple cameras or are running the driver in its own +namespace, your topic names may differ. + +Start the Calibration +--------------------- +To start the calibration you will need to load the image topics +that will be calibrated: + +.. code-block:: bash + + $ ros2 run camera_calibration cameracalibrator --approximate 0.1 --size 8x6 --square 0.108 right:=/stereo/right/image_raw left:=/my_stereo/left/image_raw right_camera:=/my_stereo/right left_camera:=/my_stereo/left + +The ``--approximate`` option allows the camera calibrator to work +with images that do not have the exact same timestamp. Currently +it is set to 0.1 seconds. In this case, as long as the timestamp +difference is less than 0.1 seconds, the calibrator will run with +no problem. + +This will open up the calibration window which will highlight the +checkerboard, you will not see any images in the calibration +window until a checkerboard is present: + +.. figure:: images/stereo_0.png + :width: 90% + :align: center + +Dual Checkerboards +------------------ + +To use multiple checkerboards, give multiple ``--size`` and +```--square`` options for additional boards. Make sure the boards +have different dimensions, so the calibration system can tell +them apart. + +Holding the Checkerboard +------------------------ +Make sure that you hold the checkerboard horizontally (more +checkers horizontally than vertically). + +.. figure:: images/check-108.png + :width: 90% + :align: center + +Moving the Checkerboard +----------------------- +In order to get a good calibration you will need to move the +checkerboard around in the camera frame such that: + + * The checkerboard is detected at the left and right edges + of the field of view (X calibration). + * The checkerboard is detected at the top and bottom edges + of the field of view (Y calibration). + * The checkerboard is detected at various angles to the + camera ("Skew"). + * The checkerboard fills the entire field of view + (Size calibration). + * checkerboard tilted to the left, right, top and bottom + (X,Y, and Size calibration). + + +|cal0007| |cal0009| |cal0011| + +|cal0006| |cal0008| |cal0012| + +.. |cal0007| image:: images/cal0007.png + :width: 32% + +.. |cal0009| image:: images/cal0009.png + :width: 32% + +.. |cal0011| image:: images/cal0011.png + :width: 32% + +.. |cal0006| image:: images/cal0006.png + :width: 32% + +.. |cal0008| image:: images/cal0008.png + :width: 32% + +.. |cal0012| image:: images/cal0012.png + :width: 32% + +As you move the checkerboard around you will see three bars on the +calibration sidebar increase in length. When the **CALIBRATE** button +lights, you have enough data for calibration and can click **CALIBRATE** +to see the results. + +.. figure:: images/stereo_1.png + :width: 90% + :align: center + +Calibration Results +------------------- +After the calibration is complete you will see the calibration results +in the terminal and the calibrated image in the calibration window: + +.. figure:: images/stereo_2.png + :width: 90% + :align: center + +The sidebar will show the measured accuracy and dimensions of the +checkerboard square, in the above case the checkerboard square was +111mm with an accuracy of 0.31 pixels. + +A successful calibration will result in real-world straight edges +appearing straight in the corrected image. + +A failed calibration usually results in blank or unrecognizable images, +or images that do not preserve straight edges. + +Typically, an epipolar error below 0.25 pixel is considered acceptable, +and below 0.1 excellent. + +You can also use the slider at the top of the calibration window to +change the size of the rectified image, as shown below. A scale of 0.0 +means that the image is sized so that all pixels in the rectified image +are valid. The rectified image has no border, but some pixels from the +original image are discarded. A scale of 1.0 means that all pixels in +the original image are visible, but the rectified image has black +borders where there are no input pixels in the original image. + +The recommended value for the slider is 0.0. + +.. figure:: images/stereo_3.png + :width: 90% + :align: center + +.. figure:: images/stereo_4.png + :width: 90% + :align: center + +For more details on the stereo camera model - including interpretation +of these results - see +`OpenCV `_ +and image_geometry. + +.. code-block:: bash + + Left: + D = [-0.31420196940339423, 0.091934927292188981, 0.0012952332628749881, -0.0016196264582460102] + K = [425.19601412158482, 0.0, 308.29689772295882, 0.0, 426.02702697756899, 223.53789948448997, 0.0, 0.0, 1.0] + R = [0.99783514664821127, 0.013543024537547797, 0.064355315242164368, -0.013644479706482148, 0.99990626305523833, 0.0011372231303031885, -0.064333881330776027, -0.0020128560018237928, 0.99792640015365552] + P = [308.02438413775218, 0.0, 270.8484992980957, 0.0, 0.0, 308.02438413775218, 226.91282844543457, 0.0, 0.0, 0.0, 1.0, 0.0] + + Right: + D = [-0.30550530964404188, 0.082701072309439266, 0.001966752019596593, -0.0016409796174513081] + K = [425.18741896821433, 0.0, 323.8787136811938, 0.0, 426.46867413824884, 226.19589833365407, 0.0, 0.0, 1.0] + R = [0.99769116642055589, 0.011418153515469445, 0.066947458627553177, -0.011312576360776634, 0.99993409783500409, -0.0019559148698406695, -0.066965379581335679, 0.0011940507500265176, 0.99775458514623427] + P = [308.02438413775218, 0.0, 270.8484992980957, -28.144333365644293, 0.0, 308.02438413775218, 226.91282844543457, 0.0, 0.0, 0.0, 1.0, 0.0] + + # oST version 5.0 parameters + + [image] + + width + 640 + + height + 480 + + [narrow_stereo/left] + + camera matrix + 425.196014 0.000000 308.296898 + 0.000000 426.027027 223.537899 + 0.000000 0.000000 1.000000 + + distortion + -0.314202 0.091935 0.001295 -0.001620 0.0000 + + rectification + 0.997835 0.013543 0.064355 + -0.013644 0.999906 0.001137 + -0.064334 -0.002013 0.997926 + + projection + 308.024384 0.000000 270.848499 0.000000 + 0.000000 308.024384 226.912828 0.000000 + 0.000000 0.000000 1.000000 0.000000 + + # oST version 5.0 parameters + + [image] + + width + 640 + + height + 480 + + [narrow_stereo/right] + + camera matrix + 425.187419 0.000000 323.878714 + 0.000000 426.468674 226.195898 + 0.000000 0.000000 1.000000 + + distortion + -0.305505 0.082701 0.001967 -0.001641 0.0000 + + rectification + 0.997691 0.011418 0.066947 + -0.011313 0.999934 -0.001956 + -0.066965 0.001194 0.997755 + + projection + 308.024384 0.000000 270.848499 -28.144333 + 0.000000 308.024384 226.912828 0.000000 + 0.000000 0.000000 1.000000 0.000000 + +If you are satisfied with the calibration, click **COMMIT** (on the pictures +above this is button has an old name **UPLOAD**) to send the calibration +parameters to the camera for permanent storage. + +If you want to save the calibration parameters and images used in calibration, +click **SAVE**. Everything will be made available in the compressed folder +``/tmp/calibrationdata.tar.gz``. diff --git a/camera_calibration/package.xml b/camera_calibration/package.xml index ef1f2a9c9..84c742bc5 100644 --- a/camera_calibration/package.xml +++ b/camera_calibration/package.xml @@ -36,5 +36,6 @@ ament_python + rosdoc2.yaml diff --git a/camera_calibration/rosdoc.yaml b/camera_calibration/rosdoc.yaml deleted file mode 100644 index 0136cd7a2..000000000 --- a/camera_calibration/rosdoc.yaml +++ /dev/null @@ -1,4 +0,0 @@ - - builder: sphinx - name: Python API - output_dir: python - sphinx_root_dir: doc diff --git a/camera_calibration/rosdoc2.yaml b/camera_calibration/rosdoc2.yaml new file mode 100644 index 000000000..6bfd885b1 --- /dev/null +++ b/camera_calibration/rosdoc2.yaml @@ -0,0 +1,68 @@ +## Default configuration, generated by rosdoc2. + +## This 'attic section' self-documents this file's type and version. +type: 'rosdoc2 config' +version: 1 + +--- + +settings: + ## If this is true, a standard index page is generated in the output directory. + ## It uses the package information from the 'package.xml' to show details + ## about the package, creates a table of contents for the various builders + ## that were run, and may contain links to things like build farm jobs for + ## this package or links to other versions of this package. + + ## If false, you can still include content that would have been in the index + ## into one of your '.rst' files from your Sphinx project, using the + ## '.. include::' directive in Sphinx. + ## For example, you could include it in a custom 'index.rst' so you can have + ## the standard information followed by custom content. + + ## TODO(wjwwood): provide a concrete example of this (relative path?) + + ## If this is not specified explicitly, it defaults to 'true'. + generate_package_index: true + + ## This setting is relevant mostly if the standard Python package layout cannot + ## be assumed for 'sphinx-apidoc' invocation. The user can provide the path + ## (relative to the 'package.xml' file) where the Python modules defined by this + ## package are located. + python_source: 'src/camera_calibration' + + ## This setting, if true, attempts to run `doxygen` and the `breathe`/`exhale` + ## extensions to `sphinx` regardless of build type. This is most useful if the + ## user would like to generate C/C++ API documentation for a package that is not + ## of the `ament_cmake/cmake` build type. + always_run_doxygen: false + + ## This setting, if true, attempts to run `sphinx-apidoc` regardless of build + ## type. This is most useful if the user would like to generate Python API + ## documentation for a package that is not of the `ament_python` build type. + always_run_sphinx_apidoc: false + + # This setting, if provided, will override the build_type of this package + # for documentation purposes only. If not provided, documentation will be + # generated assuming the build_type in package.xml. + # override_build_type: 'ament_python' +builders: + ## Each stanza represents a separate build step, performed by a specific 'builder'. + ## The key of each stanza is the builder to use; this must be one of the + ## available builders. + ## The value of each stanza is a dictionary of settings for the builder that + ## outputs to that directory. + ## Required keys in the settings dictionary are: + ## * 'output_dir' - determines output subdirectory for builder instance + ## relative to --output-directory + ## * 'name' - used when referencing the built docs from the index. + + - doxygen: { + name: 'camera_calibration Public C/C++ API', + output_dir: 'generated/doxygen' + } + - sphinx: { + name: 'camera_calibration', + ## This path is relative to output staging. + doxygen_xml_directory: 'generated/doxygen/xml', + output_dir: '' + }