lnotspotl / tbai_isaac

Towards better athletic intelligence
11 stars 2 forks source link

Isaacgym missing libraries when running dtc train.py #4

Open HariP19 opened 4 weeks ago

HariP19 commented 4 weeks ago

Hi thank you sharing the repo. I am trying to run the dtc training code for anymal and I am encountering issues with running the train.py. Can I check if you've encountered this before?

When I initially ran the train.py I faced the following error. which states that it couldn't find the isaacgym libraries.

image

I tried adding the path to the isaacgym libraries directly to the LD_LIBRARY_PATH (could you please confirm if you did this in your setup)?

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/hari_dtc/isaacgym/python/isaacgym/_bindings/linux-x86_64

But after this I'm getting the following error

image

This is happening because there's a conflicting library libtf.so in both isaacgym and ros, image

so I assume I shouldn't be doing this. May I know if you encountered any of this issue in your setup or if you have any insights in solving this?

lnotspotl commented 4 weeks ago

Hi, this is interesting. I did encounter this issue when I was working on the tbai project and unfortunately, as you've noticed, there are clashing library names between ROS and IsaacGym.

What you can try is compile the ROS TF library by yourself, making sure you rename the name of the exported .so files (in my case it was ros_tf.so instead of tf.so)

I should and will update this repository, adding this "workaround", to make sure this is not an issue anymore for anyone else. Thanks for reporting :+1:

HariP19 commented 4 weeks ago

Thanks for the reply. Yeah that's what I was thinking and someone else faced the same issue did the same workaround

https://github.com/isaac-sim/IsaacGymEnvs/issues/62?notification_referrer_id=NT_kwDOARuZSrM0MDIzMTIyNzIzOjE4NTg1OTMw#issuecomment-2294794148

But I felt like it was a bit cumbersome to re-link all the packages that depend on libtf.so.

Looks like the following installed packages depends on ros-noetic-tf, on top of this some of the packages from the tbai_bindings also depends on tf if I am not wrong.

ros-noetic-tf
Reverse Depends:
  ros-noetic-grid-map-ros
  ros-noetic-ros-numpy
  ros-noetic-robot-state-publisher
  ros-noetic-pcl-ros
  ros-noetic-laser-geometry

So can I check if you manually cloned each of them and re-linked them to point to ros_tf instead of tf?

peci1 commented 4 weeks ago

I don't know the details, but do you actually need ROS for training? Can't you have one setup.bash for training, that would just source isaac files, and another setup.bash for "inference"/running the simulation?

HariP19 commented 4 weeks ago

That's my assumption because the training uses ocs2 and elevation mapping modules ( refer to tbai_bindings package) in which different modules communicate with each other via ros.

Also if I don't source the tbai_bindings ros workspace the tbai_ocs2_interface.so (which is the interface to the ros packages and the training code, exported via pybind11) is throwing a dependency error.

lnotspotl commented 3 weeks ago

We are not using tf anywhere during the process of training our DTC controller, so we might just as well remove that dependency from our fork. I don't think that's the right approach, though. It might as well be possible to apply some kind of a patch where we rename NVIDIA's tf library to something else and make the linker aware of that. I will investigate this option.