hatem-darweesh / op_bridge

OpenPlanner ROS based bridge for CARLA Simulator and Scenario Runner
MIT License
32 stars 12 forks source link

ERROR when run_exploration_mode_ros2.sh #6

Open CedarSnowy opened 2 years ago

CedarSnowy commented 2 years ago

I want to use ros2 so I run run_exploration_mode_ros2.sh.However I meet following error.I have tried changing default python version to python2.7 but it's still not working.

Traceback (most recent call last): File "/home/tasl/carla-autoware-universe/op_carla/op_bridge/op_bridge/op_bridge_ros2.py", line 12, in import carla File "", line 259, in load_module File "/home/tasl/carla_0.9.13/PythonAPI/carla/dist/carla-0.9.13-py2.7-linux-x86_64.egg/carla/init.py", line 8, in raise ImportError('This package shoud not be accessible on Python 3.') File "", line 259, in load_module File "/home/tasl/carla_0.9.13/PythonAPI/carla/dist/carla-0.9.13-py2.7-linux-x86_64.egg/carla/libcarla.py", line 7, in File "/home/tasl/carla_0.9.13/PythonAPI/carla/dist/carla-0.9.13-py2.7-linux-x86_64.egg/carla/libcarla.py", line 6, in bootstrap File "/usr/lib/python3.8/imp.py", line 342, in load_dynamic return _load(spec) ImportError: /home/tasl/.cache/Python-Eggs/carla-0.9.13-py2.7-linux-x86_64.egg-tmp/carla/libcarla.so: undefined symbol: _PyThreadState_Current

hatem-darweesh commented 2 years ago

Please review the installation instruction and tutorials. Python version is an annoying problem. You can find better guidance in CARLA discord.

CedarSnowy commented 2 years ago

I am sorry that I'm still confused.

I have watched your video "CARLA-Autoware universe Tutorial" in youtube and successfully install autoware.universe,and successfully run autoware.universe in Planning simulation. However,I want to use CARLA as my simulator.However,I'm not sure which version of python should be used so I meet above problem.I have tried following ways to run run_exploation_mode_ros2.sh :

1.(default)use Python3.7:meet error "no module named 'autoware_auto_vehicle_msgs' 2.(change python version)use Python2.7:meet errer caused by the conflct betweent python2 and python3,such as "from queue import Queue" "no module named queue"

Is there a tutorial video which help me to successfully "OP_bridge"?I have checked all your videos in youtube but not found. It seemd that there is only "op bridge ros2 test run". Thank you very much!

msanchezvicom commented 2 years ago

Hi @hatem-darweesh , your work is amazing, I am very impressed. Unfortunately I can't test the integration between Autoware universe and CARLA since I am facing the same problem as @CedarTH . @CedarTH have you finally solved it, do you have any other idea that can lead us to the solution? Thanks

hatem-darweesh commented 2 years ago

Can you tell me what is your target ? CARLA + autoware.universe ? CARLA + autoware.ai ? there are different branches for each case and different tutorial for each case and different os, ros, python requirements

CedarSnowy commented 2 years ago

My target is using CARLA + autoware.universe

yuting-fu commented 2 years ago

1.(default)use Python3.7:meet error "no module named 'autoware_auto_vehicle_msgs'

A quick solution could be installing the autoware_auto_vehicle_msgs in your ros2 environment.

msanchezvicom commented 2 years ago

Can you tell me what is your target ? CARLA + autoware.universe ? CARLA + autoware.ai ? there are different branches for each case and different tutorial for each case and different os, ros, python requirements

Hello @CedarTH, @hatem-darweesh :

My target is CARLA 9.0.13 + Autoware.Universe. I could finally solve the issue by modifying the CARLA egg file export from _export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.13-py2.7-linux-x8664.egg to export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.13-py3.7-linux-x86_64.egg

It is important to note that the PYTHONPATH variable should be previously cleaned up: export PYTHONPATH="" export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/util export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/agents export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.13-py3.7-linux-x86_64.egg

However, the AutowareStatePanel state stays forever in Initializing mode. I have tried to relaunch Autoware several times but unfortunateluy I cannot make it work.

image

AviBen96 commented 1 year ago

Hi everyone ! first of all @hatem-darweesh, thanks a million time, your work is amazing !!

I faced the same issue with Python2.7 so I switched back to 3.7 even though it says the bridge is compatible with python 2.7. Can I know why it is the case? I am facing new issues with python 3 and would like to know if it is impossible to run the bridge with it before spending days trying to solve those ^^

Any of you fixed this egg import issue ?

AviBen96 commented 1 year ago

I am actually getting to the same point Where autoware and Rviz open but the Initializing state never ends .

[scenario_selector-59] [INFO] [1676466881.162732721] [planning.scenario_planning.scenario_selector]: Waiting for route. [component_container_mt-74] [WARN] [1676466881.163323666] [autoware_api.external.vehicle_status]: The turn_indicators topic is not subscribed [component_container-67] [INFO] [1676466884.906256824] [control.trajectory_follower.lane_departure_checker_node]: waiting for route msg... [component_container-67] [WARN] [1676466885.029031545] [control.operation_mode_transition_manager]: Engage unavailable: trajectory size must be > 2

[system_error_monitor-21] [ERROR] [1676466885.029864862] [system_error_monitor /autoware/localization/performance_monitoring/localization_accuracy/localization_error_monitor: localization_accuracy]: [Single Point Fault]: ellipse size is over the expected range [system_error_monitor-21] [ERROR] [1676466885.029869362] [system_error_monitor /autoware/localization/performance_monitoring/localization_accuracy/localization_error_monitor: localization_accuracy_lateral_direction]: [Single Point Fault]: ellipse size along lateral direction is over the expected range

[component_container_mt-64] [WARN] [1676466885.890581577] [planning.scenario_planning.lane_driving.motion_planning.surround_obstacle_checker]: waiting for pointcloud info... [component_container_mt-62] [INFO] [1676466886.443339284] [planning.scenario_planning.lane_driving.behavior_planning.behavior_path_planner]: waiting for scenario_topic

biubiubiu919 commented 1 year ago

Can you tell me what is your target ? CARLA + autoware.universe ? CARLA + autoware.ai ? there are different branches for each case and different tutorial for each case and different os, ros, python requirements

Hello @CedarTH, @hatem-darweesh :

My target is CARLA 9.0.13 + Autoware.Universe. I could finally solve the issue by modifying the CARLA egg file export from _export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.13-py2.7-linux-x8664.egg to export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.13-py3.7-linux-x86_64.egg

It is important to note that the PYTHONPATH variable should be previously cleaned up: export PYTHONPATH="" export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/util export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/agents export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.13-py3.7-linux-x86_64.egg

However, the AutowareStatePanel state stays forever in Initializing mode. I have tried to relaunch Autoware several times but unfortunateluy I cannot make it work.

![image](https://user-images.githubusercontent.com/112627154/195535012-c688e42e-db22-4a99-80cb-4eb4561f1a

hello @ msanchezvicom Did you solve this problem, i seem to encouter the same problem. the state stuck in Initializing mode

msanchezvicom commented 1 year ago

Hi @biubiubiu919 , After realizing what I stated, I was able to solve the problem by reinstalling/building everything, following the steps diligently. BR