Display number = 0; set start no client; check Disable access control; uncheck native gldocker pull xubo92/21facmpt726rl:forstudentdocker run -it -e DISPLAY=host.docker.internal:0.0 -e LIBGL_ALWAYS_INDIRECT=0 xubo92/21facmpt726rl:forstudentgazebo --verboseWSL 2 by referring to this article: docker gui on Windowsdocker pull xubo92/21facmpt726rl:forstudent, and run docker run -t -d -p 5900:5900 --name=rlassignment xubo92/21facmpt726rl:forstudentdocker exec -it rlassignment bash and export DISPLAY=:1.0docker exec -it rlassignment bash, and then apt-get install x11vnc xvfb ufw -y. And then set up x11vnc and xvfb for virtual display Xvfb :1 -screen 0 1600x1200x16 & and export DISPLAY=:1.0. Finally run x11vnc. Do not shut down terminal 2 if you want to visualize the GUI.gazebo --verbose &, and open RealVNC viewer, use the address localhost:5900 to view the gazebo GUI.conda activate rlsource /root/catkin_ws/devel/setup.bashcd /21facmpt726rl, and finish the assignement questions by filling in the missing code linessh run.sh to run 5 experiments, this will approximately take 15~20 hours in total. When you start this step, it is recommended to disable the GUI and use headless mode, please refer to Tips 1python3 draw_train_info.py to plot the results.cannot open display, generally it does not affect the training. You can either (1) ignore it, or (2) go to the file "./gazebo_config/DubinsCarCircuitGround_v0.launch" and set the argument gui=false and headless=truekillall -9 sh python3 rosmaster rosout gzserver gzclient nodeletmain.py and find function train(), comment the lines that call algoritghm.ppo_learn and replace it with algorithm.ppo_eval. You may need to import ppo_eval from algo_config/ppo.py. Remember to double check the input and output arguments of algorithm.ppo_eval.main.py, comment the last two lines at the bottom, and add a new line trained_policy = train(env=env, algorithm=ppo, params=ppo_params_json, args=args, load=True, loadpath="./runs_output/model", loaditer=300)Content type
Image
Digest
Size
6.9 GB
Last updated
over 4 years ago
docker pull xubo92/21facmpt726rl:fullversion