ros_ship_packages icon indicating copy to clipboard operation
ros_ship_packages copied to clipboard

Gazebo Launch Error

Open Zhuojie-Ji opened this issue 6 years ago • 3 comments

Bug

A launch error occurs when I try to launch ros_ship

Expected Behavior

The model launches in Gazebo.

Actual Behavior

The model launches in Rviz only. Gazebo hangs, and the following outputs including error messages show on the terminal:

$ roslaunch ros_ship_description ros_ship.launch
... logging to /home/wowbagger/.ros/log/f27048d8-852f-11e8-8c79-7c8bca0b7f70/roslaunch-Nutrimatic-Drink-Dispenser-17687.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.

inconsistent namespace redefinitions for xmlns:xacro:
 old: http://ros.org/wiki/xacro
 new: http://www.ros.org/wiki/xacro (/opt/ros/kinetic/share/velodyne_description/urdf/VLP-16.urdf.xacro)
started roslaunch server http://Nutrimatic-Drink-Dispenser:46171/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /ros_ship/joint_state_controller/publish_rate: 50
 * /ros_ship/joint_state_controller/type: joint_state_contr...
 * /ros_ship/left_motor_controller/joint: propeller_l_joint
 * /ros_ship/left_motor_controller/pid/d: 10.0
 * /ros_ship/left_motor_controller/pid/i: 0.01
 * /ros_ship/left_motor_controller/pid/p: 100.0
 * /ros_ship/left_motor_controller/type: velocity_controll...
 * /ros_ship/right_motor_controller/joint: propeller_r_joint
 * /ros_ship/right_motor_controller/pid/d: 10.0
 * /ros_ship/right_motor_controller/pid/i: 0.01
 * /ros_ship/right_motor_controller/pid/p: 100.0
 * /ros_ship/right_motor_controller/type: velocity_controll...
 * /rosdistro: kinetic
 * /rosversion: 1.12.13
 * /use_sim_time: True
 * /water_surface_height: 0.0

NODES
  /red_buoy_01/
    buoy_spawner (gazebo_ros/spawn_model)
  /green_buoy_01/
    buoy_spawner (gazebo_ros/spawn_model)
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    rviz (rviz/rviz)
    urdf_spawner (gazebo_ros/spawn_model)
  /ros_ship/
    controller_spawner (controller_manager/spawner)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)

ROS_MASTER_URI=http://localhost:11311

process[rviz-1]: started with pid [17708]
process[urdf_spawner-2]: started with pid [17709]
process[red_buoy_01/buoy_spawner-3]: started with pid [17710]
process[green_buoy_01/buoy_spawner-4]: started with pid [17711]
process[ros_ship/controller_spawner-5]: started with pid [17712]
process[ros_ship/robot_state_publisher-6]: started with pid [17713]
process[gazebo-7]: started with pid [17714]
process[gazebo_gui-8]: started with pid [17720]
[ INFO] [1531330832.706871468]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1531330832.707295468]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[INFO] [1531330832.713978, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1531330832.731016068]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1531330832.731519758]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
SpawnModel script started
SpawnModel script started
SpawnModel script started
[INFO] [1531330833.235747, 0.000000]: Loading model XML from ros parameter
[INFO] [1531330833.238720, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1531330833.306843, 0.000000]: Loading model XML from file
[INFO] [1531330833.307214, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1531330833.310474, 0.000000]: Loading model XML from file
[INFO] [1531330833.310804, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted (core dumped)
[gazebo-7] process has died [pid 17714, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -u -e ode /home/wowbagger/catkin_ws/src/ros_ship_packages/ros_ship_description/world/open_water.world __name:=gazebo __log:=/home/wowbagger/.ros/log/f27048d8-852f-11e8-8c79-7c8bca0b7f70/gazebo-7.log].
log file: /home/wowbagger/.ros/log/f27048d8-852f-11e8-8c79-7c8bca0b7f70/gazebo-7*.log
Qt: Cannot set locale modifiers: 
[WARN] [1531330862.854738, 0.000000]: Controller Spawner couldn't find the expected controller_manager ROS interface.
[ros_ship/controller_spawner-5] process has finished cleanly
log file: /home/wowbagger/.ros/log/f27048d8-852f-11e8-8c79-7c8bca0b7f70/ros_ship-controller_spawner-5*.log
^C[gazebo_gui-8] killing on exit
[ros_ship/robot_state_publisher-6] killing on exit
[green_buoy_01/buoy_spawner-4] killing on exit
[red_buoy_01/buoy_spawner-3] killing on exit
[urdf_spawner-2] killing on exit
[rviz-1] killing on exit
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 313, in <module>
    sm.callSpawnService()
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 271, in callSpawnService
    initial_pose, self.reference_frame, self.gazebo_namespace)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/gazebo_ros/gazebo_interface.py", line 28, in spawn_urdf_model_client
    rospy.wait_for_service(gazebo_namespace+'/spawn_urdf_model')
  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
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 313, in <module>
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 313, in <module>
    sm.callSpawnService()
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 271, in callSpawnService
    sm.callSpawnService()
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 271, in callSpawnService
    initial_pose, self.reference_frame, self.gazebo_namespace)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/gazebo_ros/gazebo_interface.py", line 28, in spawn_urdf_model_client
    rospy.wait_for_service(gazebo_namespace+'/spawn_urdf_model')
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 159, in wait_for_service
    initial_pose, self.reference_frame, self.gazebo_namespace)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/gazebo_ros/gazebo_interface.py", line 28, in spawn_urdf_model_client
    raise ROSInterruptException("rospy shutdown")
    rospy.wait_for_service(gazebo_namespace+'/spawn_urdf_model')
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 159, in wait_for_service
rospy.exceptions.ROSInterruptException: rospy shutdown
    raise ROSInterruptException("rospy shutdown")
rospy.exceptions.ROSInterruptException: rospy shutdown
[gazebo_gui-8] escalating to SIGTERM
shutting down processing monitor...
... shutting down processing monitor complete
done

The log ~/.ros/log/f27048d8-852f-11e8-8c79-7c8bca0b7f70/gazebo-7*.log does not exist.

This is from the log .ros/log/f27048d8-852f-11e8-8c79-7c8bca0b7f70/ros_ship-controller_spawner-5.log:

[rospy.client][INFO] 2018-07-11 13:30:53,337: init_node, name[/ros_ship/controller_spawner], pid[11489]
[xmlrpc][INFO] 2018-07-11 13:30:53,337: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2018-07-11 13:30:53,338: Started XML-RPC server [http://Nutrimatic-Drink-Dispenser:44847/]
[rospy.init][INFO] 2018-07-11 13:30:53,338: ROS Slave URI: [http://Nutrimatic-Drink-Dispenser:44847/]
[rospy.impl.masterslave][INFO] 2018-07-11 13:30:53,338: _ready: http://Nutrimatic-Drink-Dispenser:44847/
[rospy.registration][INFO] 2018-07-11 13:30:53,338: Registering with master node http://localhost:11311
[xmlrpc][INFO] 2018-07-11 13:30:53,338: xml rpc node: starting XML-RPC server
[rospy.init][INFO] 2018-07-11 13:30:53,438: registered with master
[rospy.rosout][INFO] 2018-07-11 13:30:53,438: initializing /rosout core topic
[rospy.rosout][INFO] 2018-07-11 13:30:53,441: connected to core topic /rosout
[rospy.simtime][INFO] 2018-07-11 13:30:53,442: initializing /clock core topic
[rospy.simtime][INFO] 2018-07-11 13:30:53,444: connected to core topic /clock
[rosout][INFO] 2018-07-11 13:30:53,447: Controller Spawner: Waiting for service controller_manager/load_controller
[rospy.internal][INFO] 2018-07-11 13:30:53,732: topic[/rosout] adding connection to [/rosout], count 0
[rosout][WARNING] 2018-07-11 13:31:23,595: Controller Spawner couldn't find the expected controller_manager ROS interface.
[rospy.core][INFO] 2018-07-11 13:31:23,595: signal_shutdown [atexit]
[rospy.internal][INFO] 2018-07-11 13:31:23,598: topic[/rosout] removing connection to /rosout
[rospy.impl.masterslave][INFO] 2018-07-11 13:31:23,599: atexit
[rospy.client][INFO] 2018-07-11 13:40:32,602: init_node, name[/ros_ship/controller_spawner], pid[17712]
[xmlrpc][INFO] 2018-07-11 13:40:32,603: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2018-07-11 13:40:32,603: Started XML-RPC server [http://Nutrimatic-Drink-Dispenser:35159/]
[rospy.init][INFO] 2018-07-11 13:40:32,603: ROS Slave URI: [http://Nutrimatic-Drink-Dispenser:35159/]
[rospy.impl.masterslave][INFO] 2018-07-11 13:40:32,603: _ready: http://Nutrimatic-Drink-Dispenser:35159/
[rospy.registration][INFO] 2018-07-11 13:40:32,604: Registering with master node http://localhost:11311
[xmlrpc][INFO] 2018-07-11 13:40:32,604: xml rpc node: starting XML-RPC server
[rospy.init][INFO] 2018-07-11 13:40:32,704: registered with master
[rospy.rosout][INFO] 2018-07-11 13:40:32,704: initializing /rosout core topic
[rospy.rosout][INFO] 2018-07-11 13:40:32,707: connected to core topic /rosout
[rospy.simtime][INFO] 2018-07-11 13:40:32,708: initializing /clock core topic
[rospy.simtime][INFO] 2018-07-11 13:40:32,710: connected to core topic /clock
[rosout][INFO] 2018-07-11 13:40:32,713: Controller Spawner: Waiting for service controller_manager/load_controller
[rospy.internal][INFO] 2018-07-11 13:40:32,944: topic[/rosout] adding connection to [/rosout], count 0
[rosout][WARNING] 2018-07-11 13:41:02,854: Controller Spawner couldn't find the expected controller_manager ROS interface.
[rospy.core][INFO] 2018-07-11 13:41:02,855: signal_shutdown [atexit]
[rospy.internal][INFO] 2018-07-11 13:41:02,858: topic[/rosout] removing connection to /rosout
[rospy.impl.masterslave][INFO] 2018-07-11 13:41:02,858: atexit

Steps to Reproduce the Problem

  1. cd ~/catkin_ws
  2. roscore &
  3. roslaunch ros_ship_description ros_ship.launch

Specifications

  • Ubuntu version: 16.04 LTS
  • ROS Version: kinetic
  • Branch: master

Additional Questions

Should I add the following lines to some files, according to this?

<gazebo>
  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
    <robotNamespace>/MYROBOT</robotNamespace>
  </plugin>
</gazebo>

Thanks!

Zhuojie-Ji avatar Jul 12 '18 18:07 Zhuojie-Ji

I solved this error by copying open_water.world from /ros_ship_gazebo_plugins to /ros_ship_description/world, according to issue #6

Zhuojie-Ji avatar Jul 30 '18 18:07 Zhuojie-Ji

I solved this error by copying open_water.world from /ros_ship_gazebo_plugins to /ros_ship_description/world, according to issue #6

it works for me too

zanebin avatar May 16 '20 03:05 zanebin

I solved this error by copying open_water.world from /ros_ship_gazebo_plugins to /ros_ship_description/world, according to issue #6

Thanks. it works for me.

shangwp avatar May 07 '21 08:05 shangwp