hanruihua / rl_rvo_nav

The source code of the [RA-L] paper "Reinforcement Learned Distributed Multi-Robot Navigation with Reciprocal Velocity Obstacle Shaped Rewards"
MIT License
174 stars 31 forks source link

AttributeError: 'NoneType' object has no attribute 'state_dim' error #1

Closed Xijieupenn closed 2 years ago

Xijieupenn commented 2 years ago

When training to 250 epochs, I get the following error. Screenshot from 2022-04-15 13-22-54

Could you help me see what the mistake might be?

hanruihua commented 2 years ago

Hi, thanks for pointing this out. The main reason is the set error of argument _policydict in the policy_test function. If the policy name is with _"checkpoint", the _policydict should be True. Otherwise, it should be False.

I have fixed this bug, and you can try to train with the letest version. Thanks

Xijieupenn commented 2 years ago

Thank you so much. I will try to retrain it. However, I just met a new problem when trying to test my newly trained model. Screenshot from 2022-04-16 18-22-23

I do not know why the model cannot be pickled. I believe the path to the model is correct.

hanruihua commented 2 years ago

Hi, I have tested the policy test function in the policy_test.py, and there is no error like yours.

The pickle.load() function is to load the argments that saved in the pickle.dump() in train_process.py, and is only related to the python module pickle. You can test the pickle.dump() and pickle.load() solely to find the main reason. If there are still this error, you may try the other version of pickle

Xijieupenn commented 2 years ago

The new version works fine. Thank you so much.