carla-simulator / ros-bridge

ROS bridge for CARLA Simulator
MIT License
513 stars 414 forks source link

ROS Bridge 0.9.10.1 failed to run test case with carla-0.9.10-py3.6-linux-x86_64.egg #620

Open SandyWare opened 2 years ago

SandyWare commented 2 years ago

Environment : Ubuntu 18.0.4 Carla version (tag: 0.9.10.1). Ros_bridge : tag: 0.9.11 / 0.9.10.1 (I tried with both tag version ) Python path : ~/carla/PythonAPI/carla/dist/carla-0.9.10-py3.6-linux-x86_64.egg : ~/carla/PythonAPI/carla/: Python3 version: Python 3.6.9 python version : Python 2.7.17

I have built ros_bridge successfully using catkin_make and catkin_make install.

When I run test case rostest carla_ros_bridge ros_bridge_client.test It gives me below error

 ... logging to /home/sandip/.ros/log/rostest-sandip-7530-14310.log
[ROSUNIT] Outputting test results to /home/sandip/.ros/test_results/carla_ros_bridge/rostest-test_ros_bridge_client.xml
Traceback (most recent call last):
  File "/home/sandip/carla-ros-bridge/catkin_ws/src/ros-bridge/carla_ros_bridge/src/carla_ros_bridge/bridge.py", line 24, in <module>
    import carla
  File "/home/sandip/carla/PythonAPI/carla/dist/carla-0.9.10-py3.6-linux-x86_64.egg/carla/__init__.py", line 8, in <module>

  File "/home/sandip/carla/PythonAPI/carla/dist/carla-0.9.10-py3.6-linux-x86_64.egg/carla/libcarla.py", line 9, in <module>
  File "/home/sandip/carla/PythonAPI/carla/dist/carla-0.9.10-py3.6-linux-x86_64.egg/carla/libcarla.py", line 3, in __bootstrap__
ImportError: No module named util

Also python3 -c 'import carla;print("Success")' Success python -c 'import carla;print("Success")' # python2

 Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/sandip/carla/PythonAPI/carla/dist/carla-0.9.10-py3.6-linux-x86_64.egg/carla/__init__.py", line 8, in <module>

  File "/home/sandip/carla/PythonAPI/carla/dist/carla-0.9.10-py3.6-linux-x86_64.egg/carla/libcarla.py", line 9, in <module>
  File "/home/sandip/carla/PythonAPI/carla/dist/carla-0.9.10-py3.6-linux-x86_64.egg/carla/libcarla.py", line 3, in __bootstrap__
ImportError: No module named util

Is ros_bridge failing to understand python3 and carla-0.9.10-py3.6-linux-x86_64.egg ?

Srichitra-S commented 1 year ago

Same issue encountered with carla-0.9.13-py3.8-linux-x86_64.egg Did you fix this ?

shuaishuaicha commented 2 weeks ago

Have you resolved it now