Ask Your Question
3

Roslaunch cannot launch node of type: gazebo

asked 2014-02-18 09:25:47 -0600

Sendoh gravatar image

updated 2014-02-18 12:56:00 -0600

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>
edit retag flag offensive close merge delete

Comments

I suspect the hector packages need to be updated for Hydro, now that gazebo is a system dependency rather than a ROS package.

ahendrix gravatar imageahendrix ( 2014-02-18 13:21:27 -0600 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2014-02-18 17:48:24 -0600

ncr7 gravatar image

maybe instead of,

 <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" />

try something like this,

<!-- Spawn a robot into Gazebo -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $(find baxter_description)/urdf/baxter.urdf -urdf -z 1 -model baxter" />

there is a more detailed tutorial on gazebo's website, http://gazebosim.org/wiki/Tutorials/1...

if you have an urdf.xacro there is another method of importing into gazebo also listed in the tutorial linked above.

edit flag offensive delete link more

Comments

Thanks. I have followed what you suggested. Use below to replace old one, it works. <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -z 0.1 -model robot_model" respawn="false" output="screen"/>

Sendoh gravatar imageSendoh ( 2014-02-19 04:31:07 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-02-18 09:25:47 -0600

Seen: 4,946 times

Last updated: Feb 18 '14