f1tenth-dev / simulator

ROS & Gazebo F1/10 Autonomous Racecar Simulator
Apache License 2.0
77 stars 32 forks source link

Purepursuit is not launching #5

Closed rdpujari closed 4 years ago

rdpujari commented 4 years ago

when I launch this command, roslaunch f1tenth-sim purepursuit_one_car.launch, it shows this error and starts killing all the process and exits the terminal. RLException: Roslaunch got a 'No such file or directory' error while attempting to run: Please make sure that all the executables in this command exist and have executable permission. This is often caused by a bad launch-prefix. The traceback for the exception was written to the log file.

f1tenth-dev commented 4 years ago

Can you upload log files so that the source of the problem is clear?

simonrozsival commented 4 years ago

The python code contains some hard-coded file paths which probably don't match your local directory structure. For example I had to make this change in the /scripts/adaptive_lookahead.py file:

-    file_path = os.path.expanduser('~/catkin_ws/src/f1tenth_purepursuit/sectors/{}.csv'.format(sector_list_name))
+    file_path = os.path.join(os.path.dirname(__file__), '../sectors/{}.csv'.format(sector_list_name))

There are a few places where the absolute file path is used and where the f1tenth_purepursuit repo name appears (https://github.com/search?q=f1tenth_purepursuit&type=Code, it is probably an old name of a repo and they forgot to change the paths after they moved it to this repo called simulator).

~I'll try to make a PR which fixes these paths if I have time during April if it isn't fixed by then.~ EDIT: It wasn't much work, so I reconsidered it and I created the PR right now before I forget about it.

varundevsukhil commented 4 years ago

The path variables have been modified, this issue has been resolved.