- conda create -n nerf-rl-nav python = 3.8
- pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
python test.py
python reset.py ##启动gazebo和ros后 若非正常关闭,手动复位
source devel/setup.bash
export GAZEBO_MODEL_PATH=~/ros_project/catkin_ws/src/models
- cd encoder
- python generate_data.py
- python run.py
vae_model = VAE(in_channels=3, latent_dim=128) #初始化VAE
model_dict = torch.load("/checkpoint/**.ckpt", map_location=torch.device("cpu")) #加载模型
new_state_dict = OrderedDict() #消除模型key值不匹配
for k,v in state_dict.items():
name = k[6:]
new_state_dict[name] = v
vae_model.load_state_dict(new_state_dict) #加载预训练模型,用于策略网络的前端