Skip to content

Commit

Permalink
Merge pull request #29 from zivid/update_to_1.8.1_and_improve_readme
Browse files Browse the repository at this point in the history
Update to 1.8.1 and improve readme
  • Loading branch information
apartridge authored Jun 19, 2020
2 parents f701857 + 0640ec0 commit 0b57090
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 49 deletions.
54 changes: 28 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -317,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).
Expand Down Expand Up @@ -374,29 +376,29 @@ In order to capture a point cloud at least one frame needs to be enabled.

| Name | Type | Zivid API Setting | Note |
|------------------------------------|--------|--------------------------------|------------------|
| `capture/frame_<n>/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_<n>/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_<n>/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_<n>/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_<n>/enabled` | bool | |
| `capture/frame_<n>/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_<n>/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_<n>/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_<n>/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_<n>/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_<n>/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

`capture/general` contains settings that apply to all frames in a 3D capture.

| 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

Expand All @@ -406,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

Expand Down
19 changes: 8 additions & 11 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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']
9 changes: 3 additions & 6 deletions continuous-integration/setup/setup_build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions zivid_camera/test/test_zivid_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,12 @@ class ZividCATest : public ZividNodeTest
std::vector<std::unique_ptr<dynamic_reconfigure::Client<zivid_camera::CaptureFrameConfig>>> 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 })
Expand All @@ -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);
Expand All @@ -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 };
Expand All @@ -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 };
Expand Down

0 comments on commit 0b57090

Please sign in to comment.