smlbansal / Visual-Navigation-Release

Combining Optimal-Control and Learning for Visual Navigation in Novel Environments
https://smlbansal.github.io/LB-WayPtNav/
56 stars 14 forks source link

Test Pretrained model: Example Error #3

Open tianyaoZhang opened 3 years ago

tianyaoZhang commented 3 years ago

I have followed the instruction and established the environment successfully. When I run the command PYOPENGL_PLATFORM=egl PYTHONPATH='.' python executables/rgb/resnet50/rgb_waypoint_trainer.py test --job-dir reproduce_LB_WayptNavResults --params params/rgb_trainer/reproduce_LB_WayPtNav_results/rgb_waypoint_trainer_finetune_params.py -d 0 I got an Error:

ERROR:root:Loading building from obj file: /media/omnisky/zty_Passport/Data/LB-WayPtNav/LB_WayPtNav_Data_Public/stanford_building_parser_dataset/mesh/area1/5acd38aa86ea42028a265d20947754f5.obj ERROR:root:#Meshes: 195 WARNING:OpenGL.arrays.numpymodule:Unable to load numpy_formathandler accelerator from OpenGL_accelerate Terminated

some times I also got results:

ERROR:root:Loading building from obj file: /media/omnisky/zty_Passport/Data/LB-WayPtNav/LB_WayPtNav_Data_Public/stanford_building_parser_dataset/mesh/area1/5acd38aa86ea42028a265d20947754f5.obj ERROR:root:#Meshes: 195 WARNING:OpenGL.arrays.numpymodule:Unable to load numpy_formathandler accelerator from OpenGL_accelerate Exception ignored in: <bound method SwiftshaderRenderer.del of <mp_env.render.swiftshader_renderer.SwiftshaderRenderer object at 0x7f30c01b7b38>> Traceback (most recent call last): File "/media/omnisky/zty_Passport/Data/LB-WayPtNav/Visual-Navigation-Release/mp_env/render/swiftshader_renderer.py", line 499, in del File "/media/omnisky/zty_Passport/Data/LB-WayPtNav/Visual-Navigation-Release/mp_env/render/swiftshader_renderer.py", line 495, in clear_scene File "latebind.pyx", line 32, in OpenGL_accelerate.latebind.LateBind.call (src/latebind.c:989) File "wrapper.pyx", line 311, in OpenGL_accelerate.wrapper.Wrapper.call (src/wrapper.c:6439) File "/home/omnisky/anaconda3/envs/venv-mpc/lib/python3.6/site-packages/OpenGL/platform/baseplatform.py", line 401, in call File "/home/omnisky/anaconda3/envs/venv-mpc/lib/python3.6/site-packages/OpenGL/platform/baseplatform.py", line 381, in load ImportError: sys.meta_path is None, Python is likely shutting down

environment :

I have tried running under CPU only mode, but failed. What should I do next?

Summerdown111 commented 3 years ago

So do I, and when I execute the following command: [PYOPENGL_PLATFORM=egl PYTHONPATH='.' python executables/run_all_tests.py.] for testing, the above error also appears. The configuration environment is the same as yours.

vtolani95 commented 3 years ago

Thank you for your interest in our work!

As discussed in this resolved GitHub issue the "error" you mentioned is expected to print (we have the same error message print on our end as well). It is a sign of the code working correctly- if you navigate to the session directory for the test you ran, you should see a complete set of plots, metrics, etc. from the test running successfully.

With regards to running your code on CPU, this codebase must be run on a machine with a GPU for the image rendering engine to work.

Summerdown111 commented 3 years ago

Thank you for your reply.

I know that the error is a sign that code works correctly.But when I run your test file _executables/run_all_tests.py_, every time I use the _Visual-Navigation-Release-master/mp_env/render/swiftshaderrenderer.py script, I get this result,such as:

Running test test_obstacle_map.py ERROR:root:Loading building from obj file: PATH/TO/LB_WayPtNav_Data/stanford_building_parser_dataset/mesh/area3/41a8012778ff4fc1800a7794bd15d81e.obj ERROR:root:#Meshes: 90 Exception ignored in: <bound method Shape.__del__ of <mp_env.render.swiftshader_renderer.Shape object at 0x7fa83855e550>> Traceback (most recent call last): File "/home/lzf/文档/Visual-Navigation-Release-master/mp_env/render/swiftshader_renderer.py", line 157, in __del__ File "/home/lzf/anaconda3/envs/venv-mpc/lib/python3.6/site-packages/pyassimp/core.py", line 351, in release ImportError: sys.meta_path is None, Python is likely shutting down Execution time for test test_obstacle_map.py is 15 seconds. This ImportError bothers me.So I think it may be that there is something wrong with the dataset itself during the download process. In fact, I don't know exactly why.

vtolani95 commented 3 years ago

Hello,

These lines print out on our end as well, when the script executes as expected. It is an issue that occurs at the end of script execution (after all tests, plots are created, metrics are computed, etc.). If you run "run_all_tests.py" and receive no assertion errors that means your code is working correctly.

You can try running this particular test "PYTHONPATH='.' python tests/test_obstacle_map.py" and change visualize=True in this line. If you see a plot, your code has certainly worked.

Summerdown111 commented 3 years ago

I have changed visualize=True in this line,but I get such errors:

Running test test_obstacle_map.py ERROR:root:Loading building from obj file: PATH/TO/LB_WayPtNav_Data/stanford_building_parser_dataset/mesh/area3/41a8012778ff4fc1800a7794bd15d81e.obj ERROR:root:#Meshes: 90 Traceback (most recent call last): File "/home/lzf/文档/Visual-Navigation-Release-master/tests/test_obstacle_map.py", line 91, in test_sbpd_map(visualize=True) File "/home/lzf/文档/_Visual-Navigation-Release-master/tests/test_obstacle_map.py", line 77, in test_sbpdmap _occupancy_grid_nn = obstacle_map.create_occupancygrid() _TypeError: create_occupancy_grid() missing 1 required positional argument: ['posn3'](https://github.com/smlbansal/Visual-Navigation-Release/blob/1d34f9c199c3aff4e9b9cdc4fa1de8fd552f55bc/obstacles/obstacle_map.py#L26)

Exception ignored in: <bound method Shape.del of <mp_env.render.swiftshader_renderer.Shape object at 0x7f912559a5c0>> Traceback (most recent call last): File "/home/lzf/文档/Visual-Navigation-Release-master/mp_env/render/swiftshader_renderer.py", line 157, in del File "/home/lzf/anaconda3/envs/venv-mpc/lib/python3.6/site-packages/pyassimp/core.py", line 351, in release ImportError: sys.meta_path is None, Python is likely shutting down Execution time for test test_obstacle_map.py is 14 seconds.

kevin-thankyou-lin commented 3 years ago

Hi Varun! I'm getting the same error here and it looks like the thing we're trying to visualize isn't implemented?

Setting visualize to true, I get here:

 `if visualize:
    occupancy_grid_nn = obstacle_map.create_occupancy_grid()

    fig = plt.figure()
    ax = fig.add_subplot(121)
    obstacle_map.render(ax)

    ax = fig.add_subplot(122)
    ax.imshow(occupancy_grid_nn, cmap='gray', origin='lower')
    ax.set_axis_off()
    plt.show()`

Then, if I arbitrarily pass in an argument, I get to this function:

`@staticmethod
def create_occupancy_grid(pos_n3, **kwargs):
    """
    Create egocentric occupancy grids at the positions
    in pos_n3.
    """
    raise NotImplementedError`

Do you know what occupancy_grid_nn was meant to be for visualization purposes?