ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

http://wiki.ros.org/openai_ros#Turtlebot2 not running correctly on VM

asked 2020-03-31 18:15:13 -0500

ltbd78 gravatar image

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.bashscript. 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 ...
(more)
edit retag flag offensive close merge delete

Comments

Hey there,

Unfortuantely, I am having exactly the same issue. Took exactly the same steps and got the same problems.

Cheers, Jonathan

Jones93 gravatar image Jones93  ( 2020-04-08 02:57:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-21 10:18:43 -0500

Moongerim gravatar image
  • Hello! I had the same problem, and I have solved it by following the next steps:
    1. Delete build and devel folders
    2. cd simulation_ws
    3. rosdep update
    4. rosdep install --from-paths src/ --rosdistro kinetic
    5. catkin_make
edit flag offensive delete link more

Question Tools

Stats

Asked: 2020-03-31 18:13:16 -0500

Seen: 299 times

Last updated: Mar 31 '20