http://wiki.ros.org/openai_ros#Turtlebot2 not running correctly on VM
Hi,
I am following this tutorial: http://wiki.ros.org/openai_ros#Turtle...
The files:
- start_training.py
- qlearn.py
- my_turtle_bot2_maze_params.yaml
(modified the user
path to my name)
- start_training.launch
are copy-pasted from the tutorial
The steps I performed is summarized in the below setup.bash
script. The VM is Ubuntu 18.04 with ROS Melodic/Gazebo9 installed using a bash script (let me know if it is needed). A quick visual preview of the error can be found here: (https://imgur.com/YDg9nEq)
#!/bin/bash
set -e
echo Be sure to edit the user in src/*.yaml file.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
mkdir -p ~/simulation_ws/src
cd ~/simulation_ws/src
git clone -b version2 https://bitbucket.org/theconstructcore/openai_ros.git
git clone https://github.com/ros-controls/ros_control.git
git clone https://github.com/ros-controls/realtime_tools.git
git clone https://github.com/ros-controls/control_toolbox.git
git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git
# git clone https://github.com/ros/common_msgs.git
catkin_create_pkg my_turtlebot2_training
cd my_turtlebot2_training
mkdir src launch config
cp $DIR/src/qlearn.py $DIR/src/start_training.py src
cp $DIR/src/my_turtlebot2_maze_params.yaml config
cp $DIR/src/start_training.launch launch
chmod +x src/start_training.py
cd ../ros_control
git checkout $ROS_DISTRO-devel
cd ../realtime_tools
git checkout $ROS_DISTRO-devel
cd ../control_toolbox
git checkout $ROS_DISTRO-devel
cd ../gazebo_ros_pkgs
git checkout $ROS_DISTRO-devel
# cd ../common_msgs
# git checkout jade-devel
cd ~/simulation_ws
catkin_make
source ~/simulation_ws/devel/setup.bash
rospack profile
The build was successful (0 errors). So to run I do:
roslaunch my_turtlebot2_training start_training.launch
First error is missing packages, which I patched by running the code it provided:
[WARN] [1585694061.149923]: Env: MyTurtleBot2Wall-v0 will be imported
[WARN] [1585694061.377025]: Register of Task Env went OK, lets make the env...MyTurtleBot2Wall-v0
[WARN] [1585694061.395947]: Package NOT FOUND, lets Download it...
[ERROR] [1585694138.452365]: Package turtlebot_gazebo NOT FOUND by ROS.
[ERROR] [1585694138.453610]: IMPORTANT!: You need to execute the following commands and rerun to dowloads to take effect.
[ERROR] [1585694138.454482]:
In a new Shell:::>
cd /home/linsu/simulation_ws
catkin_make
source devel/setup.bash
rospack profile
[ERROR] [1585694138.455292]:
In your deeplearning program execute shell catkin_ws:::>
cd /home/user/catkin_ws
source devel/setup.bash
rospack profile
After running the code I get a catkin_make
error:
CMake Warning at /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:166 (message):
catkin_package() DEPENDS on 'gazebo_msgs' but neither
'gazebo_msgs_INCLUDE_DIRS' nor 'gazebo_msgs_LIBRARIES' is defined.
Call Stack (most recent call first):
/opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
openai_ros/openai_ros/CMakeLists.txt:104 (catkin_package)
CMake Warning at /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:166 (message):
catkin_package() DEPENDS on 'geometry_msgs' but neither
'geometry_msgs_INCLUDE_DIRS' nor 'geometry_msgs_LIBRARIES' is defined.
Call Stack (most recent call first):
/opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
openai_ros/openai_ros/CMakeLists.txt:104 (catkin_package)
CMake Warning at /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:166 (message):
catkin_package() DEPENDS on 'controller_manager_msgs' but neither
'controller_manager_msgs_INCLUDE_DIRS' nor
'controller_manager_msgs_LIBRARIES' is defined.
Call Stack (most recent call first):
/opt/ros/melodic/share/catkin/cmake ...
Hey there,
Unfortuantely, I am having exactly the same issue. Took exactly the same steps and got the same problems.
Cheers, Jonathan