Roslaunch cannot launch node of type: gazebo
Hi All,
Currently I am trying to insert hector quadrotor model in gazebo 1.9. When I use rosrun to spawn robot model:
rosrun gazebo_ros spawn_model -file /opt/ros/hydro/share/hector_quadrotor/hector_quadrotor_urdf/urdf/quadrotore.urdf -urdf -x 0 -y 0 -z 1 -model quadrotore
It works fine and tell me:
[INFO] [WallTime: 1392758020.076054] [0.000000] Loading model xml from file
[INFO] [WallTime: 1392758020.077949] [0.000000] Waiting for service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1392758020.082473] [0.000000] Calling service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1392758020.323186] [1471.849000] Spawn status: SpawnModel: Successfully spawned model
However, when I use roslaunch:
roslaunch hector_quadrotor gazebo.launch model:="/opt/ros/hydro/share/hector_quadrotor/hector_quadrotor_urdf/urdf/quadrotore.urdf"
It gives me
ERROR: cannot launch node of type [gazebo/spawn_urdf_model]: gazebo
ROS path [0]=/opt/ros/hydro/share/ros
ROS path [1]=/home/cds/catkin_ws/src
ROS path [2]=/opt/ros/hydro/share
ROS path [3]=/opt/ros/hydro/stacks
Why it can find gazebo/spawn_urdf_model when using rosrun but can not find it when using roslaunch? I am using ROS Hydro.
Below also please find my gazebo.launch:
<?xml version="1.0"?>
<launch>
<!-- this launch file corresponds to robot model in ros-pkg/robot_descriptions/pr2/erratic_defs/robots for full erratic -->
<param name="/use_sim_time" value="true" />
<!-- start up wg world -->
<include file="/home/cds/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/launch/empty_world.launch"/>
<arg name="model" />
<param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" />
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<!-- start robot state publisher -->
<node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node>
<node name="spawn_robot" pkg="gazebo" type="spawn_urdf_model" args="-urdf -param robot_description -z 0.1 -model robot_model" respawn="false" output="screen" />
</launch>
I suspect the hector packages need to be updated for Hydro, now that gazebo is a system dependency rather than a ROS package.