OSSDC / OSSDC-SIM

OSSDC SIM - Self Driving Car Simulator based of LGSVL
Other
81 stars 14 forks source link

Problem running the F1TENTH example #20

Open emanef13 opened 1 year ago

emanef13 commented 1 year ago

Hi guys,

I have downloaded and run the OSSDC-SIM-v1. However when, I run the python script Pure_Pursuit.py, from the F1Tenth-Api folder it returns the error below:

**<Set env LGSVLSIMULATOR_HOST Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/home/eefthymiou/ad_sims/ossdc/PythonAPI/lgsvl/remote.py", line 29, in run self.loop.run_until_complete(self.process()) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/home/eefthymiou/ad_sims/ossdc/PythonAPI/lgsvl/remote.py", line 37, in process self.websocket = await websockets.connect(self.endpoint, compression=None) File "/home/eefthymiou/venvs/py_ossdc/lib/python3.8/site-packages/websockets/legacy/client.py", line 659, in await_impl_timeout return await asyncio.wait_for(self.await_impl__(), self.open_timeout) File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError

**

Any input on how I can make it run? Thanks!

emanef13 commented 1 year ago

Ok, I managed to run the F1TENTH example code :) Here are the steps that I followed, to make it run: 1) The code still uses the wise module from lgsvl in line 249 sim = lgsvl.Simulator(SIMULATOR_HOST, env.int("LGSVL__SIMULATOR_PORT", lgsvl.wise.SimulatorSettings.simulator_port)) So, I changed it to sim = lgsvl.Simulator(SIMULATOR_HOST, int(SIMULATOR_API_PORT)) and added before that SIMULATOR_API_PORT = env.str("OSSDCSIMULATOR_API_PORT", '8181') if SIMULATOR_API_PORT is None: print("Set env OSSDCSIMULATOR_API_PORT") exit()

2) Also, I had to manually change the paths to the optimal raceline. For some reason it was not recognized when it is written as ./Spielperg_raceline.csv .

3) Commented out all numba-jit functions, they were giving me some errors. Everything works smooth fast even without numba.

4) Also, I removed the ROS_BBRIDGE connection, as of now.

Comment: Maybe we should open a pr for step (1)