How to link libtorch in ros?

Does anyone build robot with deep learning powered by pytorch??

I have a conflict situation now:

  • libtorch built with gcc4.9, it using old ABI which can not link with higher programs.
  • ros does not support lower ABI

To make libtorch link, I have to disable CXX11_ABI.
but once I disable it, ros can not link to their libs.

if you don’t beleive , you can add this line your ros package, and your ros package can not build and link.

add_compile_options(-std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0)

Any big god could help me out???

1 Like

Hi Jin,

I think it would be a better idea to keep these topics together, as they are apparently all related to libtorch and ROS:
topic2
topic3

Otherwise different users might answer the same aspect multiple times (or try to debug it).

Would you mind collecting all these information in this topic?

ok, just hope someone can help me out

We now have new ABI binaries for libtorch. They can be found on
http://pytorch.org, or at https://github.com/pytorch/pytorch/issues/17492#issuecomment-524692441.