I want to run a ros package that includes the pytorch library. I created a virtual environment using python venv and ran the roslaunch file while actvating the virtual environment. However, the ros package cannot finding the torch library.
I added <env>tag to specify the python interpreter. Then this error are occurred.
In terminal, I can import torch and rospy.
I’m already using different version of torch in local, so I need to use virtual environment.
In other package, there was no problem in launch the package with python venv.
Just make a virtual environment, Activate it, Download the dependency, and Launch the ros package, It worked.
Did I miss something? Let me know how I can solve it.
I’m using ROS noetic, Ubuntu 20.04, python 3.8.10.