{"id":38899255,"url":"https://github.com/zivid/zivid-ros","last_synced_at":"2026-01-17T15:01:10.302Z","repository":{"id":37773948,"uuid":"194618178","full_name":"zivid/zivid-ros","owner":"zivid","description":"Official ROS driver for Zivid 3D cameras","archived":false,"fork":false,"pushed_at":"2025-11-04T12:51:14.000Z","size":16847,"stargazers_count":76,"open_issues_count":15,"forks_count":54,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-11-04T14:33:49.887Z","etag":null,"topics":["ros","zivid"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zivid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-07-01T07:04:50.000Z","updated_at":"2025-10-23T12:55:21.000Z","dependencies_parsed_at":"2024-05-29T16:06:41.441Z","dependency_job_id":"9dbd29b0-0691-4234-b33d-2dbcdffa4c72","html_url":"https://github.com/zivid/zivid-ros","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/zivid/zivid-ros","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivid%2Fzivid-ros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivid%2Fzivid-ros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivid%2Fzivid-ros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivid%2Fzivid-ros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zivid","download_url":"https://codeload.github.com/zivid/zivid-ros/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivid%2Fzivid-ros/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28510928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ros","zivid"],"created_at":"2026-01-17T15:00:57.813Z","updated_at":"2026-01-17T15:01:10.284Z","avatar_url":"https://github.com/zivid.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zivid ROS driver\n\nThis is the official ROS driver for [Zivid 3D cameras](https://www.zivid.com/).\n\nThis driver provides support for ROS2.\n\nIf you are looking for the Zivid ROS1 driver, please use the [`ros1-master` branch](https://github.com/zivid/zivid-ros/tree/ros1-master) if\nyou are using Zivid SDK 2.13 or older, or use the [`ros1-sdk-2.14.0` branch](https://github.com/zivid/zivid-ros/tree/ros1-sdk-2.14.0) if you\nare using Zivid SDK 2.14 or newer.\n\n[![Build Status][ci-badge]][ci-url]\n![Zivid Image][header-image]\n\n---\n\n*Contents:*\n[**Installation**](#installation) |\n[**Getting Started**](#getting-started) |\n[**Launching**](#launching-the-driver) |\n[**Configuration**](#configuration) |\n[**Services**](#services) |\n[**Topics**](#topics) |\n[**Samples**](#samples) |\n[**Launch Files**](#launch-files) |\n[**RViz Plugin**](#rviz-plugin) |\n[**URDF**](#urdf) |\n[**FAQ**](#frequently-asked-questions)\n\n---\n\n## Installation\n\n### Support\n\nThis driver supports Ubuntu 20.04 / 22.04 / 24.04 with ROS2. Follow the official [ROS installation instructions](https://docs.ros.org/) for\nyour OS.\n\n\u003e [!TIP]\n\u003e If you are using an OS that is not supported by ROS2, you can use the *dev container* provided in this repository.\n\nIf you are looking for the Zivid ROS1 driver, please use the [`ros1-master` branch](https://github.com/zivid/zivid-ros/tree/ros1-master) for\nZivid SDK 2.13 or older, or use the [`ros1-sdk-2.14.0` branch](https://github.com/zivid/zivid-ros/tree/ros1-sdk-2.14.0) for Zivid SDK 2.14 or newer.\n\n### Zivid SDK\n\nTo use the ROS driver you need to download and install the \"Zivid Core\" package. Zivid SDK versions 2.15.0 to 2.17.0 are\nsupported. See [releases](https://github.com/zivid/zivid-ros/releases) for older ROS driver releases\nthat supports older SDK versions.\n\nFollow [this guide][zivid-software-installation-url]\nto install \"Zivid Core\" for your version of Ubuntu. The \"Zivid Studio\" and \"Zivid Tools\" packages can be useful\nto test your system setup and camera, but are not required by the driver.\n\nAn OpenCL 1.2 compatible GPU with driver installed is required by the SDK. Follow\n[this guide][install-opencl-drivers-ubuntu-url] to install OpenCL drivers for your system.\n\n### C++ compiler\n\nA C++17 compiler is required.\n\n```bash\nsudo apt-get install -y g++\n```\n\n### Downloading and building Zivid ROS driver\n\n\u003e [!NOTE]\n\u003e If you will be using the *dev container*, skip to the [Using Dev Container](#using-dev-container) section.\n\nFirst, source the `setup.bash` script for your ROS distribution in your terminal:\n\n```bash\nsource /opt/ros/$ROS_DISTRO/setup.bash\n```\n\nThen create the workspace and src directory:\n```bash\nmkdir -p ~/ros2_ws/src\n```\n\nClone the Zivid ROS project into the src directory:\n```bash\ncd ~/ros2_ws/src\ngit clone https://github.com/zivid/zivid-ros.git\n```\n\nInitialize rosdep:\n```bash\ncd ~/ros2_ws/src\nsudo rosdep init\nrosdep update\n```\n\nInstall dependencies:\n```bash\ncd ~/ros2_ws/src\nrosdep install -i --from-path ./ -y\n```\n\nFinally, build the driver:\n\n```bash\ncd ~/ros2_ws\ncolcon build --symlink-install\n```\n\n#### Using Dev Container\n\nIf you are using a dev container, you can skip the above steps and instead open the dev container in your IDE.\n\nTo build the driver in the dev container, run the following command in the terminal inside the dev container:\n\n```bash\nsource /opt/ros/$ROS_DISTRO/setup.bash\ncolcon build --symlink-install\n```\n\n## Getting started\n\nConnect the Zivid camera to your PC. You can use the `ZividListCameras` command-line\ntool available in the \"Zivid Tools\" package to confirm that your system has been configured correctly, and\nthat the camera is discovered by your PC. You can also open Zivid Studio and connect to the camera.\nClose Zivid Studio before continuing with the rest of this guide.\n\nRun the sample_capture_cpp via the launch script to check that everything is working.\n\n```bash\ncd ~/ros2_ws \u0026\u0026 source install/setup.bash\nros2 launch zivid_samples sample_with_rviz.launch sample:=sample_capture_cpp\n```\n\nThis will start the `zivid_camera` driver node, the `sample_capture_cpp` node, and `rviz`.\nThe `zivid_camera` driver will connect to the first available Zivid camera, and \nthen `sample_capture_cpp` will trigger captures repeatedly. The resulting point cloud and\ncolor image should be visible in `rviz`.\n\nA more detailed description of the `zivid_camera` driver follows below.\n\nFor sample code, see the [Samples](#samples) section.\n\n## Launching the driver\n\nTo launch the driver, use `ros2 run`:\n\n```bash\ncd ~/ros2_ws \u0026\u0026 source install/setup.bash\nros2 run zivid_camera zivid_camera\n```\n\nThe driver will by default connect to the first available Zivid camera.\nThis behavior can be overridden by setting the `serial_number` launch parameter, see below.\n\n### Launch Parameters (advanced)\n\nThe following parameters can be specified when starting the driver. Note that all the parameters are\noptional.\n\nFor example, to run the zivid_camera driver with a specific `serial_number` specified:\n\n```bash\nros2 run zivid_camera zivid_camera --ros-args -p serial_number:=ABCD1234\n```\n\nOr you can use a [launch file](#launch-files) and invoke it as:\n\n```bash\nros2 launch zivid_samples zivid_camera.launch serial_number:=ABCD1234\n```\n\n`file_camera_path` (string, default: \"\")\n\u003e Specify the path to a file camera to use instead of a real Zivid camera. This can be used to\n\u003e develop without access to hardware. The file camera returns the same point cloud for every capture.\n\u003e [Visit our knowledgebase to download file camera.](https://support.zivid.com/en/latest/academy/camera/file-camera.html)\n\n`frame_id` (string, default: \"zivid_optical_frame\")\n\u003e Specify the frame_id used for all published images and point clouds.\n\n`serial_number` (string, default: \"\")\n\u003e Specify the serial number of the Zivid camera to use.  This parameter is optional. By default, the\n\u003e driver will connect to the first available camera.\n\n`update_firmware_automatically` (bool, default: true)\n\u003e Specify if the firmware of the connected camera should be automatically updated to the correct\n\u003e version when the Zivid ROS driver starts. If set to false, if the firmware version is out of date\n\u003e then camera must be manually updated, for example using Zivid Studio or `ZividFirmwareUpdater`.\n\u003e Read more about [firmware update in our knowledgebase][firmware-update-kb-url].\n\u003e This parameter is optional, and by default it is true.\n\n`color_space` (string, default: \"linear_rgb\")\n\u003e Specify the color space to use when publishing and saving point clouds and images. Valid values:\n\u003e\n\u003e  - `srgb`: Use the sRGB color space. The sRGB color space is suitable for showing an image\n\u003e    on a display for human viewing. It is easier to see details in darker areas of an image in sRGB\n\u003e    than in linear RGB, as more of the dynamic range is dedicated to darker colors. This format is\n\u003e    assumed by default by most monitors and should be used when displaying an image. This option\n\u003e    should be used to match colors to the visualization in Zivid Studio.\n\u003e  - `linear_rgb`: Use linear RGB color space. Linear RGB is suitable as input to computer\n\u003e    vision algorithms.\n\u003e\n\u003e In particular, this parameter affects the data published over the [color/image_color](#colorimage_color) and\n\u003e [points/xyzrgba](#pointsxyzrgba) topics. Please see the Zivid knowledge base on\n\u003e [2D Color Spaces and Output Formats](https://support.zivid.com/en/latest/reference-articles/color-spaces-and-output-formats.html)\n\u003e for more details.\n\n`intrinsics_source` (string, default: \"camera\")\n\u003e Specify how intrinsics are determined when publishing images from 3D captures. Valid values:\n\u003e\n\u003e  - `camera`: Use hard-coded camera intrinsics. These intrinsics are given for a single aperture and a\n\u003e    single temperature, and will therefore not be as accurate as the intrinsics estimated from the frame.\n\u003e  - `frame`: Estimate the intrinsics from the captured 3D frame. This gives more accurate results at the\n\u003e    cost of additional computation time.\n\u003e\n\u003e In particular, this parameter affects data published on the topics [color/camera_info](#colorcamera_info),\n\u003e [depth/camera_info](#depthcamera_info), and [snr/camera_info](#snrcamera_info), after performing a 3D capture. The\n\u003e 2D-only captures will always use the hard-coded camera intrinsics. Please see the Zivid knowledge base on\n\u003e [Camera Intrinsics](https://support.zivid.com/en/latest/reference-articles/camera-intrinsics.html) for more details.\n\u003e\n\u003e See [Sample Intrinsics](#sample-intrinsics) for code example.\n\n## Configuration\n\nThe capture settings used by the `zivid_camera` ROS driver must be configured using YAML,\nwhich can be exported from Zivid Studio or the API, or downloaded as .yml files from our [knowledge\nbase][presets-kb-url].\n\nFor convenience, the Zivid ROS driver supports configuring capture settings in two ways: Using file path\nto a .yml file, or as a YAML string.\n\nThe following ROS parameters control which settings are used when capturing with the driver. Note\nthat you must set _either_ the `_file_path` or the `_yaml` parameter. If both `_file_path` and `_yaml`\nparameters are set to a non-empty string at the same time, then the driver will return an error when\ncapturing. By default, all settings parameters are empty.\n\n### 3D capture\n\n`settings_file_path` (string, default: \"\")\n\u003e Specify the path to a .yml file that contains the settings you want to use.\n\n`settings_yaml` (string, default: \"\")\n\u003e Specify a YAML string that contains the settings you want to use. For example, you can copy the contents of a .yml\n\u003e file saved from Zivid Studio.\n\nThe service `capture_assistant/suggest_settings` will modify the settings parameters automatically.\n\n### 2D capture\n\n`settings_2d_file_path` (string, default: \"\")\n\u003e Specify the path to a .yml file that contains the settings you want to use.\n\n`settings_2d_yaml` (string, default: \"\")\n\u003e Specify a YAML string that contains the 2D settings you want to use. For example, you can copy the contents of a \n\u003e .yml file saved from Zivid Studio.\n\n## Services\n\n### capture\n[std_srvs/srv/Trigger](https://docs.ros2.org/latest/api/std_srvs/srv/Trigger.html)\n\nInvoke this service to trigger a 3D capture. See section [Configuration](#configuration) for how to\nconfigure the 3D capture settings. The resulting point cloud is published on topics [points/xyz](#pointsxyz) and\n[points/xyzrgba](#pointsxyzrgba), color image is published on topic [color/image_color](#colorimage_color), depth image\nis published on topic [depth/image](#depthimage), and signal-to-noise ratio (SNR) image is published on topic\n[snr/image](#snrimage). Camera calibration is published on topics [color/camera_info](#colorcamera_info),\n[depth/camera_info](#depthcamera_info), and [snr/camera_info](#snrcamera_info).\n\nSee [Sample Capture](#sample-capture) for code example.\n\n### capture_2d\n[std_srvs/srv/Trigger](https://docs.ros2.org/latest/api/std_srvs/srv/Trigger.html)\n\nInvoke this service to trigger a 2D capture. See section [Configuration](#configuration) for how to\nconfigure the 2D capture settings. The resulting 2D image is published to topic\n[color/image_color](#colorimage_color). Note: 2D RGB image is also published as a part of 3D\ncapture, see [capture](#capture).\n\nSee [Sample Capture 2D](#sample-capture-2d) for code example.\n\n### capture_and_detect_calibration_board\n[zivid_interfaces/srv/CaptureAndDetectCalibrationBoard.srv](./zivid_interfaces/srv/CaptureAndDetectCalibrationBoard.srv)\n\nPerforms a capture to detect a calibration board and estimate its pose. This service call will perform a relatively slow\nbut high-quality point cloud capture with the connected camera. Any settings applied to the camera in the ROS driver\nwill be ignored for calls to this service, appropriate settings are automatically used. The resulting point cloud and\ncolor image will be published just like during a normal call to the [capture](#capture) service.\n\nThe returned data from the service includes a member of the type\n[DetectionResultCalibrationBoard.msg](./zivid_interfaces/msg/DetectionResultCalibrationBoard.msg), with details on any\ndetected calibration board.\n\nThe functionality is to be exclusively used in combination with Zivid verified calibration boards. For further\ninformation please visit [Zivid help page](https://support.zivid.com).\n\n### capture_and_detect_markers\n[zivid_interfaces/srv/CaptureAndDetectMarkers.srv](./zivid_interfaces/srv/CaptureAndDetectMarkers.srv)\n\nPerforms a capture to detect fiducial markers, such as ArUco markers, and estimate their poses. As opposed to the\n[capture_and_detect_calibration_board](#capture_and_detect_calibration_board) service, this service uses the current\nsettings applied to the camera. See section [Configuration](#configuration) for how to configure the 3D capture\nsettings. The resulting point cloud and color image will be published just like during a normal call to the\n[capture](#capture) service.\n\nThe name of the fiducial dictionary must be provided, along with a list of marker IDs. The scene may not need not\ncontain all listed markers for a successful detection. For further information on fiducial markers see [this wikipedia\npage](https://en.wikipedia.org/wiki/Fiducial_marker). For more information on ArUco markers specifically, refer to the\n[OpenCV documentation](https://docs.opencv.org/4.x/d5/dae/tutorial_aruco_detection.html).\n\nThe returned data from the service includes a member of the type\n[DetectionResultFiducialMarkers.msg](./zivid_interfaces/msg/DetectionResultFiducialMarkers.msg), with details on any\ndetected fiducial markers.\n\n### capture_and_save\n[zivid_interfaces/srv/CaptureAndSave.srv](./zivid_interfaces/srv/CaptureAndSave.srv)\n\nIt does exactly the same as the [capture](#capture) service, in addition it will save the frame to\na file. This service takes a path as an argument. The chosen format is detected via the file extension.\nThe `color_space` parameter controls which color space is used when saving the frame.\n\nSee [knowledge base](https://support.zivid.com/en/latest/reference-articles/point-cloud-structure-and-output-formats.html#zivid-output-formats)\nfor a list of available output formats.\n\nSee [Sample Capture and Save](#sample-capture-and-save) for code example.\n\n### capture_assistant/suggest_settings\n[zivid_interfaces/srv/CaptureAssistantSuggestSettings.srv](./zivid_interfaces/srv/CaptureAssistantSuggestSettings.srv)\n\nInvoke this service to analyze your scene and find suggested settings for your particular scene,\ncamera distance, ambient lighting conditions, etc. This service will automatically update the node parameter\n`settings_yaml` with the suggested settings, see section [Configuration](#configuration).\nWhen this service has returned, you can invoke the [capture](#capture) service to trigger a 3D capture using\nthese suggested settings.\n\nThis service has two parameters:\n\n`max_capture_time` (duration):\n\u003e Specify the maximum capture time for the settings suggested by the Capture Assistant. A longer\n\u003e capture time may be required to get good data for more challenging scenes. Minimum value is\n\u003e 0.2 sec and maximum value is 10.0 sec.\n\n`ambient_light_frequency` (uint8):\n\u003e Possible values are: `AMBIENT_LIGHT_FREQUENCY_NONE`, `AMBIENT_LIGHT_FREQUENCY_50HZ`,\n\u003e `AMBIENT_LIGHT_FREQUENCY_60HZ`. Can be used to ensure that the suggested settings are compatible\n\u003e with the frequency of the ambient light in the scene. If ambient light is unproblematic, use\n\u003e `AMBIENT_LIGHT_FREQUENCY_NONE` for optimal performance. Default is `AMBIENT_LIGHT_FREQUENCY_NONE`.\n\nSee [Sample Capture Assistant](#sample-capture-assistant) for code example.\n\n### camera_info/model_name\n[zivid_interfaces/srv/CameraInfoModelName.srv](./zivid_interfaces/srv/CameraInfoModelName.srv)\n\nReturns the camera's model name.\n\n### camera_info/serial_number\n[zivid_interfaces/srv/CameraInfoSerialNumber.srv](./zivid_interfaces/srv/CameraInfoSerialNumber.srv)\n\nReturns the camera's serial number.\n\n### is_connected\n[zivid_interfaces/srv/IsConnected.srv](./zivid_interfaces/srv/IsConnected.srv)\n\nReturns if the camera is currently in `Connected` state (from the perspective of the ROS driver).\nThe connection status is updated by the driver every 10 seconds and before each [capture](#capture)\nservice call. If the camera is not in `Connected` state the driver will attempt to re-connect to\nthe camera when it detects that the camera is available. This can happen if the camera is\npower-cycled or the USB/Ethernet cable is unplugged and then replugged.\n\n### hand_eye_calibration/start\n[zivid_interfaces/srv/HandEyeCalibrationStart.srv](./zivid_interfaces/srv/HandEyeCalibrationStart.srv)\n\nPrepares the node for hand-eye calibration and clears any previously collected hand-eye captures. The type of the\n[calibration object](https://support.zivid.com/en/latest/academy/applications/hand-eye/calibration-object.html) to be\nused during capture must be provided. A *working directory* can optionally be provided so that all captures are saved to\nthis directory. If provided, the directory must be given as an absolute path and the directory must be empty.\n\nThis service must be called first before capturing data for hand-eye calibration. It can also be used to restart an\nactive hand-eye calibration session. After calling this service, proceed with captures by calling the\n[hand_eye_calibration/capture](#hand_eye_calibrationcapture) service.\n\nPlease refer to the Zivid knowledge base for more information on [hand-eye\ncalibration](https://support.zivid.com/en/latest/academy/applications/hand-eye.html).\n\n### hand_eye_calibration/capture\n[zivid_interfaces/srv/HandEyeCalibrationCapture.srv](./zivid_interfaces/srv/HandEyeCalibrationCapture.srv)\n\nPerforms a hand-eye calibration capture. This service takes the robot pose as an input. Then it performs a capture, and\ndetects any calibration objects. The resulting point cloud and color image will be published just like during a normal call to the\n[capture](#capture) service.\n\nIf the detections is successful, the result is stored locally in the driver. Additionally, if a working directory was\nspecified during start, the captured frame and robot pose is saved to that directory.\n\nThis service uses the currently stored 3D capture settings to perform the capture. Ensure that the camera is [properly\nconfigured](#configuration) first. Please see the knowledge base for [how to get good quality data](https://support.zivid.com/en/latest/academy/applications/hand-eye/how-to-get-good-quality-data-on-zivid-calibration-board.html).\n\nThe camera and robot should be appropriately positioned so that the calibration object is visible in the frame. Multiple\ncaptures in different poses are necessary. After performing several captures, one can proceed by calling the\n[hand_eye_calibration/calibrate](#hand_eye_calibrationcalibrate) service.\n\n### hand_eye_calibration/calibrate\n[zivid_interfaces/srv/HandEyeCalibrationCalibrate.srv](./zivid_interfaces/srv/HandEyeCalibrationCalibrate.srv)\n\nComputes the hand-eye calibration transform based on the captures gathered during the current hand-eye calibration\nsession. Both eye-to-hand and eye-in-hand configurations are supported. If successful, the computed hand-eye transform\nis returned, see the knowledge base for more information on the [hand-eye calibration\nsolution](https://support.zivid.com/en/latest/academy/applications/hand-eye/hand-eye-calibration-solution.html).\n\nThe calibration procedure requires all robot poses to be different. At least 2 poses are required when using a\ncalibration board, or 6 poses when using fiducial markers. For fiducial markers, each marker must be detected across 2\nposes at minimum.\n\nLow degrees-of-freedom (DOF) calibration is also supported (experimental) by supplying the fixed placement of\ncalibration objects. This is not needed for regular (6-DOF) calibration.\n\n### hand_eye_calibration/load\n[zivid_interfaces/srv/HandEyeCalibrationLoad.srv](./zivid_interfaces/srv/HandEyeCalibrationLoad.srv)\n\nLoads a working directory from a previous hand-eye calibration session. See the\n[hand_eye_calibration/start](#hand_eye_calibrationstart) service for how to start a session with a working directory.\nThe captures and robot poses are loaded from the provided directory. The directory is opened as read-only, and no new\ncaptures can be made during this session. However, calls to the\n[hand_eye_calibration/calibrate](#hand_eye_calibrationcalibrate) service can be made to compute the hand-eye transform\nfrom the loaded data.\n\n### infield_correction/read\n[zivid_interfaces/srv/InfieldCorrectionRead.srv](./zivid_interfaces/srv/InfieldCorrectionRead.srv)\n\nReturns the state of the [infield\ncorrection](https://support.zivid.com/en/latest/academy/camera/infield-correction.html) of the camera.\n\n### infield_correction/reset\n[std_srvs/srv/Trigger](https://docs.ros2.org/latest/api/std_srvs/srv/Trigger.html)\n\nResets the infield correction on the camera to factory settings.\n\n### infield_correction/start\n[std_srvs/srv/Trigger](https://docs.ros2.org/latest/api/std_srvs/srv/Trigger.html)\n\nPrepares for infield correction, and clears any infield correction captures gathered so far in the `zivid_camera` node.\n\nThis service must be called before gathering captures using the [infield_correction/capture](#infield_correctioncapture)\nservice. However, other infield correction services can be used without calling the start service first. This service\ncan also be used to restart an active infield correction session.\n\nPlease refer to the Zivid knowledge base for further information and guidelines for [infield\ncorrection](https://support.zivid.com/en/latest/academy/camera/infield-correction.html). \n\n### infield_correction/capture\n[zivid_interfaces/srv/InfieldCorrectionCapture.srv](./zivid_interfaces/srv/InfieldCorrectionCapture.srv)\n\nTakes a capture to be used for infield correction. Please point the camera at a Zivid infield calibration object. It is\nrecommended to cover several distances, with one or more captures at each distance. Successful captures are stored in\nthe `zivid_camera` node.\n\nBefore calling this service, a call to [infield_correction/start](#infield_correctionstart) must have been made first.\n\nThis service call will perform a relatively slow but high-quality point cloud capture with the connected camera. Any\nsettings applied to the camera in the ROS driver will be ignored for calls to this service, appropriate settings are\nautomatically used. The resulting point cloud and color image will be published just like during a normal call to the\n[capture](#capture) service.\n\nAfter sufficient number of captures, proceed by calling the [infield_correction/compute](#infield_correctioncompute)\nservice to compute the verification metrics and the correction based on the captures gathered so far. To additionally\nwrite the correction to camera, proceed by calling the\n[infield_correction/compute_and_write](#infield_correctioncompute_and_write) service.\n\nThe captured data is cleared if the node is stopped, or after a successful call to either of the services\n[infield_correction/start](#infield_correctionstart) or\n[infield_correction/compute_and_write](#infield_correctioncompute_and_write).\n\n### infield_correction/compute\n[zivid_interfaces/srv/InfieldCorrectionCompute.srv](./zivid_interfaces/srv/InfieldCorrectionCompute.srv)\n\nCalculates the new infield correction based the captured data gathered so far through the service\n[infield_correction/capture](#infield_correctioncapture).\n\nThe quantity and range of data is up to the user, but generally a larger dataset will yield a more accurate and reliable\ncorrection. If all measurements are taken at approximately the same distance, the resulting correction will mainly be\nvalid at those distances. If several measurements are taken at significantly different distances, the resulting\ncorrection will likely be more suitable for extrapolation to distances beyond where the dataset is collected.\n\nThis service also acts as verification of the quality of the infield correction on a camera, or the need for one if none\nexists already. It returns an indication of the dimension trueness at the location where the input data was captured.\n\nIf the returned assessment indicates a trueness error that is above the threshold for your application, consider using\n[infield_correction/compute_and_write](#infield_correctioncompute_and_write). The service also returns information\nregarding the proposed working range and the accuracy that can be expected within the working range, if the correction\nis later written to the camera.\n\n### infield_correction/compute_and_write\n[zivid_interfaces/srv/InfieldCorrectionCompute.srv](./zivid_interfaces/srv/InfieldCorrectionCompute.srv)\n\nCalculates the new infield correction based the captured data gathered so far through the service\n[infield_correction/capture](#infield_correctioncapture), and writes the result to the camera.\n\nIf the write operation is successful, the infield correction capture data is cleared. To perform infield correction\nagain, a new session must be started with a call to the [infield_correction/start](#infield_correctionstart) service.\n\nPlease see the [infield_correction/compute](#infield_correctioncompute) service for more information on the computed\ncorrection.\n\n### infield_correction/remove_last_capture\n[std_srvs/srv/Trigger](https://docs.ros2.org/latest/api/std_srvs/srv/Trigger.html)\n\nRemoves the last infield correction capture gathered in the `zivid_camera` node.\n\n### projection/resolution\n[zivid_interfaces/srv/ProjectionResolution.srv](./zivid_interfaces/srv/ProjectionResolution.srv)\n\nReturns the width and height of the projector.\n\n### projection/status\n[zivid_interfaces/srv/ProjectionStatus.srv](./zivid_interfaces/srv/ProjectionStatus.srv)\n\nReturns whether the projector is turned on or not.\n\n### projection/start\n[zivid_interfaces/srv/ProjectionStart.srv](./zivid_interfaces/srv/ProjectionStart.srv)\n\nStart the projector. This service takes _either_ a path _or_ raw pixel values in BGRA format to specify what to project.\nThe specified file or data must match the resolution of the projector, which can be obtained using the\n[resolution service](#projectionresolution).\n\nIf a capture is performed using any other service than [projection/capture_2d](#projectioncapture_2d), the projector\nwill be turned off.\n\n### projection/stop\n[std_srvs/srv/Trigger](https://docs.ros2.org/latest/api/std_srvs/srv/Trigger.html)\n\nStops the current projection, if any.\n\n### projection/capture_2d\n[std_srvs/srv/Trigger](https://docs.ros2.org/latest/api/std_srvs/srv/Trigger.html)\n\nInvoke this service to trigger a 2D capture while the projector is turned on. Like [capture_2d](#capture_2d) this\nservice requires capture settings to be [configured](#configuration). This function can only be used with a\nzero-brightness 2D capture, otherwise it will interfere with the projected image. The service will fail with an error if\nsettings contains brightness \u003e 0.\n\n## Topics\n\nThe Zivid ROS driver provides several topics providing 3D, color, SNR and camera calibration\ndata as a result of calling capture/capture_2d services. The different output topics provides \nflexibility for different use cases. Note that for performance reasons no messages are generated\nor sent on topics with zero active subscribers.\n\n### color/camera_info\n[sensor_msgs/msg/CameraInfo](https://docs.ros2.org/latest/api/sensor_msgs/msg/CameraInfo.html)\n\nCamera calibration and metadata. See also parameter [`intrinsics_source`](#launch-parameters-advanced).\n\n### color/image_color\n[sensor_msgs/msg/Image](https://docs.ros2.org/latest/api/sensor_msgs/msg/Image.html)\n\nColor/RGBA image. RGBA image is published as a result of invoking the [capture](#capture) or\n[capture_2d](#capture_2d) service. Images are encoded as \"rgba8\", where the alpha channel\nis always 255.\n\n### depth/camera_info\n[sensor_msgs/msg/CameraInfo](https://docs.ros2.org/latest/api/sensor_msgs/msg/CameraInfo.html)\n\nCamera calibration and metadata. See also parameter [`intrinsics_source`](#launch-parameters-advanced).\n\n### depth/image\n[sensor_msgs/msg/Image](https://docs.ros2.org/latest/api/sensor_msgs/msg/Image.html)\n\nDepth image. Each pixel contains the z-value (along the camera Z axis) in meters.\nThe image is encoded as 32-bit float. Pixels where z-value is missing are NaN.\n\n### points/xyzrgba\n[sensor_msgs/msg/PointCloud2](https://docs.ros2.org/latest/api/sensor_msgs/msg/PointCloud2.html)\n\nPoint cloud data. Sent as a result of the [capture](#capture) service. The output is\nin the camera's optical frame, where x is right, y is down and z is forward.\nThe included point fields are x, y, z (in meters) and rgba (color).\n\n### points/xyz\n[sensor_msgs/msg/PointCloud2](https://docs.ros2.org/latest/api/sensor_msgs/msg/PointCloud2.html)\n\nPoint cloud data. This topic is similar to topic [points/xyzrgba](#pointsxyzrgba), except\nthat only the XYZ 3D coordinates are included. This topic is recommended if you don't need\nthe RGBA values.\n\n### snr/camera_info\n[sensor_msgs/msg/CameraInfo](https://docs.ros2.org/latest/api/sensor_msgs/msg/CameraInfo.html)\n\nCamera calibration and metadata. See also parameter [`intrinsics_source`](#launch-parameters-advanced).\n\n### snr/image\n[sensor_msgs/msg/Image](https://docs.ros2.org/latest/api/sensor_msgs/msg/Image.html)\n\nEach pixel contains the SNR (signal-to-noise ratio) value. The image is encoded as 32-bit\nfloat. Published as a part of the [capture](#capture) service.\n\n### normals/xyz\n[sensor_msgs/msg/PointCloud2](https://docs.ros2.org/latest/api/sensor_msgs/msg/PointCloud2.html)\n\nNormals for the point cloud. The included fields are normal x, y and z coordinates.\nEach coordinate is a float value. There are no additional padding floats, so point-step is\n12 bytes (3*4 bytes). The normals are unit vectors. Note that subscribing to this topic\nwill cause some additional processing time for calculating the normals.\n\n## Samples\n\nIn the `zivid_samples` package we have added samples that demonstrate how to use\nthe Zivid ROS driver. These samples can be used as a starting point for your project.\n\nTo launch the Python samples using `ros2 launch`, you need `python` to be available as a command.\nFor example, the `python-is-python3` package can be installed to achieve this, by running the\nfollowing command:\n\n```bash\nsudo apt install python-is-python3\n```\n\nOn Windows, the Python samples cannot be launched using `ros2 launch`. Instead, please launch the\nsamples using `ros2 run zivid_samples \u003csample_name\u003e.py` together with\n`ros2 run zivid_camera zivid_camera` in another terminal window.\n\n### Sample Capture\n\nThis sample performs single-acquisition 3D captures in a loop. This sample shows how to [configure](#configuration)\nthe capture settings, how to subscribe to the [points/xyzrgba](#pointsxyzrgba) topic, and how to invoke the\n[capture](#capture) service.\n\nSource code: [C++](./zivid_samples/src/sample_capture.cpp) [Python](./zivid_samples/scripts/sample_capture.py)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_capture_cpp\nros2 launch zivid_samples sample.launch sample:=sample_capture.py\n```\nUsing ros2 run (when `zivid_camera` node is already running):\n```bash\nros2 run zivid_samples sample_capture_cpp\nros2 run zivid_samples sample_capture.py\n```\n\n### Sample Capture 2D\n\nThis sample performs single-acquisition 2D captures in a loop. This sample shows how to [configure](#configuration) the\ncapture 2d settings with a YAML string, how to subscribe to the [color/image_color](#colorimage_color) topic, and how to\ninvoke the [capture_2d](#capture_2d) service.\n\nSource code: [C++](./zivid_samples/src/sample_capture_2d.cpp) [Python](./zivid_samples/scripts/sample_capture_2d.py)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_capture_2d_cpp\nros2 launch zivid_samples sample.launch sample:=sample_capture_2d.py\n```\nUsing ros2 run (when `zivid_camera` node is already running):\n```bash\nros2 run zivid_samples sample_capture_2d_cpp\nros2 run zivid_samples sample_capture_2d.py\n```\n\n### Sample Capture and Detect Calibration Board\n\nThis sample performs a capture and detects any calibration board in the current scene. It shows how to invoke the\n[capture_and_detect_calibration_board](#capture_and_detect_calibration_board) service and log the detection results.\n\nSource code: [C++](./zivid_samples/src/sample_capture_and_detect_calibration_board.cpp)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_capture_and_detect_calibration_board_cpp\n```\n\nUsing ros2 run (when `zivid_camera` node is already running):\n\n```bash\nros2 run zivid_samples sample_capture_and_detect_calibration_board_cpp\n```\n\n### Sample Capture and Detect Markers\n\nThis sample performs a capture and detects any fiducial markers in the current scene. It shows how to invoke the\n[capture_and_detect_markers](#capture_and_detect_markers) service and log the detection result.\n\nSource code: [C++](./zivid_samples/src/sample_capture_and_detect_markers.cpp)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_capture_and_detect_markers_cpp\n```\n\nUsing ros2 run (when `zivid_camera` node is already running):\n\n```bash\nros2 run zivid_samples sample_capture_and_detect_markers_cpp\n```\n\n### Sample Capture and Save\n\nThis sample performs a capture, and stores the resulting frame to file. This sample shows how to\n[configure](#configuration) the capture settings with a YAML string, how to invoke the\n[capture_and_save](#capture_and_save) service, and how to read the response from the service call.\n\nSource code: [C++](./zivid_samples/src/sample_capture_and_save.cpp) [Python](./zivid_samples/scripts/sample_capture_and_save.py)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_capture_and_save_cpp\nros2 launch zivid_samples sample.launch sample:=sample_capture_and_save.py\n```\n\nUsing ros2 run (when `zivid_camera` node is already running):\n\n```bash\nros2 run zivid_samples sample_capture_and_save_cpp\nros2 run zivid_samples sample_capture_and_save.py\n```\n\n### Sample Capture Assistant\n\nThis sample shows how to invoke the [capture_assistant/suggest_settings](#capture_assistantsuggest_settings) service to\nsuggest and set capture settings. Then, it shows how to subscribe to the [points/xyzrgba](#pointsxyzrgba) and\n[color/image_color](#colorimage_color) topics, and finally invoke the [capture](#capture) service.\n\nSource code: [C++](./zivid_samples/src/sample_capture_assistant.cpp) [Python](./zivid_samples/scripts/sample_capture_assistant.py)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_capture_assistant_cpp\nros2 launch zivid_samples sample.launch sample:=sample_capture_assistant.py\n```\nUsing ros2 run (when `zivid_camera` node is already running):\n```bash\nros2 run zivid_samples sample_capture_assistant_cpp\nros2 run zivid_samples sample_capture_assistant.py\n```\n\n### Sample Capture with Settings from File\n\nThis sample performs single-acquisition 3D captures in a loop. This sample shows how to [configure](#configuration) the\ncapture settings from a yaml file, how to subscribe to the [points/xyzrgba](#pointsxyzrgba) topic, and how to invoke the\n[capture](#capture) service.\n\nSource code: [C++](./zivid_samples/src/sample_capture_with_settings_from_file.cpp) [Python](./zivid_samples/scripts/sample_capture_with_settings_from_file.py)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_capture_with_settings_from_file_cpp\nros2 launch zivid_samples sample.launch sample:=sample_capture_with_settings_from_file.py\n```\n\nUsing ros2 run (when `zivid_camera` node is already running):\n\n```bash\nros2 run zivid_samples sample_capture_with_settings_from_file_cpp\nros2 run zivid_samples sample_capture_with_settings_from_file.py\n```\n\n### Sample Infield Correction\n\nThis sample shows how to invoke the various [infield_correction/[...]](#infield_correctionread) services to perform infield correction on Zivid cameras.\n\nSource code: [C++](./zivid_samples/src/sample_infield_correction.cpp) [Python](./zivid_samples/scripts/sample_infield_correction.py)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_infield_correction_cpp operation:=\u003coperation\u003e\nros2 launch zivid_samples sample.launch sample:=sample_infield_correction.py operation:=\u003coperation\u003e\n```\nUsing ros2 run (when `zivid_camera` node is already running):\n```bash\nros2 run zivid_samples sample_infield_correction_cpp --ros-args -p operation:=\u003coperation\u003e\nros2 run zivid_samples sample_infield_correction.py --ros-args -p operation:=\u003coperation\u003e\n```\n\nWith the following argument:\n\n`operation` (string, required)\n\u003e Specify the infield correction operation to perform, one of: \n\u003e   - `verify`: Verify camera correction quality based on a single capture using the [`infield_correction/start`](#infield_correctionstart), [`infield_correction/capture`](#infield_correctioncapture), and [`infield_correction/compute`](#infield_correctioncompute) services.\n\u003e   - `correct`: Calculate in-field correction based on a series of captures at different distances. Demonstrates the use of [`infield_correction/start`](#infield_correctionstart), [`infield_correction/capture`](#infield_correctioncapture), and [`infield_correction/compute`](#infield_correctioncompute) services. Begins by preparing the camera node for infield correction captures, then the sample gathers a fixed number of captures at a fixed duration between captures. The correction result is computed after every capture.\n\u003e   - `correct_and_write`: Same as `correct`, but additionally writes the correction results to the camera. Demonstrates the [`infield_correction/compute_and_write`](#infield_correctioncompute_and_write) service.\n\u003e   - `read`: Get information about the correction currently on the connected camera using the [`infield_correction/read`](#infield_correctionread) service.\n\u003e   - `reset`: Reset correction on connected camera to factory settings using the [`infield_correction/reset`](#infield_correctionreset) service.\n\nPlease see the [infield correction documentation](https://support.zivid.com/en/latest/academy/camera/infield-correction.html) for prerequisites and guidelines on how to perform the correction.\n\nFor a more interactive experience, we recommend using the [infield correction panel](#infield-correction-panel) from the Zivid RViz plugin.\n\nThe typical procedure for performing a new infield correction is:\n\n1. `start`: Prepare for infield correction, clears any existing infield correction captures.\n2. `capture`: Take multiple captures from different angles and distances in accordance with the typical operating conditions of the camera.\n3. `compute`: Check the computed correction results and the estimated errors, verify that they give satisfactory results.\n4. `compute_and_write`: Compute the correction and write the results to camera.\n\nThe `zivid_camera` node persists the infield correction dataset as long as it is running. To start the infield correction captures over again, use the `start` operation which clears all infield correction captures previously gathered. The `remove_last_capture` can be used to remove just the last capture.\n\n### Sample Hand-Eye Calibration\n\nThis sample shows how to invoke various [hand_eye_calibration/[...]](#hand_eye_calibrationstart) services to perform\nhand-eye calibration on Zivid cameras. The sample is for exposition only, to demonstrate how the services can be called.\n\nThe sample begins by preparing the camera node for hand-eye calibration. Then a fixed number of captures is gathered at\na fixed duration between captures, using a simulated robot pose. Finally, hand-eye calibration is run using the gathered\ndata.\n\nSource code: [C++](./zivid_samples/src/sample_hand_eye_calibration.cpp) [Python](./zivid_samples/scripts/sample_hand_eye_calibration.py)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_hand_eye_calibration_cpp configuration:=\u003cconfiguration\u003e marker_ids:=\u003cmarker_ids\u003e working_directory:=\u003cworking_directory\u003e\nros2 launch zivid_samples sample.launch sample:=sample_hand_eye_calibration.py configuration:=\u003cconfiguration\u003e marker_ids:=\u003cmarker_ids\u003e working_directory:=\u003cworking_directory\u003e\n```\n\nUsing ros2 run (when `zivid_camera` node is already running):\n```bash\nros2 run zivid_samples sample_hand_eye_calibration_cpp --ros-args -p configuration:=\u003cconfiguration\u003e -p marker_ids:=\u003cmarker_ids\u003e -p working_directory:=\u003cworking_directory\u003e\nros2 run zivid_samples sample_hand_eye_calibration.py --ros-args -p configuration:=\u003cconfiguration\u003e -p marker_ids:=\u003cmarker_ids\u003e -p working_directory:=\u003cworking_directory\u003e\n```\n\nWith the following arguments:\n\n`configuration` (string, required)\n\u003e Specify the configuration for the hand-eye calibration, one of:\n\u003e   - `eye_to_hand`: Performs calibration in the [eye-to-hand configuration](https://support.zivid.com/en/latest/academy/applications/hand-eye/hand-eye-calibration-problem.html#eye-to-hand).\n\u003e   - `eye_in_hand`: Performs calibration in the [eye-in-hand configuration](https://support.zivid.com/en/latest/academy/applications/hand-eye/hand-eye-calibration-problem.html#eye-in-hand).\n\n`marker_ids` (dynamic array of integers, default: *empty*):\n\u003e Specifies a list of [fiducial marker IDs](https://support.zivid.com/en/latest/academy/applications/hand-eye/calibration-object.html) used for detection (e.g. `[1,2,3]`),\n\u003e or empty if a [Zivid calibration board](https://support.zivid.com/en/latest/academy/applications/hand-eye/calibration-object.html) is used instead.\n\n`working_directory` (string, default: *empty*)\n\u003e argument specifies the [working directory](#hand_eye_calibrationstart) used to store the\n\u003e gathered data, or empty to indicate that the data should not be stored on disk.\n\u003e A non-empty value must specify an absolute path to an empty directory.\n\nFor more information on performing the calibration, please see the [Zivid hand-eye calibration documentation](https://support.zivid.com/en/latest/academy/applications/hand-eye.html).\n\n### Sample Intrinsics\n\nThis sample performs 3D captures and prints the published camera intrinsics with different settings. This sample shows\nhow to set the [`intrinsics_source`](#launch-parameters-advanced) parameter, and how to subscribe to the\n[color/camera_info](#colorcamera_info) topic. Please see the Zivid knowledge base on\n[Camera Intrinsics](https://support.zivid.com/en/latest/reference-articles/camera-intrinsics.html) for more details.\n\nSource code: [C++](./zivid_samples/src/sample_intrinsics.cpp)\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_intrinsics_cpp\n```\nUsing ros2 run (when `zivid_camera` node is already running):\n```bash\nros2 run zivid_samples sample_capture_cpp\n```\n\n### Sample with SDK: Capture and Load Frame\n\nThe sample serves to demonstrate how to use the Zivid SDK on the sample-side directly, as a supplement to the services\nprovided by the Zivid camera driver. Captures are still performed using the `zivid_camera` node and its ROS services.\n\nFirst, the sample performs a `capture_and_save` service call to the `zivid_camera` node to save a file to ZDF, just like\nin the [Capture and Save sample](#sample-capture-and-save). Then, it loads the ZDF, using the Zivid SDK directly, and\nprints information about it.\n\nThis sample expects the `zivid_camera` to run in a separate node, in a different process. When using the Zivid API, each\nprocess needs to have its own copy of `Zivid::Application`. For this reason, the sample constructs its own copy of\n`Zivid::Application`.\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_with_sdk_capture_and_load_cpp\n```\n\nOr using ros2 run (when `zivid_camera` node is already running):\n\n```bash\nros2 run zivid_samples sample_with_sdk_capture_and_load_cpp\n```\n\n### Sample Projection\n\nThis sample shows how to use the various [projection/[...]](#ProjectionStart) services. It takes one optional argument\nwhich is a path to an image to be projected:\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_projection_cpp image_path:=\u003cimage\u003e\nros2 launch zivid_samples sample.launch sample:=sample_projection.py image_path:=\u003cimage\u003e\n```\n\nUsing ros2 run (when `zivid_camera` node is already running):\n```\nros2 run zivid_samples sample_projection_cpp --ros-args -p image_path:=\u003cimage\u003e\nros2 run zivid_samples sample_projection.py --ros-args -p image_path:=\u003cimage\u003e\n```\nIf the argument is not given the sample will project a generated image with color gradients.\n\nSource code: [C++](./zivid_samples/src/sample_projection.cpp) [Python](./zivid_samples/scripts/sample_projection.py)\n\n### Sample Project and Capture\n\nThis sample shows how to perform a capture while the projector is on. A simple marker is projected and a 2D capture is\nperformed.\n\n```bash\nros2 launch zivid_samples sample.launch sample:=sample_project_and_capture_cpp\nros2 launch zivid_samples sample.launch sample:=sample_project_and_capture.py\n```\n\nUsing ros2 run (when `zivid_camera` node is already running):\n```\nros2 run zivid_samples sample_project_and_capture_cpp\nros2 run zivid_samples sample_project_and_capture.py\n```\n\nSource code: [C++](./zivid_samples/src/sample_project_and_capture.cpp) [Python](./zivid_samples/scripts/sample_project_and_capture.py)\n\n## Launch Files\n\nSeveral sample launch files are provided for the Zivid camera driver and samples. Common to all of them is that they\nstart a node for the Zivid camera driver and another one for the [robot description for the camera (URDF)](#urdf).\n\n### Common Arguments\n\nCommon arguments to all launch files:\n- `serial_number` (string, default *empty*). Connect to a specific camera by its serial number, empty means connect to\n  the first available camera.\n- `model` (string, default `ZIVID_2_M70`). Choose from the list of [available camera models](#available-models) for the\n  [URDF](#urdf).\n- `field_of_view` (boolean, default `false`). Enable to include a mesh of the camera field of view in the [URDF](#urdf).\n\n### Launch Sample\n\n[`sample.launch`](./zivid_samples/launch/sample.launch)\n: Launches a camera node with its description and a sample.\n\nArguments:\n- `sample`: (string, required). Specify the name of the [sample](#samples).\n\nSee also the [common arguments](#common-arguments) above. There are also additional arguments for specific samples, see\nany arguments listed in the description of a given sample.\n\n### Launch Sample with RViz\n\n[`sample_with_rviz.launch`](./zivid_samples/launch/sample_with_rviz.launch)\n: Launches a camera node with its description and a sample, and opens RViz with the Zivid configuration.\n\nArguments:\n- `sample`: (string, required). Specify the name of the [sample](#samples).\n\nSee also the [common arguments](#common-arguments) above. There are also additional arguments for specific samples, see\nany arguments listed in the description of a given sample.\n\n### Launch Zivid Camera\n\n[`zivid_camera.launch`](./zivid_samples/launch/zivid_camera.launch)\n: Launches a camera node with its description.\n\nSee the [common arguments](#common-arguments) above.\n\n### Launch Zivid Camera with RViz\n\n[`zivid_camera_with_rviz.launch`](./zivid_samples/launch/zivid_camera_with_rviz.launch)\n: Launches a camera node with its description, and opens RViz with the Zivid configuration.\n\nSee the [common arguments](#common-arguments) above.\n\n## RViz Plugin\n\n### Infield Correction Panel\n\nThe Zivid RViz plugin provides a panel to interactively perform infield correction with a Zivid camera.\n\nTo see the panel in RViz, go to `Panels -\u003e Add New Panel`, then select `Zivid Infield Correction` and click `OK`.\nInfield correction can now be performed by interacting with the newly added panel.\n\nThe panel is also visible when [launching](#launch-zivid-camera-with-rviz) the Zivid camera node with RViz, e.g.:\n```\nros2 launch zivid_samples zivid_camera_with_rviz.launch\n```\n\nPlease see the [infield correction documentation](https://support.zivid.com/en/latest/academy/camera/infield-correction.html)\nfor prerequisites and guidelines on how to perform the correction.\n\n## URDF\n\nThe Zivid description package provides a [Unified Robotics Description Format\n(URDF)](https://docs.ros.org/en/jazzy/Tutorials/Intermediate/URDF/URDF-Main.html) for Zivid cameras. Visual and\ncollision models are provided for the Zivid cameras, and a visual model of their field-of-view (FOV) can optionally be\nincluded. The description specifies the coordinate frame of the point cloud (`zivid_optical_frame` by default) in\nrelation to the base of the camera (`zivid_base_link` by default).\n\nThe position and orientation of the optical frame are different between camera models, as well as their FOV. To model\nthese differences, the description is specified in a [Xacro\nmacro](https://docs.ros.org/en/jazzy/Tutorials/Intermediate/URDF/Using-Xacro-to-Clean-Up-a-URDF-File.html) which is used\nto generate the URDF. Ensure that the appropriate [camera model](#available-models) is provided. This is particularly\nimportant when visualizing the FOV, as that has large variations between models.\n\nThe provided relation between the Zivid optical frame and base link is based on uncalibrated values, expect certain\nreal-world differences. [Hand-eye calibration](#sample-hand-eye-calibration) should be performed for accurate placement\nof the point cloud in a target coordinate frame.\n\n### Usage\n\nThe URDF or the underlying macro can be included in your own project.\n\nTo view the Zivid 2, Zivid 2+, or Zivid 2+R cameras in RViz:\n```\nros2 launch zivid_samples zivid_camera_with_rviz.launch model:=ZIVID_2_M70 field_of_view:=true\n```\nPlease see the [available models](#available-models) below.\n\nTo view the camera in RViz and start a sample:\n```\nros2 launch zivid_samples sample_with_rviz.launch model:=ZIVID_2_M70 field_of_view:=true sample:=sample_capture_cpp\n```\n\n### Available Models\n\nThe available Zivid camera models are:\n\n- `ZIVID_2_M70` (default)\n- `ZIVID_2_L100`\n- `ZIVID_2_PLUS_L110`\n- `ZIVID_2_PLUS_M60`\n- `ZIVID_2_PLUS_M130`\n- `ZIVID_2_PLUS_LR110`\n- `ZIVID_2_PLUS_MR130`\n- `ZIVID_2_PLUS_MR60`\n\n## Frequently Asked Questions\n\n### How to visualize the output from the camera in rviz\n\n```bash\nros2 launch zivid_camera visualize.launch\n```\n\n### How to connect to specific Zivid serial number\n\n```bash\nros2 run zivid_camera zivid_camera --ros-args -p serial_number:=ABCD1234\n```\n\n### How to start the driver using settings.yml files\n\nSee section [Configuration](#configuration) for more details.\n```bash\nros2 run zivid_camera zivid_camera --ros-args -p settings_file_path:=/path/to/settings.yml -p settings_2d_file_path:=/path/to/settings2D.yml\n```\n\n### How to start the driver using the sRGB color space set\n\n```bash\nros2 run zivid_camera zivid_camera --ros-args -p color_space:=srgb\n```\n### How to trigger 3D/2D capture via terminal\n\n```bash\nros2 service call /capture std_srvs/srv/Trigger\nros2 service call /capture_2d std_srvs/srv/Trigger\n```\n\n### How to change the color space via terminal\n\n```bash\nros2 param set zivid_camera color_space srgb\nros2 param set zivid_camera color_space linear_rgb\n```\n\n### How to use a file camera\n\n```bash\nros2 run zivid_camera zivid_camera --ros-args -p file_camera_path:=/usr/share/Zivid/data/FileCameraZivid2L100.zfc\n```\n\nVisit our  [knowledgebase](https://support.zivid.com/en/latest/academy/camera/file-camera.html) to download file camera.\n\n### How to use multiple Zivid cameras\n\nYou can use multiple Zivid cameras simultaneously by starting one node per camera and specifying\nunique namespaces per node.\n\n```bash\nros2 run zivid_camera zivid_camera --ros-args --remap __ns:=/zivid_camera1\n```\n\n```bash\nros2 run zivid_camera zivid_camera --ros-args --remap __ns:=/zivid_camera2\n```\n\nYou can combine this with a serial_number parameter (see above) to  control which node uses which camera.\nBy default, the zivid_camera node will connect to the first available (unused) camera. We recommend that\nyou first start the first node, then wait for it to be ready (for example, by waiting for the [capture](#capture)\nservice to be available), and then start the second node. This avoids any race conditions where both nodes\nmay try to connect to the same camera at the same time.\n\n### How to run the unit and module tests\n\nThis project comes with a set of unit and module tests to verify the provided functionality. To run\nthe tests locally, first download and install the required data used for testing:\n```bash\nfor sample in \"FileCameraZivid2M70.zip\" \"BinWithCalibrationBoard.zip\"; do\n    echo \"Downloading ${sample}\"\n    wget -q \"https://www.zivid.com/software/${sample}\" || exit $?\n    mkdir -p /usr/share/Zivid/data/ || exit $?\n    unzip \"./${sample}\" -d /usr/share/Zivid/data/ || exit $?\n    rm \"./${sample}\" || exit $?\ndone\n```\n\nThen run the tests:\n```bash\ncd ~/ros2_ws/ \u0026\u0026 source install/setup.bash\ncolcon test --event-handlers console_direct+ \u0026\u0026 colcon test-result --all\n```\n\nThe tests can also be run via [docker](https://www.docker.com/). See the\n[GitHub Actions configuration file](./.github/workflows/ROS-commit.yml) for details.\n\n### How to enable debug logging\n\nThe node logs extra information at log level debug, including the settings used when capturing.\nEnable debug logging to troubleshoot issues:\n\n```bash\nros2 run zivid_camera zivid_camera  --ros-args --log-level debug\n```\n\nAbove will enable debug logging for all components, you can also specify just the zivid_camera\nlogger like so:\n```\nros2 run zivid_camera zivid_camera  --ros-args --log-level zivid_camera:=debug\n```\n\n### How to compile the project with warnings enabled\n\n```bash\ncolcon build --cmake-args -DCOMPILER_WARNINGS=ON\n```\n\n### How to format the source code\n\nThe CI test for this package enforces the linting defined by `clang-format`. From the code analysis\ndocker image, run:\n\n```bash\nfind /host -name '*.cpp' -or -name '*.hpp' | xargs clang-format -i\n```\n\nThe style follows the one from\n[`ament_clang_format`](https://github.com/ament/ament_lint/blob/master/ament_clang_format/doc/index.rst).\n\n## License\n\nThis project is licensed under BSD 3-clause license, see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nPlease report any issues or feature requests related to the ROS driver in the issue tracker.\nVisit [Zivid Knowledge Base][zivid-knowledge-base-url] for general help on using Zivid 3D\ncameras. If you cannot find a solution to your issue, please contact customersuccess@zivid.com.\n\n## Acknowledgements\n\n\u003cimg src=\"https://www.zivid.com/software/zivid-ros/rosin_logo.png\"\u003e\n\nThis FTP (Focused Technical Project) has received funding from the European Union's\nHorizon 2020 research and innovation programme under the project ROSIN with the\ngrant agreement No 732287. For more information, visit [rosin-project.eu](http://rosin-project.eu/).\n\n[ci-badge]: https://img.shields.io/github/actions/workflow/status/zivid/zivid-ros/ROS-commit.yml?branch=master\n[ci-url]: https://github.com/zivid/zivid-ros/actions?query=workflow%3A%22ROS+Commit%22+branch%3Amaster+\n[header-image]: https://www.zivid.com/hubfs/softwarefiles/images/zivid-generic-github-header.png\n\n[zivid-knowledge-base-url]: https://support.zivid.com\n[zivid-software-installation-url]: https://support.zivid.com/latest/getting-started/software-installation.html\n[install-opencl-drivers-ubuntu-url]: https://support.zivid.com/latest/getting-started/software-installation/gpu/install-opencl-drivers-ubuntu.html\n[hdr-getting-good-point-clouds-url]: https://support.zivid.com/latest/academy/camera/capturing-high-quality-point-clouds/getting-the-right-exposure-for-good-point-clouds.html\n[firmware-update-kb-url]: https://support.zivid.com/latest/academy/camera/firmware-update.html\n[presets-kb-url]: https://support.zivid.com/en/latest/reference-articles/presets-settings.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzivid%2Fzivid-ros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzivid%2Fzivid-ros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzivid%2Fzivid-ros/lists"}