PathPlanning icon indicating copy to clipboard operation
PathPlanning copied to clipboard

fix ModuleNotFound errors in rrt_2D

Open nro-bot opened this issue 2 years ago • 2 comments

Running python rrt_2D causes modulenotfound error.

~/projects/PathPlanning/Sampling_based_Planning (master)$ python rrt_2D/rrt.py
Traceback (most recent call last):
  File "rrt_2D/rrt.py", line 14, in <module>
    from Sampling_based_Planning.rrt_2D import env, plotting, utils
ModuleNotFoundError: No module named 'Sampling_based_Planning'

Since the rrt_3D code works, we can tell that remove "Sampling_based_Planner" from import statements can fix this. I have done so and created this pull request.

Before

from Sampling_based_Planning.rrt_2D import env, plotting, utils

After

from rrt_2D import env, plotting, utils

Now we can run and it works.

~/projects/PathPlanning (master *%)$ python Sampling_based_Planning/rrt_2D/rrt.py 

nro-bot avatar Jul 15 '21 16:07 nro-bot

That does not solve the issue for me it is still returning the same error ;

File "/home/user/Path planning/PathPlanning/Sampling_based_Planning/rrt_2D/../../Sampling_based_Planning/rrt_2D/plotting.py", line 14, in <module> from Sampling_based_Planning.rrt_2D import env ImportError: No module named 'Sampling_based_Planning'

even though i have made the change

Before

from Sampling_based_Planning.rrt_2D import env, plotting, utils

After

from rrt_2D import env, plotting, utils <

padre221 avatar Aug 30 '22 08:08 padre221

@nouyang

That does not solve the issue for me it is still returning the same error ;

File "/home/user/Path planning/PathPlanning/Sampling_based_Planning/rrt_2D/../../Sampling_based_Planning/rrt_2D/plotting.py", line 14, in <module> from Sampling_based_Planning.rrt_2D import env ImportError: No module named 'Sampling_based_Planning'

even though i have made the change

Before

from Sampling_based_Planning.rrt_2D import env, plotting, utils

After

from rrt_2D import env, plotting, utils

padre221 avatar Aug 30 '22 08:08 padre221