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

unable to find gui node in gazebo ros package

asked 2017-09-11 05:22:22 -0500

yoo gravatar image

Hello, I am trying to execute drone simulator in gazebo7/ros-kinetic

I've installed 'tum_simulator' from https://github.com/angelsantamaria/tu...

Next, I tried to test the following launch file

<launch>
  <param name='/use_sim_time' value='true' />
  <node name='empty_world_sever' pkg='gazebo_ros' type='gazebo' args="$(find cvg_sim_gazebo)/worlds/emtpy.world" respawn='false'  output='screen'>
  </node>
  <node name='gazebo_gui' pkg='gazebo' type='gui' respawn='false' output='screen'/>
</launch>

When I execute the above launch file then, it says 'cannot launch node of type gazebo/gazebo'

I heard there is some change between ros-kinetic, gazebo 7 and the prior version Thus I found I need to change pkg argument from gazebo to gazebo_ros

Now, it says 'cannot launch node of type [gazebo_ros/gui]: can't locate node [gui] in package [gazebo_ros] and I can't find what should I do to execute such launch file

plz, tell me what should I do?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2017-09-18 08:30:24 -0500

mahe_antoine gravatar image

Hello, If you installed the tum_simulator, you should have launch files examples in "tum_simulator/cvg_sim_gazebo/launch". You can launch them with roslaunch :

roslaunch cvg_sim_gazebo ardrone_testworld.launch

In this version the gui client and server are both launch by default. If you only want the server then you neep to add the option <arg name="gui" value="false"/> in the launch file :

<?xml version="1.0"?>y_no_gui.launch  (press RETURN)
<launch>
  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
      <arg name="world_name" value="$(find cvg_sim_gazebo)/worlds/empty_sky_AR.world"/>
      <arg name="gui" value="false"/>
  </include>


  <!-- Spawn simulated quadrotor uav -->
  <include file="$(find cvg_sim_gazebo)/launch/spawn_quadrotor.launch" >
    <arg name="model" value="$(find cvg_sim_gazebo)/urdf/quadrotor_sensors.urdf.xacro"/> 
  </include>
</launch>

You may also want to look at that answer.

edit flag offensive delete link more
1

answered 2018-01-20 17:14:57 -0500

MeTech gravatar image

I think the errors are due to a version problem and a missing file problem, but I'm not sure about the version problem because I have only used the kinetic version of ROS. First, change the types to gzserver and gzclient respectively. Second, there is no empty.world file in the "$(find cvg_sim_gazebo)/worlds/empty.world" directory. Maybe, the developers accidentally erased it. Anyway, args="worlds/empty.world" works if you have sourced the gazebo_ros directory. The version below works for me, you can delete the commented previous version.

<?xml version="1.0"?>
<launch>
  <param name="/use_sim_time" value="true" />
<!--    <node name="empty_world_server" pkg="gazebo_ros" type="gazebo" args="$(find cvg_sim_gazebo)/worlds/empty.world" respawn="false" output="screen">
  </node> -->

  <node name="empty_world_server" pkg="gazebo_ros" type="gzserver" args="worlds/empty.world" respawn="false" output="screen">
  </node>
<!--  <node name="gazebo_gui" pkg="gazebo_ros" type="gui" respawn="false" output="screen"/>-->
    <node name="gazebo_gui" pkg="gazebo_ros" type="gzclient" respawn="false" output="screen"/>
</launch>
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-09-11 05:22:22 -0500

Seen: 838 times

Last updated: Sep 18 '17