论文 basic_reinforcement_learning/tutorial7/ 教程Reinforcement Learning with ROS and Gazebo
erlerobot/gym-gazebo/INSTALL.md ubuntu16 安装gym-gazebo
主要参考erlerobot/gym-gazebo/INSTALL.md安装。 通过Anaconda构建python==3.5环境,在此虚拟环境中构建gym_gazebo。
参考特定版本 ROS + Gazebo 安装安装ROS kinetic与gazebo8。 Python3.5:通过Anaconda处理。 OpenCV3: conda install -c https://conda.anaconda.org/menpo opencv3 OpenAI gym: pip install gym
参考 ubuntu16 安装gym-gazebo Fork porterpan/gym-gazebo 的代码。
git clone -b master https://github.com/porterpan/gym-gazebo cd gym-gazebo pip3 install -e .gym_gazabe安装配置
cd gym_gazebo/envs/installation bash setup_kinetic.bash bash turtlebot_setup.bash1、修改:setup_kinetic.bash 中
#catkin_make --pkg mav_msgs #source devel/setup.bash #catkin_make -j 1 catkin_make_isolated bash -c 'echo source `pwd`/devel_isolated/setup.bash >> ~/.bashrc' echo "## ROS workspace compiled ##"注意:修改了catkin_make_isolated & devel_isolated。 catkin_make, cmake, catkin build区别 catkin_make vs catkin_make_isolated, which is preferred? 2、在编译包时,会出现缺少包的情况。依次解决就行,很多坑。而且会爆内存,16G才够用。
ubuntu16 安装gym-gazebo
cd gym_gazebo/examples/scripts_turtlebot python circuit2_turtlebot_lidar_qlearn.py1、cv2.so
cd /opt/ros/kinetic/lib/python2.7/dist-packages sudo rm cv2.so # 老是忘了怎么重命名,再次在这里重新记下笔记 mv oldname newname # 要是重定义路径 mv oldname /*/*/newname2、import tf
mkdir -p ~/catkin_ws/src; cd ~/catkin_ws catkin_make source devel/setup.bash wstool init wstool set -y src/geometry2 --git https://github.com/ros/geometry2 -v 0.6.5 wstool set -y src/geometry --git https://github.com/ros/geometry -v 1.12.0 wstool up rosdep install --from-paths src --ignore-src -y -r wstool init . wstool merge ~/catkin_ws/.rosinstall wstool update catkin_make --cmake-args \ -DCMAKE_BUILD_TYPE=Release \ -DPYTHON_EXECUTABLE=/usr/bin/python3 \ -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m \ -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so3、MoveIt
sudo apt install ros-kinetic-moveit4、skimage库安装
conda install scikit-image5、ImportError: No module named 'netifaces'
pip install netifaces参考:gym-gazebo安装后的测试
cd gym_gazebo/examples/scripts_turtlebot python circuit2_turtlebot_lidar_qlearn.py以下是我的运行命令:
conda activate py3.5 cd rl-ws/gym-gazebo/examples/turtlebot/ python circuit2_turtlebot_lidar_qlearn.py conda activate py3.5 cd rl-ws/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/devel_isolated/ source setup.bash export ROS_MASTER_URI=http://localhost:12795 export GAZEBO_MASTER_URI=http://localhost:12796 gzclient