Closed marcusvinicius178 closed 1 year ago
I don't think you set your PYTHONPATH successfully if you put those definitions for "CARLA_ROOT", "LEADERBOARD_ROOT" ... after setting PYTHONPATH.
ok @xpharry that is the picture
what do you suggest?
Firstly, did you source ~/.bashrc again in your trrminal after you modified?
Secondly, how about put all "export PYTHONPATH=.." after "export SCENARIO_RUNNER_ROOT..."?
Asnwering the first question: Yes The second: Yes it was wrong. Now I changed the order, however the same issue persists (also after source the bash and my "customized bash" or close the terminal and export the variables manually....the result is the same error as you can see
Hi @xpharry it seems we have advanced a little bit, thanks a lot!
Actually I needed to unisntall the ros2 galactic and install ros2 foxy (as the CARLA documentation suggested it is the only ROS2 that works with this bridge). However I have not installed it completely (at least it was not in /opt/ros/foxy) now I have fixed this and sourced the /opt/ros/foxy/setup.bash instead to source the ros2_foxy/install/local_setup.bash Just changing this line the leaderboard modules were found.
However in this moment Python3 is not finding the agents modules from the Carla simulator, which are installed in /op/carla-simulator/PythonAPI/carla/agents/navigation. Please check the right side of figure below (The agents.navigation.global_route_planner_dao is not found.
Could you mind why?
I belive if I fix this I will be able to run the ros2 bridge with CARLA and Autoware Universe
For me I successfully reproduced Dr. Hatem's result a couple days ago. The question should be better discussed in his repos.
I tested it under Ubuntu 20.04, and ROS2 galactic.
Multiple things you can try.
export CARLA_ROOT=/home/user/carla-0.9.13/CARLA_0.9.13_RSS
export SCENARIO_RUNNER_ROOT=/home/user/carla-0.9.13/scenario_runner
export LEADERBOARD_ROOT=/home/user/carla-0.9.13/op_bridge
export TEAM_CODE_ROOT=/home/user/carla-0.9.13/op_agent
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-py2.7-linux-x86_64.egg
I notice you didn't follow it for LEADERBOARD_ROOT. Not sure how it will differ.
And
If you installed multiple versions of ROS which is fine, make sure you only source one of them.
Not sure if you have set the path of CARLA_ROOT correctly.
Ok thanks for the reply....Actually my lab's friend has installed CARLA for me, before I try the tutorial. He installed CARLA release 0.9.13 however it seems the installation was different from Mr. Darweesh, because the simulador was put in /opt/carla-simulator/CarlaUE4 and I believe your simulator and from Mr.Darweesh was put in the user directory, inside the folder name carla-0.9.13. I thought that would not make any difference, however a lot of issues raised. Maybe my friend has installed a kind of MASTER CARLA version and not 0.9.13 as he said...I am not sure.
About the Leaderboard folder, I have removed the one that was inside op_bridge (cloned by Darweesh's repo) and cloned another one directly from CARLA tutorial...which I guess it also wouldn't lead to any difference. At first I tried use the one inside op_bridge, and as it was not working I cloned a new one...
I will try to reinstall the simulator...However it seems my simulator is the 9.13 too
Thanks
If it is Carla 0.9.13 then that is fine. Not sure why your program could not find agents.navigation.
Another thing which confuses me is that you have another version of Carla in your PYTHONPATH. Try to remove carla-0.9.10 in your PYTHONPATH.
Hi @xpharry I was able to import the modules, my solution is here https://github.com/hatem-darweesh/op_bridge/issues/8.
Could you please read my last comment in this link that I have shared? I runned the bridge with the Simulator, however I had a Runtime/Timestamp issue. So I would like to heard from you and get an opinion.
I am not sure if is a hardware requirement issue, or internet bandwidth from my university, distance to the server (I know CARLA is a Spanish project but I live in South America) or code issue?
The specifications are in this link. Thanks a lot for your assistance. At least I have solved the environment variables and import error!
Hi Mr. @xpharry I have answered you in your reply in the other git issues. I would be very glad if you could take a look. Does this CARLA- Autoware_Universe integration just work with Python2.7, or were you able to run with Python3.7 as well?
Hi I have installed CARLA with Autoware Universe using this tutorial: https://www.youtube.com/watch?v=dxwwNacez7o
I have cloned and installed the requirments.txt from leaderboard as this tutorial recommends: https://leaderboard.carla.org/get_started_v1/
I am using python3, eggfile 3.7, ubuntu20.04, ROS2 - Foxy, source installation
When I try to launch the file op_bridge_ros2.py I get the error:
This is very strange because I was able to load the scenario runner modules, but the leaderboard modules, no matter what I try they don't get recognized. I have already assigned the PythonPath in my bash file, exported the right environment variables for the LEADERBOARD_ROOT. But no success. Could you please assist me?
Snippet of my attempts to load this module is below:
openplanner bridge
Hatem Darweesh January 2022
import imp
import importlib import math import signal import os import sys import importlib import time import traceback import carla from srunner.scenariomanager.carla_data_provider import *
from op_bridge.leaderboard.autoagents.agent_wrapper import AgentWrapper
from op_bridge.agent_wrapper import AgentWrapper
My bash file is below:
I checked similar issues: https://github.com/carla-simulator/leaderboard/issues/77, https://github.com/carla-simulator/leaderboard/issues/84
but they did not work for me