FelicienC / RRT-Dubins

Implementation of a Rapidly Exploring Random Tree using Dubins paths as expansion method
MIT License
43 stars 6 forks source link

StaticEnvironment.plot() does not show the environment #4

Open Ryanf55 opened 2 days ago

Ryanf55 commented 2 days ago

Great repository. Thanks for sharing. I'd like to use this as a teaching tool for Dubins, but I can't get the environment to display.

Per the README:

from environment import StaticEnvironment
from rrt import RRT

# We create an environment of 100x100 meters, with 100 obstacles
env = StaticEnvironment((100, 100), 100)
env.plot()

When I run this, there is nothing displayed. The code executes, exits with code 0, but there is nothing displayed. Do you have any tips? I tried digging for information about older matplotlib behavior, and adding calls to .show() and such, but nothing appears to solve this.

Ryanf55 commented 2 days ago

Removing plt.ion() and adding a call to plt.show() resolves this. If you have any tips for why plt.ion is defaulted on, please share.