This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: ORB SLAM3 ON TDA4VM

Part Number: TDA4VM

Tool/software:

Dear TI Officials,

I hope this message finds you well.

I am currently working on implementing SLAM using monocular camera input and would appreciate your guidance. Through my research, I have identified ORB-SLAM3 as a potential solution, and I have successfully implemented it on an x86 system with ROS2 Humble. My next objective is to bring this implementation to the TDA4VM platform.

Could you kindly provide any suggestions or plans on how to proceed with this transition? Additionally, if possible, please share any relevant repository links. If ORB-SLAM3 is not the optimal choice for TDA4VM, I would appreciate information on any pre-built solutions available on the platform that support SLAM with monocular camera input for autonomous navigation.

Best regards,
Ramaseshan

  • Hi Ramaseshan,

    I would recommend going through our Robotics SDK if you have not already: https://software-dl.ti.com/jacinto7/esd/robotics-sdk/10_00_00/TDA4VM/docs/source/README.html

    This SDK is a Docker-based method to run ROS2 on SK-TDA4VM which you can use to port your demo. If no hardware accelerator is used, you may run the demo as-is. 

    Regards,

    Takuma

  • Hi Takuma,

    Thank you for your previous response and the Robotics SDK recommendation.

    To clarify my objective, I am working on building two packages:

    1. ORB-SLAM3 package – to handle the SLAM inference,
    2. Publisher package – to publish video frames, which ORB-SLAM3 subscribes to via a common topic.

    I have successfully implemented this setup on an x86 system using ROS2 Humble, and now my goal is to replicate this on the TDA4VM platform.

    Would it be possible to build and run the ORB-SLAM3 library directly on the TDA4VM hardware? Additionally, it is mandatory that the ORB-SLAM3 package links with the ORB-SLAM3 library installed on TDA4VM. If there are any specific steps, dependencies, or considerations required for this setup, I would greatly appreciate your guidance.

    Thank you once again for your support.

    Best regards,
    Ramaseshan

  • Hi Ramaseshan,

    If there is no specific dependency to hardware, like GPU or some other accelerator, then your libraries should build on TDA4VM hardware.

    If there are software library dependencies, then they can be pulled in using apt or rosdep, similar to how it would be done on a PC, using the Docker-based Ubuntu image on TDA4VM which the Robotics SDK sets up.

    Regards,

    Takuma

  • Hi Takuma,

    Thank you for the clarification.

    Just to confirm, as ORB-SLAM3 does not have specific hardware dependencies such as GPU acceleration, I will proceed with building the library on the TDA4VM hardware as you suggested. I will also make use of apt or rosdep for pulling in any software dependencies within the Docker-based Ubuntu image from the Robotics SDK.

    One more question: Is it necessary to build ORB-SLAM3 inside the Docker environment set up by the Robotics SDK (version 10.0), or could this be done directly on the TDA4VM system outside of Docker? I just want to ensure that I’m following the correct workflow.

    If I encounter any issues during the build process or face specific TDA4VM-related challenges, would it be alright to reach out for further assistance?

    Thanks again for your support.

    Best regards,
    Ramaseshan

  • Hi Ramaseshan,

    It would most likely be hard to build ORB-SLAM3 outside the Docker environment, because one purpose of the Docker environment is to give developers access to the apt package manager built-in with Ubuntu. Using the Docker Ubuntu environment, developers will not have to manually search, build, and install dependency packages, and instead just download and install prebuilt packages through apt.

    And yes, if you face issues, please feel free to reach out. Although, if issues are more at the ROS-level and not issues with the Docker image from TI or TI board, it may be more appropriate to reach out to the ROS community as their expertise may prove to be more fit.

    Regards,

    Takuma

  • Hi Takuma,

    Thank you for the clarification.

    I’ll proceed with building ORB-SLAM3 inside the Docker Ubuntu environment from the Robotics SDK to simplify dependency management using apt. If I face any difficulties during the build process, I might reach out to you for further guidance.

    Thanks again for your help!

    Best regards,
    Ramaseshan

  • Hi Takuma,

    I have been exploring the TDA4VM SDK version 10.0 and noticed various directories such as /opt, /root, /boot, and /bin, including folders like edgeai-gst apps and edgeai-gst-plugins etc...

    Could you please provide guidance on how to install and set up the Docker environment for this SDK? Additionally, I have a ROS2 workspace on my PC containing two packages, ORB-SLAM3 and Publisher. What steps should I follow to run these packages in the Docker environment on TDA4VM?

    Thank you for your assistance!

    Best regards,
    Ramaseshan

  • Hi Ramaseshan,

    Please follow the "Setting Up Robotics SDK" section of the documentation I have linked previously: https://software-dl.ti.com/jacinto7/esd/robotics-sdk/10_00_00/TDA4VM/docs/source/docker/README.html 

    Regards,

    Takuma

  • Hi Takuma,

    Thank you for the link to the Robotics SDK documentation. I’ll go through it for setting up the Docker environment.

    I have one more question regarding the ORB-SLAM3 library. ORB-SLAM3 requires dependencies such as Pangolin, Eigen3, DBoW2, and g2o. Could you confirm if the following repositories can be installed and run on TDA4VM within the Docker environment?

    Your advice on this would be greatly appreciated!

    Best regards,
    Ramaseshan

  • Hi Ramaseshan,

    Unfortunately, I have not used those particular libraries, so I cannot say whether it will work on TDA4VM within the Docker environment. The best recommendation I can give is to try them out.

    Regards,

    Takuma

  • Hi Takuma,

    Anyway thanks for your response. Let me give a try and DM you if your support required, also if i get succeed i will be happy to share that too with you.

    Regards,
    Ramaseshan

  • Hi Takuma,

    I am happy to share the progress with you. I successfully compiled the pre-requisite packages of orb slam3 like pangolin, g2o, Sophus, opencv inside the docker. When I try to build the orb slam3, the hardware is getting struck & I could not see the building process after a certain number. Is there any way to overcome this issue? When the building process starts almost 2GB of ram is used out of 2.12 GB ram. Can I do cross compilation in my pc & port the slam here?. I am looking forward to your thoughts.

    Regards,

    Ramaseshan 

  • Hi Ramaseshan,

    Great to hear the progress! As for orb slam3 getting stuck, lack of RAM will most likely do it.

    As for options, yes, you could do some cross compilation on a PC for arm architecture and transfer over the binaries. Cross compiler toolchains can be found here: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/10_00_00_08/exports/docs/linux/Overview/GCC_ToolChain.html. And I think ROS2 would have some documentation on their website for how to cross compile for arm target.

    As a different alternative, if you have a NVMe SSD card formatted for ext4, that can be installed on the M.2 key slot on the underside of the SK-TDA4VM. The SSD can then be used to set up a swapfile to increase the memory (although the compilation would be slow). This will allow you to continue to do on-target compilation.

    Regards,

    Takuma

  • Hi Takuma,

    Thank you for the suggestions and the helpful links!

    Could you also share some resources for purchasing a compatible NVMe SSD card to use with the TDA4VM? It would help me get things set up for swap memory if needed.

    Currently, I’ve cross-compiled OpenCV, g2o, DBOW2, and Sophus for the ARM architecture, and I’m yet to complete ORB-SLAM3 and Pangolin. Once everything is compiled and built for ARM, how do I go about porting it to the TDA4VM? Should I transfer the entire directory from my PC to the TDA4VM? I assume transferring only the binaries and headers wouldn’t suffice since ORB-SLAM3 integrates with several components, like receiving input from the EuRoC dataset or images published from a ROS2 node.

    Also, since I’m compiling everything specifically for the ARM architecture, I’ll need to run it directly on the hardware, right? Running inside a Docker container might not work since the Docker image uses Ubuntu 22.04, if I’m not mistaken.

    Looking forward to your guidance!

    Regards,
    Ramaseshan

  • Hi Ramaseshan,

    I use this SSD card and have not had any issues:

    As for once everything is cross-compiled, it should be as simple as transferring binaries and headers and running within Docker. The Docker image pulls Ubuntu 22.04 for arm64v8, so as long as the correct sysroot was used and toolchain was used during cross-compilation, it should work inside the Docker container.

    Regards,

    Takuma