MYNT-EYE-S-SDK/docs/src/slam/viorb.rst

69 lines
2.3 KiB
ReStructuredText
Raw Normal View History

2019-03-14 05:48:41 +02:00
.. _slam_viorb:
How to use in `VIORB <https://github.com/jingpang/LearnVIORB>`_
2019-03-18 11:43:37 +02:00
================================================================
2019-03-14 05:48:41 +02:00
If you wanna run VIORB with MYNT® EYEplease follow the steps:
---------------------------------------------------------------
1. Download `MYNT-EYE-S-SDK <https://github.com/slightech/MYNT-EYE-S-SDK.git>`_ and install mynt_eye_ros_wrapper.
2. Follow the normal procedure to install VIORB.
2019-03-18 09:36:40 +02:00
3. Update camera parameters to ``<VIO>/config/mynteye_s.yaml``.
2019-03-14 05:48:41 +02:00
4. Run mynt_eye_ros_wrapper and VIORB.
Install MYNT-EYE-VIORB-Sample.
------------------------------
.. code-block:: bash
2019-03-18 09:36:40 +02:00
git clone -b mynteye https://github.com/slightech/MYNT-EYE-VIORB-Sample.git
2019-03-14 05:48:41 +02:00
cd MYNT-EYE-VIORB-Sample
``ROS_PACKAGE_PATH`` environment variable. Open ``.bashrc`` file and add at the end the following line. Replace ``PATH`` by the folder where you cloned ``MYNT-EYE-VIORB-Sample``:
.. code-block:: bash
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/Examples/ROS/ORB_VIO
Execute:
.. code-block:: bash
cd MYNT-EYE-VIORB-Sample
./build.sh
Get image calibration parameters
----------------------------------
Assume that the left eye of the mynteye camera is used with IMU. Through the ``GetIntrinsics()`` and ``GetExtrinsics()`` function of the `MYNT-EYE-S-SDK <https://github.com/slightech/MYNT-EYE-S-SDK.git>`_ API, you can get the image calibration parameters of the currently open device:
.. code-block:: bash
cd MYNT-EYE-S-SDK
./samples/_output/bin/tutorials/get_img_params
After running the above type, pinhole's ``distortion_parameters`` and ``projection_parameters`` is obtained, and then update to ``<MYNT-EYE-VIORB-Sample>/config/mynteye.yaml``.
2019-03-18 09:36:40 +02:00
.. tip::
You can get the camera model of device when get camera calibration parameters, if model is equidistant you need calibrate pinhole model by yourself or reference :ref:`write_img_params` to write a default pinhole config file to your device.
2019-03-14 05:48:41 +02:00
Run VIORB and mynt_eye_ros_wrapper
--------------------------------------
2019-03-18 09:36:40 +02:00
1. Launch mynteye node
2019-03-14 05:48:41 +02:00
.. code-block:: bash
roslaunch mynt_eye_ros_wrapper mynteye.launch
2019-03-18 09:36:40 +02:00
2. Open another terminal and run viorb
.. code-block:: bash
roslaunch ORB_VIO testmynteye_s.launch
2019-03-14 05:48:41 +02:00
Finally, ``pyplotscripts`` can be used to visualize some results.