0
$\begingroup$

Rosanswers logo

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

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

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?


Originally posted by yoo on ROS Answers with karma: 1 on 2017-09-11

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by mahe_antoine with karma: 26 on 2017-09-18

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

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>

Originally posted by MeTech with karma: 11 on 2018-01-20

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.