Gazebo hangs at /gazebo/set_physics_properties

asked 2019-04-13 11:55:34 -0500

Uls gravatar image

Hi!

I'm trying to launch the turtlebot2 example at https://bitbucket.org/theconstructcor... , kinetic branch on my local computer.

Launching "roslaunch turtle2_openai_ros_example start_training.launch" gives no errors, but the process stops when waiting for service "/gazebo/set_physics_properties". Nothing happens until I kill it with ctrl+c. Logs are

$ roslaunch turtle2_openai_ros_example start_training.launch
... logging to /home/myuser/.ros/log/21619d40-5e0b-11e9-bb0d-0028f88c60c7/roslaunch-myuser-24873.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://myuser:43881/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /turtlebot2/alpha: 0.1
 * /turtlebot2/angular_speed: 0.3
 * /turtlebot2/desired_pose/x: 5.0
 * /turtlebot2/desired_pose/y: 0.0
 * /turtlebot2/desired_pose/z: 0.0
 * /turtlebot2/end_episode_points: 200
 * /turtlebot2/epsilon: 0.9
 * /turtlebot2/epsilon_discount: 0.999
 * /turtlebot2/forwards_reward: 5
 * /turtlebot2/gamma: 0.7
 * /turtlebot2/init_linear_forward_speed: 0.0
 * /turtlebot2/init_linear_turn_speed: 0.0
 * /turtlebot2/linear_forward_speed: 0.5
 * /turtlebot2/linear_turn_speed: 0.05
 * /turtlebot2/max_laser_value: 6
 * /turtlebot2/min_laser_value: 0
 * /turtlebot2/min_range: 0.5
 * /turtlebot2/n_actions: 4
 * /turtlebot2/n_observations: 6
 * /turtlebot2/nepisodes: 500
 * /turtlebot2/new_ranges: 5
 * /turtlebot2/nsteps: 10000
 * /turtlebot2/number_splits: 10
 * /turtlebot2/pos_step: 0.016
 * /turtlebot2/running_step: 0.06
 * /turtlebot2/speed_step: 1.0
 * /turtlebot2/turn_reward: 1
 * /turtlebot2/wait_time: 0.1

NODES
  /
    turtlebot2_maze (turtle2_openai_ros_example/start_qlearning.py)

auto-starting new master
process[master]: started with pid [24883]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 21619d40-5e0b-11e9-bb0d-0028f88c60c7
process[rosout-1]: started with pid [24896]
started core service [/rosout]
process[turtlebot2_maze-2]: started with pid [24913]
^C[turtlebot2_maze-2] killing on exit
Traceback (most recent call last):
  File "/home/myuser/catkin_ws/src/openai_examples_projects/turtle2_openai_ros_example/scripts/start_qlearning.py", line 26, in <module>
    env = gym.make('TurtleBot2Maze-v0')
  File "/home/myuser/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 161, in make
    return registry.make(id)
  File "/home/myuser/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 119, in make
    env = spec.make()
  File "/home/myuser/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 86, in make
    env = cls(**self._kwargs)
  File "/home/myuser/catkin_ws/src/openai_ros/openai_ros/src/openai_ros/task_envs/turtlebot2/turtlebot2_maze.py", line 63, in __init__
    super(TurtleBot2MazeEnv, self).__init__()
  File "/home/myuser/catkin_ws/src/openai_ros/openai_ros/src/openai_ros/robot_envs/turtlebot2_env.py", line 61, in __init__
    reset_world_or_sim="WORLD")
  File "/home/myuser/catkin_ws/src/openai_ros/openai_ros/src/openai_ros/robot_gazebo_env.py", line 16, in __init__
    self.gazebo = GazeboConnection(start_init_physics_parameters,reset_world_or_sim)
  File "/home/myuser/catkin_ws/src/openai_ros/openai_ros/src/openai_ros/gazebo_connection.py", line 23, in __init__
    rospy.wait_for_service(service_name)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 159, in wait_for_service
    raise ROSInterruptException("rospy shutdown")
rospy.exceptions.ROSInterruptException: rospy shutdown
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Appreciate any help!

edit retag flag offensive close merge delete

Comments

This would be something to ask The Construct, seeing as they are maintaining that simulation, but from the output it would seem the service just isn't available, causing the script to hang at "waiting for service".

gvdhoorn gravatar image gvdhoorn  ( 2019-04-13 13:29:26 -0500 )edit