目录
本节会安装以下内容
- 目录
- 第一步:bash turtlebot_setup.bash
- 第二步:source setup_turtlebot.bash
- 第三步:eg export ROS_MASTER_URI=http://localhost:12795
- 第四步:gzclient
- 五 最终效果
- [x] Edit By Porter, 积水成渊,蛟龙生焉。
第一步:bash turtlebot_setup.bash
Running an environment
Load the environment variables corresponding to the robot you want to launch. E.g. to load the Turtlebot:
1 | cd gym_gazebo/envs/installation |
Note: all the setup scripts are available in gym_gazebo/envs/installation
Run any of the examples available in examples/. E.g.:
1 | cd examples/turtlebot |
第二步:source setup_turtlebot.bash
- 我的source bash文件是setup.bash不是setup_turtlebot.bash,所以我的是source setup.bash
source
1 | cd /home/porter/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/devel |
进行expert操作
首先第一步:bash turtlebot_setup.bash过后,终端会有如下的提示
得到有用的终端输出信息
1 | porter@porter-Aspire:~/gym-gazebo/examples/turtlebot$ python3 circuit2_turtlebot_lidar_qlearn.py |
第三步:eg export ROS_MASTER_URI=http://localhost:12795
1 | export ROS_MASTER_URI=http://localhost:12795 # 和上面的端口号一致 |
第二步和第三步操作方法的截图
第四步:gzclient
执行如下命令打开gazebo
1 | gzclient |
五 最终效果
Display reward plot
Display a graph showing the current reward history by running the following script:
1 | cd /home/porter/gym-gazebo/ |
HINT: use --help flag for more options.
Killing background processes
Sometimes, after ending or killing the simulation gzserver and rosmaster stay on the background, make sure you end them before starting new tests.
We recommend creating an alias to kill those processes.
1 | echo "alias killgazebogym='killall -9 rosout roslaunch rosmaster gzserver nodelet robot_state_publisher gzclient'" >> ~/.bashrc |
参考来源:https://github.com/erlerobot/gym-gazebo/tree/master#installation