-
Notifications
You must be signed in to change notification settings - Fork 1
ToF‐using‐SDK
-
Enable Wi-Fi inside i.MX8 board and connect it with local router.
• We can generate Wifi Connection by two methods but first make these common changes mentioned below:
$ cd Workspace/Tools/ $ vi adi-enable-wifi.sh
• Open adi-enable-wifi.sh file inside it make following changes:
- comment "sudo reboot"
- above "sudo reboot" line add “sudo systemctl restart wpa_supplicant@wlan0”.
• After changes it will look like below:
• To Apply these changes permanently, make the changes in extlinux.conf. Write "rw" instead of "ro = init/...." in whole file where you see "ro =init/..." as seen in below image.
• Execute following command:
$ ./adi-enable-wifi.sh <SSID> <password>
For example, ( i.e. ./adi-enable-wifi.sh TP-Link abcd#*999)
• Your connection breaks after running the above command so reconnect ToF camera.
• Run "ip addr" command after connecting and see in wlan0 connection established.
Note: In case of troubleshooting, try “sh adi-enable-wifi.sh
-
If there is not Wi-FI available that one can enable network over ethernet. Connect host machine with ethernet cable and your i.MX8 board will access network from host device.
• Check first if ToF is connected and ping is coming by following command:
$ ping 10.42.0.1
Note: If ping is not coming then reconnect the camera and try again.
• Installing the dependencies Cmake, OpenGL, OpenCV:
$ sudo apt install cmake
$ sudo apt install libgl1-mesa-dev libglfw3-dev
$ sudo apt install libopencv-contrib-dev
$ sudo apt install libopencv-dev
• Make one directory using below command and perform all steps in that folder:
$ mkdir tof_sdk_4.2.0 && cd tof_sdk_4.2.0
• Install Glog:
$ git clone --branch v0.6.0 --depth 1 https://github.com/google/glog
$ cd glog
$ mkdir build_0_6_0 && cd build_0_6_0
$ cmake -DWITH_GFLAGS=off -DCMAKE_INSTALL_PREFIX=/opt/glog ..
$ sudo cmake --build . --target install
• Install Libwebsockets:
$ cd tof_sdk_4.2.0
$ git clone --branch v3.1-stable --depth 1 https://github.com/warmcat/libwebsockets
$ cd libwebsockets
$ mkdir build_3_1 && cd build_3_1
$ cmake -DLWS_WITH_SSL=OFF -DLWS_STATIC_PIC=ON -DCMAKE_INSTALL_PREFIX=/opt/websockets ..
$ sudo cmake --build . --target install
• Install Protobuf:
$ cd tof_sdk_4.2.0
$ git clone --branch v3.9.0 --depth 1 https://github.com/protocolbuffers/protobuf
$ cd protobuf
$ mkdir build_3_9_0 && cd build_3_9_0
$ cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/opt/protobuf ../cmake
$ sudo cmake --build . --target install
• Download and build SDK version 4.2.0 only
$ cd tof_sdk_4.2.0
$ git clone --branch v4.2.0 --depth 1 https://github.com/analogdevicesinc/ToF
$ cd ToF
$ mkdir build && cd build
$ cmake -DWITH_EXAMPLES=on -DWITH_NETWORK=on -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" -DUSE_DEPTH_COMPUTE_OPENSOURCE=on ..
$ sudo make install
• Now go to below mentioned path: $ cd tof_sdk_4.2.0/ToF/build/examples/tof-viewer
• Now here you get one file named ADIToFGUI run that file using below command $ ./ADIToFGUI
• You will see the following view on GUI viewer.
- Setup Requirements for Software and Hardware Components
- Setup for ROS2 Humble docker
- Setup for ROS2 Galactic docker
- Setup for TOF
- Setup for IMU