From d3d0cbd9f65a750be110107bf0e991019330adac Mon Sep 17 00:00:00 2001 From: Stian Pedersen Date: Fri, 19 Jun 2020 16:08:35 +0200 Subject: [PATCH 1/4] README: Improvements, add information about supported SDK version Mention the supported versions in the README. Add a link to the releases page, if the user needs to use older SDK versions. This is preparation work before we update the ROS driver to major version 2. --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5ed3fbe5..7443f114 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,15 @@ sudo apt-get install -y python-catkin-tools git ### Zivid SDK -To use the ROS driver you need to download and install the "Zivid Core" package. +To use the ROS driver you need to download and install the "Zivid Core" package. SDK version 1.8.0 and +1.8.1 are supported. See [releases](https://github.com/zivid/zivid-ros/releases) for older ROS driver +releases that supports older SDK versions. + Follow [this guide](https://zivid.atlassian.net/wiki/spaces/ZividKB/pages/59080712/Zivid+Software+Installation) -to install Zivid for your version of Ubuntu. "Zivid Studio" and "Zivid Tools" packages are -not required by the ROS driver, but can be useful for testing that your system has been setup correctly -and that the camera is detected. +to install "Zivid Core" for your version of Ubuntu. The "Zivid Studio" and "Zivid Tools" packages can be useful +to test your system setup and camera, but are not required by the driver. -An OpenCL 1.2 compatible GPU and OpenCL driver is required by the Zivid SDK. Follow +An OpenCL 1.2 compatible GPU with driver installed is required by the SDK. Follow [this guide](https://zivid.atlassian.net/wiki/spaces/ZividKB/pages/426519/Install+OpenCL+drivers+on+Ubuntu) to install OpenCL drivers for your system. From 67b79d00d3b2dfeef42edc1c577449f7b5690a5a Mon Sep 17 00:00:00 2001 From: Stian Pedersen Date: Fri, 19 Jun 2020 16:08:35 +0200 Subject: [PATCH 2/4] README: Update all settings links to use version 1.8.1 --- README.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 7443f114..c8ab52f4 100644 --- a/README.md +++ b/README.md @@ -319,8 +319,8 @@ and combining the captures into one high-quality point cloud. For more informati The capture settings available in the `zivid_camera` node matches the settings in the Zivid API. To become more familiar with the different settings and what they do, see the API reference for the -[Settings](http://www.zivid.com/hubfs/softwarefiles/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings.html) -and [Settings2D](http://www.zivid.com/hubfs/softwarefiles/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings2D.html) +[Settings](http://www.zivid.com/hubfs/softwarefiles/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings.html) +and [Settings2D](http://www.zivid.com/hubfs/softwarefiles/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings2D.html) classes, or use Zivid Studio. The settings can be viewed and configured using [dynamic_reconfigure](https://wiki.ros.org/dynamic_reconfigure). @@ -376,12 +376,12 @@ In order to capture a point cloud at least one frame needs to be enabled. | Name | Type | Zivid API Setting | Note | |------------------------------------|--------|--------------------------------|------------------| -| `capture/frame_/bidirectional` | bool | [Zivid::Settings::Bidirectional](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Bidirectional.html) -| `capture/frame_/brightness` | double | [Zivid::Settings::Brightness](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Brightness.html) +| `capture/frame_/bidirectional` | bool | [Zivid::Settings::Bidirectional](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Bidirectional.html) +| `capture/frame_/brightness` | double | [Zivid::Settings::Brightness](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Brightness.html) | `capture/frame_/enabled` | bool | | -| `capture/frame_/exposure_time` | int | [Zivid::Settings::ExposureTime](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1ExposureTime.html) | Specified in microseconds (µs) -| `capture/frame_/gain` | double | [Zivid::Settings::Gain](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Gain.html) -| `capture/frame_/iris` | int | [Zivid::Settings::Iris](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Iris.html) +| `capture/frame_/exposure_time` | int | [Zivid::Settings::ExposureTime](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1ExposureTime.html) | Specified in microseconds (µs) +| `capture/frame_/gain` | double | [Zivid::Settings::Gain](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Gain.html) +| `capture/frame_/iris` | int | [Zivid::Settings::Iris](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Iris.html) ### General settings for 3D @@ -389,16 +389,16 @@ In order to capture a point cloud at least one frame needs to be enabled. | Name | Type | Zivid API Setting | |-----------------------------------------------|--------|----------------------------------------| -| `capture/general/blue_balance` | double | [Zivid::Settings::BlueBalance](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1BlueBalance.html) -| `capture/general/filters_contrast_enabled` | bool | [Zivid::Settings::Filters::Contrast::Enabled](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Contrast_1_1Enabled.html) -| `capture/general/filters_contrast_threshold` | double | [Zivid::Settings::Filters::Contrast::Threshold](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Contrast_1_1Threshold.html) -| `capture/general/filters_gaussian_enabled` | bool | [Zivid::Settings::Filters::Gaussian::Enabled](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Gaussian_1_1Enabled.html) -| `capture/general/filters_gaussian_sigma` | double | [Zivid::Settings::Filters::Gaussian::Sigma](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Gaussian_1_1Sigma.html) -| `capture/general/filters_outlier_enabled` | bool | [Zivid::Settings::Filters::Outlier::Enabled](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Outlier_1_1Enabled.html) -| `capture/general/filters_outlier_threshold` | double | [Zivid::Settings::Filters::Outlier::Threshold](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Outlier_1_1Threshold.html) -| `capture/general/filters_reflection_enabled` | bool | [Zivid::Settings::Filters::Reflection::Enabled](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Reflection_1_1Enabled.html) -| `capture/general/filters_saturated_enabled` | bool | [Zivid::Settings::Filters::Saturated::Enabled](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Saturated_1_1Enabled.html) -| `capture/general/red_balance` | double | [Zivid::Settings::RedBalance](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings_1_1RedBalance.html) +| `capture/general/blue_balance` | double | [Zivid::Settings::BlueBalance](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1BlueBalance.html) +| `capture/general/filters_contrast_enabled` | bool | [Zivid::Settings::Filters::Contrast::Enabled](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Contrast_1_1Enabled.html) +| `capture/general/filters_contrast_threshold` | double | [Zivid::Settings::Filters::Contrast::Threshold](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Contrast_1_1Threshold.html) +| `capture/general/filters_gaussian_enabled` | bool | [Zivid::Settings::Filters::Gaussian::Enabled](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Gaussian_1_1Enabled.html) +| `capture/general/filters_gaussian_sigma` | double | [Zivid::Settings::Filters::Gaussian::Sigma](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Gaussian_1_1Sigma.html) +| `capture/general/filters_outlier_enabled` | bool | [Zivid::Settings::Filters::Outlier::Enabled](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Outlier_1_1Enabled.html) +| `capture/general/filters_outlier_threshold` | double | [Zivid::Settings::Filters::Outlier::Threshold](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Outlier_1_1Threshold.html) +| `capture/general/filters_reflection_enabled` | bool | [Zivid::Settings::Filters::Reflection::Enabled](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Reflection_1_1Enabled.html) +| `capture/general/filters_saturated_enabled` | bool | [Zivid::Settings::Filters::Saturated::Enabled](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1Filters_1_1Saturated_1_1Enabled.html) +| `capture/general/red_balance` | double | [Zivid::Settings::RedBalance](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings_1_1RedBalance.html) ### Frame settings for 2D @@ -408,11 +408,11 @@ calling the [capture_2d](#capture_2d) service, otherwise the service will return | Name | Type | Zivid API Setting | Note | |------------------------------------|--------|--------------------------------|------------------| -| `capture_2d/frame_0/brightness` | double | [Zivid::Settings2D::Brightness](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings2D_1_1Brightness.html) +| `capture_2d/frame_0/brightness` | double | [Zivid::Settings2D::Brightness](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings2D_1_1Brightness.html) | `capture_2d/frame_0/enabled` | bool | | -| `capture_2d/frame_0/exposure_time` | int | [Zivid::Settings2D::ExposureTime](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings2D_1_1ExposureTime.html) | Specified in microseconds (µs) -| `capture_2d/frame_0/gain` | double | [Zivid::Settings2D::Gain](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings2D_1_1Gain.html) -| `capture_2d/frame_0/iris` | int | [Zivid::Settings2D::Iris](https://www.zivid.com/software/releases/1.8.0+89ae8b3e-39/doc/cpp/classZivid_1_1Settings2D_1_1Iris.html) +| `capture_2d/frame_0/exposure_time` | int | [Zivid::Settings2D::ExposureTime](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings2D_1_1ExposureTime.html) | Specified in microseconds (µs) +| `capture_2d/frame_0/gain` | double | [Zivid::Settings2D::Gain](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings2D_1_1Gain.html) +| `capture_2d/frame_0/iris` | int | [Zivid::Settings2D::Iris](https://www.zivid.com/software/releases/1.8.1+6967bc1b-1/doc/cpp/classZivid_1_1Settings2D_1_1Iris.html) ## Samples From 77836d0e64646578243b191b98c732510bbddd26 Mon Sep 17 00:00:00 2001 From: Stian Pedersen Date: Fri, 19 Jun 2020 16:08:35 +0200 Subject: [PATCH 3/4] Test both Zivid SDK 1.8.0 and 1.8.1 in the CI The newest 1.x SDK version is 1.8.1. The ROS driver supports 1.8.0 and 1.8.1 and both should be tested in the CI. --- azure-pipelines.yml | 19 ++++++++----------- .../setup/setup_build_and_test.sh | 9 +++------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 61b4aba6..73dfa1de 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ schedules: - master always: true variables: - newest_zivid_version: '1.8.0+89ae8b3e-39' + newest_zivid_version: '1.8.1+6967bc1b-1' stages: - stage: Code_Analysis jobs: @@ -29,13 +29,10 @@ stages: zivid_versions: ["${{ variables['newest_zivid_version'] }}"] ros_distros: ['ros:kinetic-ros-base-xenial'] compilers: ['g++-7'] -# -# Currently only newest_zivid_version is supported. Azure Pipelines requires at least one job under -# jobs, so parameters.zivid_versions cannot be empty. Re-enable this when we support >0 old versions. -# - stage: Build_And_Test_Old_Zivid_Melodic_And_Kinetic -# jobs: -# - template: continuous-integration/azure-pipelines/templates/build_and_test.yml -# parameters: -# zivid_versions: [] -# ros_distros: ['ros:melodic-ros-base-bionic', 'ros:kinetic-ros-base-xenial'] -# compilers: ['g++-7'] + - stage: Build_And_Test_Old_Zivid_Melodic_And_Kinetic + jobs: + - template: continuous-integration/azure-pipelines/templates/build_and_test.yml + parameters: + zivid_versions: ['1.8.0+89ae8b3e-39'] + ros_distros: ['ros:melodic-ros-base-bionic', 'ros:kinetic-ros-base-xenial'] + compilers: ['g++-7'] diff --git a/continuous-integration/setup/setup_build_and_test.sh b/continuous-integration/setup/setup_build_and_test.sh index d8fe3b77..d15706c4 100755 --- a/continuous-integration/setup/setup_build_and_test.sh +++ b/continuous-integration/setup/setup_build_and_test.sh @@ -88,13 +88,10 @@ fi echo "Install Zivid and Telicam debian packages" ZIVID_RELEASE_DIR="https://www.zivid.com/hubfs/softwarefiles/releases/$CI_TEST_ZIVID_VERSION" -ZIVID_TELICAM_SDK_DEB="zivid-telicam-driver_2.0.0.1-1_amd64.deb" +ZIVID_TELICAM_SDK_DEB="zivid-telicam-driver_3.0.1.1-1_amd64.deb" -if [[ "$CI_TEST_ZIVID_VERSION" =~ ^1\.[3-4]\..* ]]; then - # This can be removed when the minimum required Zivid version is bumped to - # 1.5.0 or newer. - echo "Zivid API version is 1.3 or 1.4, use old telicam-sdk deb." - ZIVID_TELICAM_SDK_DEB="telicam-sdk_2.0.0.1-1_amd64.deb" +if [[ "$CI_TEST_ZIVID_VERSION" =~ ^1\.8\.0.* ]]; then + ZIVID_TELICAM_SDK_DEB="zivid-telicam-driver_2.0.0.1-1_amd64.deb" fi if [[ "$UBUNTU_VERSION" == "16.04" ]]; then From 0640ec09aa05ca6e10143202883f6e7a51c5a115 Mon Sep 17 00:00:00 2001 From: Stian Pedersen Date: Fri, 19 Jun 2020 16:08:35 +0200 Subject: [PATCH 4/4] test_zivid_camera: Use camelCasing in CA tests http://wiki.ros.org/gtest recommends using camelCasing for test names. In this file we mixed a bit between camelCasing and snake_casing. In this commit all tests are updated to use camelCase. --- zivid_camera/test/test_zivid_camera.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zivid_camera/test/test_zivid_camera.cpp b/zivid_camera/test/test_zivid_camera.cpp index e8c5d8d5..75bff047 100644 --- a/zivid_camera/test/test_zivid_camera.cpp +++ b/zivid_camera/test/test_zivid_camera.cpp @@ -553,12 +553,12 @@ class ZividCATest : public ZividNodeTest std::vector>> m_captureFrameClients; }; -TEST_F(ZividCATest, test_ca_service_is_available) +TEST_F(ZividCATest, testCaptureAssistantServiceAvailable) { ASSERT_TRUE(ros::service::waitForService(capture_assistant_suggest_settings_service_name, short_wait_duration)); } -TEST_F(ZividCATest, test_different_max_capture_time_and_ambient_light_frequency) +TEST_F(ZividCATest, testDifferentMaxCaptureTimeAndAmbientLightFrequency) { using Request = zivid_camera::CaptureAssistantSuggestSettings::Request; for (double max_capture_time : { 0.2, 1.2, 10.0 }) @@ -571,7 +571,7 @@ TEST_F(ZividCATest, test_different_max_capture_time_and_ambient_light_frequency) } } -TEST_F(ZividCATest, test_going_from_several_frames_to_1_frame) +TEST_F(ZividCATest, testGoingFromMultipleFramesTo1Frame) { using Request = zivid_camera::CaptureAssistantSuggestSettings::Request; performSuggestSettingsAndCompareWithCppAPI(ros::Duration{ 10.0 }, Request::AMBIENT_LIGHT_FREQUENCY_NONE); @@ -581,7 +581,7 @@ TEST_F(ZividCATest, test_going_from_several_frames_to_1_frame) ASSERT_EQ(numEnabled3DFrames(), 1U); } -TEST_F(ZividCATest, test_capture_assistant_with_invalid_max_capture_time_fails) +TEST_F(ZividCATest, testCaptureAssistantWithInvalidMaxCaptureTimeFails) { zivid_camera::CaptureAssistantSuggestSettings srv; srv.request.max_capture_time = ros::Duration{ 0.0 }; @@ -598,14 +598,14 @@ TEST_F(ZividCATest, test_capture_assistant_with_invalid_max_capture_time_fails) ASSERT_TRUE(ros::service::call(capture_assistant_suggest_settings_service_name, srv)); } -TEST_F(ZividCATest, test_capture_assistant_default_ambient_light_frequency_works) +TEST_F(ZividCATest, testCaptureAssistantDefaultAmbientLightFrequencyWorks) { zivid_camera::CaptureAssistantSuggestSettings srv; srv.request.max_capture_time = ros::Duration{ 1.0 }; ASSERT_TRUE(ros::service::call(capture_assistant_suggest_settings_service_name, srv)); } -TEST_F(ZividCATest, test_capture_assistant_invalid_ambient_light_frequency_fails) +TEST_F(ZividCATest, testCaptureAssistantInvalidAmbientLightFrequencyFails) { zivid_camera::CaptureAssistantSuggestSettings srv; srv.request.max_capture_time = ros::Duration{ 1.0 };