From 80b6bc599b6e6013730722a2d7eb8c0a48177348 Mon Sep 17 00:00:00 2001 From: harjeb Date: Sat, 31 Aug 2019 13:57:10 +0800 Subject: [PATCH] docs(*): update docs --- docs/src/firmware/update_auxiliary_chip.rst | 2 +- docs/src/product/spec_s2110.rst | 2 +- docs/src/sdk/control/auto_exposure.rst | 6 +-- docs/src/sdk/control/framerate.rst | 6 +-- docs/src/sdk/control/iic_address.rst | 6 +-- docs/src/sdk/control/imu_range.rst | 6 +-- docs/src/sdk/control/infrared.rst | 4 +- docs/src/sdk/control/manual_exposure.rst | 6 +-- docs/src/sdk/data/contents.rst | 4 ++ docs/src/sdk/data/get_img_params.rst | 2 +- docs/src/sdk/data/get_points.rst | 56 +++++++++++++++++++++ docs/src/sdk/data/write_img_params.rst | 2 +- docs/src/sdk/data/write_imu_params.rst | 2 +- docs/src/wrapper/ros.rst | 6 +-- 14 files changed, 85 insertions(+), 25 deletions(-) create mode 100644 docs/src/sdk/data/get_points.rst diff --git a/docs/src/firmware/update_auxiliary_chip.rst b/docs/src/firmware/update_auxiliary_chip.rst index a46a373..5d555c1 100644 --- a/docs/src/firmware/update_auxiliary_chip.rst +++ b/docs/src/firmware/update_auxiliary_chip.rst @@ -3,7 +3,7 @@ Update Auxiliary Chip Firmware ================================== -Update auxiliary chip (Only Support S2100/S210A) +Update auxiliary chip (Only Support S21XX) ------------------------------------------------ * Plug in the MYNT® EYE camera into a USB3.0 port diff --git a/docs/src/product/spec_s2110.rst b/docs/src/product/spec_s2110.rst index 71d844a..8f65c5c 100644 --- a/docs/src/product/spec_s2110.rst +++ b/docs/src/product/spec_s2110.rst @@ -9,7 +9,7 @@ Product Specification ========================== ===================================================== - Model S2110-146/Color + Model S2110-95/Color -------------------------- ----------------------------------------------------- Size PCB dimension:15x100mm Total dimension:125x47x26.6mm diff --git a/docs/src/sdk/control/auto_exposure.rst b/docs/src/sdk/control/auto_exposure.rst index 935699a..aa7fd6f 100644 --- a/docs/src/sdk/control/auto_exposure.rst +++ b/docs/src/sdk/control/auto_exposure.rst @@ -13,7 +13,7 @@ For mynteye s1030, the settings available for adjustment during auto exposure ar * ``Option::MAX_EXPOSURE_TIME`` Maximum exposure time. * ``Option::DESIRED_BRIGHTNESS`` Expected brightness. -For mynteye s2100/s210a, the settings available for adjustment during auto exposure are: +For mynteye s21XX, the settings available for adjustment during auto exposure are: * ``Option::MAX_GAIN`` Maximum gain. * ``Option::MAX_EXPOSURE_TIME`` Maximum exposure time. @@ -45,7 +45,7 @@ s1030: LOG(INFO) << "Set DESIRED_BRIGHTNESS to " << api->GetOptionValue(Option::DESIRED_BRIGHTNESS); -s2100/s210a: +s21XX: .. code-block:: c++ @@ -97,7 +97,7 @@ s1030: I0513 14:07:58.521375 31845 auto_exposure.cc:41] Set DESIRED_BRIGHTNESS to 192 -s2100/s210a: +s21XX: .. code-block:: bash diff --git a/docs/src/sdk/control/framerate.rst b/docs/src/sdk/control/framerate.rst index a14e617..d89146b 100644 --- a/docs/src/sdk/control/framerate.rst +++ b/docs/src/sdk/control/framerate.rst @@ -12,7 +12,7 @@ For mynteye s1030, to set the image frame rate and IMU frequency, set ``Option:: * The effective fps of the image: 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60. * The effective frequency of IMU: 100, 200, 250, 333, 500. -For mynteye s2100/s210a, the image frame rate should be selected when running the sample, and the frame rate and resolution are combined as follows: +For mynteye s21XX, the image frame rate should be selected when running the sample, and the frame rate and resolution are combined as follows: .. code-block:: bash @@ -45,7 +45,7 @@ s1030: LOG(INFO) << "Set IMU_FREQUENCY to " << api->GetOptionValue(Option::IMU_FREQUENCY); -s2100/s210a: +s21XX: .. code-block:: c++ @@ -78,7 +78,7 @@ s1030: I0513 14:06:21.702388 31813 framerate.cc:85] Img count: 573, fps: 24.6122 I0513 14:06:21.702404 31813 framerate.cc:87] Imu count: 11509, hz: 494.348 -s2100/s210a: +s21XX: .. code-block:: bash diff --git a/docs/src/sdk/control/iic_address.rst b/docs/src/sdk/control/iic_address.rst index 352e22c..ab64d0f 100644 --- a/docs/src/sdk/control/iic_address.rst +++ b/docs/src/sdk/control/iic_address.rst @@ -9,11 +9,11 @@ To set the IIC address, set ``Option::IIC_ADDRESS_SETTING``. .. Attention:: - Only support S210A/2100 + Only support S21XX Reference Code: -s210a/s2100: +s2XX: .. code-block:: c++ @@ -33,7 +33,7 @@ s210a/s2100: Reference running results on Linux: -s210a/s2100: +s21XX: .. code-block:: bash diff --git a/docs/src/sdk/control/imu_range.rst b/docs/src/sdk/control/imu_range.rst index 4248fcf..074b6c8 100644 --- a/docs/src/sdk/control/imu_range.rst +++ b/docs/src/sdk/control/imu_range.rst @@ -13,7 +13,7 @@ To set the range of accelerometer and gyroscope, set ``Option::ACCELEROMETER_RAN * The effective range of accelerometer(unit:g): 4, 8, 16, 32. * Gyroscope Range Valid value (unit: DEG/S): 500, 1000, 2000, 4000. - For mynteye s2100/s210a, the available settings are: + For mynteye s21XX, the available settings are: * The effective range of accelerometer(unit:g): 6, 12, 24, 48. * The effective range of gyroscope(unit:deg/s): 250, 500, 1000, 2000, 4000. @@ -38,7 +38,7 @@ s1030: LOG(INFO) << "Set GYROSCOPE_RANGE to " << api->GetOptionValue(Option::GYROSCOPE_RANGE); -s2100/s210a: +s21XX: .. code-block:: c++ @@ -78,7 +78,7 @@ s1030: I/imu_range.cc:84 Img count: 363, fps: 25.0967 I/imu_range.cc:86 Imu count: 2825, hz: 195.312 -s2100/s210a: +s21XX: .. code-block:: bash diff --git a/docs/src/sdk/control/infrared.rst b/docs/src/sdk/control/infrared.rst index 83bf925..0b8802e 100644 --- a/docs/src/sdk/control/infrared.rst +++ b/docs/src/sdk/control/infrared.rst @@ -8,7 +8,7 @@ Using the ``SetOptionValue()`` function of the API, you can set various control Enabling IR is setting ``Option::IR_CONTROL`` greater than 0. The greater the value, the greater the IR's intensity. .. Attention:: - * mynteye s2100/s210a doesn't support this feature. + * mynteye s21XX doesn't support this feature. Reference Code: @@ -49,6 +49,6 @@ At this point, if the image is displayed, you can see IR speckle on the image, a .. attention:: - The hardware will not record the IR value after being turned off. In order to keep IR enabled, you must set the IR value after turning on the device. + The hardware will not record the IR value after being turned off and will reset to 0. In order to keep IR enabled, you must set the IR value after turning on the device. Complete code samples,see `ctrl_infrared.cc `_ . diff --git a/docs/src/sdk/control/manual_exposure.rst b/docs/src/sdk/control/manual_exposure.rst index da944f0..0eee65c 100644 --- a/docs/src/sdk/control/manual_exposure.rst +++ b/docs/src/sdk/control/manual_exposure.rst @@ -13,7 +13,7 @@ For mynteye s1030, during manual exposure, the settings available for adjustment * ``Option::BRIGHTNESS`` Brightness (Exposure time). * ``Option::CONTRAST`` Contrast (Black level calibration). -For mynteye s2100/s210a, during manual exposure, the settings available for adjustment are: +For mynteye s21XX, during manual exposure, the settings available for adjustment are: * ``Option::BRIGHTNESS`` Brightness (Exposure time). @@ -41,7 +41,7 @@ s1030: LOG(INFO) << "Set BRIGHTNESS to " << api->GetOptionValue(Option::BRIGHTNESS); LOG(INFO) << "Set CONTRAST to " << api->GetOptionValue(Option::CONTRAST); -s2100/s210a: +s21XX: .. code-block:: c++ @@ -81,7 +81,7 @@ s1030: I0513 14:09:17.552958 31908 manual_exposure.cc:39] Set BRIGHTNESS to 120 I0513 14:09:17.552963 31908 manual_exposure.cc:40] Set CONTRAST to 116 -s2100/s210a: +s21XX: .. code-block:: bash diff --git a/docs/src/sdk/data/contents.rst b/docs/src/sdk/data/contents.rst index a381091..74e12f7 100644 --- a/docs/src/sdk/data/contents.rst +++ b/docs/src/sdk/data/contents.rst @@ -12,8 +12,12 @@ SDK Data Samples get_stereo_rectified get_disparity get_depth + get_points get_imu get_imu_correspondence get_from_callbacks get_with_plugin + save_params save_single_image + write_img_params + write_imu_params \ No newline at end of file diff --git a/docs/src/sdk/data/get_img_params.rst b/docs/src/sdk/data/get_img_params.rst index 5511918..139f00e 100644 --- a/docs/src/sdk/data/get_img_params.rst +++ b/docs/src/sdk/data/get_img_params.rst @@ -7,7 +7,7 @@ Use ``GetIntrinsics()`` & ``GetExtrinsics()`` to get image calibration parameter .. tip:: The detailed meaning of parameters can reference the files in ``tools/writer/config`` , of these - the image calibration parameters of S2100/S210A are in ``tools/writer/config/S210A`` + the image calibration parameters of S21XX are in ``tools/writer/config/S21XX`` the image calibration parameters of S1030 are in ``tools/writer/config/S1030`` Note diff --git a/docs/src/sdk/data/get_points.rst b/docs/src/sdk/data/get_points.rst new file mode 100644 index 0000000..e7cd256 --- /dev/null +++ b/docs/src/sdk/data/get_points.rst @@ -0,0 +1,56 @@ +.. _data_get_points: + +Get Point Image +================ + +Point images belongs to upper layer of synthetic data. To get this kind of data through ``GetStreamData()``, you need to start the ``EnableStreamData()`` beforehand. It should be check not empty before use. + +For detail process description, please see :ref:`get_stereo` :ref:`get_stereo_rectified` . + + +Sample code snippet: + +.. code-block:: c++ + + auto &&api = API::Create(argc, argv); + + api->EnableStreamData(Stream::POINTS); + + api->Start(Source::VIDEO_STREAMING); + + cv::namedWindow("frame"); + PCViewer pcviewer; + + while (true) { + api->WaitForStreams(); + + auto &&left_data = api->GetStreamData(Stream::LEFT); + auto &&right_data = api->GetStreamData(Stream::RIGHT); + + cv::Mat img; + cv::hconcat(left_data.frame, right_data.frame, img); + cv::imshow("frame", img); + + auto &&points_data = api->GetStreamData(Stream::POINTS); + if (!points_data.frame.empty()) { + pcviewer.Update(points_data.frame); + } + + char key = static_cast(cv::waitKey(1)); + if (key == 27 || key == 'q' || key == 'Q') { // ESC/Q + break; + } + if (pcviewer.WasStopped()) { + break; + } + } + + api->Stop(Source::VIDEO_STREAMING); + +`PCL `_ is used to display point images above. Program will close when point image window is closed. + +Complete code examples, see `get_depth_and_points.cc `_ . + +.. attention:: + + Sample code only compiles when `PCL `_ is ready. If your PCL was installed in a different directory, please set ``CMAKE_PREFIX_PATH`` in `tutorials/CMakeLists.txt `_ to the path of ``PCLConfig.cmake`` . You can find ``CMAKE_PREFIX_PATH`` near ``find_package(PCL)`` . diff --git a/docs/src/sdk/data/write_img_params.rst b/docs/src/sdk/data/write_img_params.rst index 9911b9c..95821c2 100644 --- a/docs/src/sdk/data/write_img_params.rst +++ b/docs/src/sdk/data/write_img_params.rst @@ -24,7 +24,7 @@ And, `samples/config/S1030/img.params.pinhole `_ . If you calibrated the parameters yourself, you can edit the file and run above commands to write them into the device. +The path of parameters folder can be found in `samples/config/imu.params `_ . If you calibrated the parameters yourself, you can edit the file and run above commands to write them into the device. .. warning:: diff --git a/docs/src/wrapper/ros.rst b/docs/src/wrapper/ros.rst index d8523f5..5d0f6af 100644 --- a/docs/src/wrapper/ros.rst +++ b/docs/src/wrapper/ros.rst @@ -54,7 +54,7 @@ The ROS file is structured like follows: │ ├─config/ │ │ ├─device/ │ │ ├─standard.yaml # S1030 - │ │ └─standard2.yaml # S2100/S210A + │ │ └─standard2.yaml # S21XX │ │ ├─laserscan/ │ │ ├─process/ │ │ └─... @@ -72,14 +72,14 @@ The ROS file is structured like follows: │ └─package.xml └─README.md -In ``mynteye.launch``, you can configure the topics and frame_ids, decide which data to enable, ``standard.yaml`` (standard2.yaml is S2100/S210A config file) can set parameters for device. Please set ``gravity`` to the local gravity acceleration. +In ``mynteye.launch``, you can configure the topics and frame_ids, decide which data to enable, ``standard.yaml`` (standard2.yaml is S21XX config file) can set parameters for device. Please set ``gravity`` to the local gravity acceleration. standard.yaml/standard2.yaml: .. code-block:: xml - # s2100/s210a modify frame/resolution + # s21XX modify frame/resolution standard2/request_index: 2 # s1030 modify frame/imu hz