-
Notifications
You must be signed in to change notification settings - Fork 1
Interfacing TOF With AGX ORIN
naitiknakrani-eic edited this page Apr 6, 2023
·
7 revisions
- Use Type-C to USB connector to connect EVAL-ADTF3175D-NXZ Time of Flight sensor with AGX Orin kit. Type-C end goes to EVAL-ADTF3175D-NXZ Time of Flight sensor, and USB goes to AGX Orin kit as shown in image.
- After connection follow the further steps given in Steps of enable Ros2 topics of TOF to enable depth and IR data from Sensor.
Note- Click here for Setup TOF and AGX ORIN
- To start running ToF, login to EVAL-ADTF3175D-NXZ Time of Flight sensor i.MX8 by running on AGX Orin terminal
ssh [email protected]
password-analog
roslaunch adi_adtf31xx_sensor adi_adtf31xx_sensor.launch
- You will see following logs when ToF starts publishing its data on following topics. Note these topics will be in ROS1 format.
/cam1/camera_info
/cam1/depth_image
/cam1/ir_image
-
To enable ToF topics in ROS2 Humble in AGX Orin, a docker container Humble Docker is used. Please follow the steps given Humble Docker to build a docker container.
-
To go inside docker container, run in a terminal
docker exec -it ros2-humble-jammy bash
Note: Every time a new docker terminal is required run the above command in a separate terminal
- Start ros1_bridge by running following command inside docker /home/analog/.
source ros1_utils/ros1_bridge_ws/install/setup.bash
ros2 run ros1_bridge dynamic_bridge --bridge-all-1to2-topics
Note-Ignore the warning – failed to create 2to1 bridge. Kindly set environment Variable ROS_MASTER_URI=http://10.42.0.1/11311
- Once it is successful running, all the ToF topics will be visible in ROS2 format.
- It can be checked outside docker by running ros2 topic list
- If you encounter (ros2: not found):
source /opt/ros/galactic/setup.bash
- after this command ros2 not found kindly first download galactic in the machine by following Ros2 Galactic.
- The data can be visualized by running rqt in Orin terminal, rqt > plugins > Visualization > Image View
- Here, the timestamps on ROS2 topics coming from i.MX8 board will be different from AGX Orin ROS2 timestamps. To synchronize the topics run the following script inside docker (refer Humble Docker for docker info). First open a new docker terminal.
docker exec -it ros2-humble-jammy bash
python3 scripts/sync_node.py
- After running above scripts three new topics will be visible in terminal after doing:
ros2 topic list
Note: Data will remain the same, only timestamps will be updated. It can be checked by running:
ros2 topic echo <topic_name>
- If anyone working with the ROS2 Galactic system is necessary, follow the instructions in Galactic Docker and redo all the above procedures in an equivalent way using the ROS2 Galactic Docker.
- If there is issue in data visualization, please check if the ToF node is running.
- Sometimes ros1_bridge disconnection happens, if there is any problem, please check ros1_bridge is also running.
- If any node is not running, kindly kill it and re-run the node with the given above commands.
- Please reconnect the TOF's USB cable if you are unable to log in via SSH.
- Setup Requirements for Software and Hardware Components
- Setup for ROS2 Humble docker
- Setup for ROS2 Galactic docker
- Setup for TOF
- Setup for IMU