Я хочу написать контроллер в Python и пытаюсь импортировать библиотеку контроллеров Webots:
#!/usr/bin/env python
import rospy
from std_msgs.msg import String
from time import sleep
from controller import Robot
и получить ошибку
Traceback (most recent call last):
File "./mine_controller.py", line 6, in <module>
from controller import Robot
File "/snap/webots/current/usr/share/webots/lib/controller/python27/controller.py", line 17, in <module>
_controller = swig_import_helper()
File "/snap/webots/current/usr/share/webots/lib/controller/python27/controller.py", line 16, in swig_import_helper
return importlib.import_module('_controller')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: libCppController.so: cannot open shared object file: No such file or directory
Мои переменные среды:
PYTHONPATH=/snap/webots/current/usr/share/webots/lib/controller/python27:/home/boand/workspace_ros/devel/lib/python2.7/dist-packages:/opt/ros/melodic/lib/python2.7/dist-packages
LD_LIBRARY_PATH=/home/boand/workspace_ros/devel/lib:/opt/ros/melodic/lib:/snap/webots/current/usr/share/webots/lib