Closed HarukiKozukapenguin closed 2 years ago
@HarukiKozukapenguin
I got the same error with you.
The reason is that the package of rpg_baselines
is installed without the upper prefix of flightrl
(Please see https://github.com/uzh-rpg/flightmare/blob/master/flightrl/setup.py).
However, https://github.com/uzh-rpg/flightmare/blob/092ff357139b2e98fc92bcdee50f38f85b55246d/flightpy/flightrl/rpg_baselines/torch/common/ppo.py#L21-L23 uses a prefix of flightrl
.
A simple workaround is to change https://github.com/uzh-rpg/flightmare/blob/092ff357139b2e98fc92bcdee50f38f85b55246d/flightpy/flightrl/rpg_baselines/torch/common/ppo.py#L21-L23 as follows:
from rpg_baselines.torch.common.on_policy_algorithm import \
OnPolicyAlgorithm
from rpg_baselines.torch.common.util import plot3d_traj, traj_rollout
and redo https://github.com/uzh-rpg/agile_flight/blob/main/setup_py.bash#L64-L66 in your conda enviroment.
@yun-long
What is the purpose to add flightrl
in https://github.com/uzh-rpg/flightmare/blob/092ff357139b2e98fc92bcdee50f38f85b55246d/flightpy/flightrl/rpg_baselines/torch/common/ppo.py#L21-L23?
This breaks the consistence with your rule described in https://github.com/uzh-rpg/flightmare/blob/092ff357139b2e98fc92bcdee50f38f85b55246d/flightpy/flightrl/setup.py#L19
hi @tongtybj
thanks a lot for helping to address the issues.
You are right. there should be no flightrl in the ppo.py
@tongtybj Thank you so much. I fixed, and it works well.
Thank you for interesting challenge. I ran python.run_vision_ppo with the folloing command, but the command says there are no module named flightrl
I did the following things.(cf. https://github.com/uzh-rpg/agile_flight/blob/main/envtest/python/README.md)
./setup_py.bash
with conda environment.$ python3 -m python.run_vision_demo --render 1
I have several bugs when run
./setup_py.bash
, and I cured these by myself. If these cause some problem, prease tell meA. ModuleNotFoundError: No module named 'rpg_baselines.torch' Based on this issue, I changed as follows lightmare/flightpy/flightrl/setup.py from packages=['rpg_baselines'], to packages=find_packages() https://github.com/uzh-rpg/agile_flight/issues/5#issuecomment-1072016802