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

Gazebo not launch when run launch file

asked 2019-08-28 02:38:45 -0600

rookietheml gravatar image

updated 2019-08-28 21:52:10 -0600

enter code here I tried to launch the parrot drone simulation download from The Construct but the gazebo didn't show after I type the following command:

$ roslaunch drone_construct main.launch

The following is the return message after entering the command above:

 ... logging to /home/chirantou/.ros/log/ec39ce5c-c963-11e9-9409-84a6c8434f72/roslaunch-chirantou-4610.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.

started roslaunch server http://chirantou:43771/

Summary

=======

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    gazebo (sjtu_drone/start_gzserver)
    spawn_model (sjtu_drone/spawn_model)

auto-starting new master
process[master]: started with pid [4621]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to ec39ce5c-c963-11e9-9409-84a6c8434f72
process[rosout-1]: started with pid [4634]
started core service [/rosout]
process[gazebo-2]: started with pid [4637]
process[spawn_model-3]: started with pid [4639]
Error opening log file: "/home/chirantou/.gazebo/client-11345/default.log"
Error opening log file: "/home/chirantou/.gazebo/server-11345/gzserver.log"
Error opening log file: "/home/chirantou/.gazebo/server-11345/default.log"
[spawn_model-3] process has finished cleanly
log file: /home/chirantou/.ros/log/ec39ce5c-c963-11e9-9409-84a6c8434f72/spawn_model-3*.log

Do anybody know why the Gazebo window didn't show?

updated:

I have tried other simulation model downloaded from The Construct like Turtlebot2. They work perfectly fine except the parrot ar drone model.

This is the main.launch file that i used for launching:

<launch> 
<include file="$(find sjtu_drone)/launch/simple.launch"> 
<arg name="world_name" value="$(find drone_construct)/worlds/ardrone_igniteworld.world"/>
</include>
</launch>

And this is the simple.launch file:

<launch> 
<arg name="paused" value="false"/> 
<arg name="use_sim_time" value="true"/>
<arg name="gui" default="true"/> 
<arg name="headless" value="false"/> 
<arg name="debug" value="false"/> 
<arg name="world_name" default="$(find sjtu_drone)/worlds/contest.world"/>

<node name="gazebo" pkg="sjtu_drone" type="start_gzserver" args="$(arg world_name)" respawn="false"/>

<node name="spawn_model" pkg="sjtu_drone" type="spawn_model" respawn="false"/>

</launch>
edit retag flag offensive close merge delete

Comments

Can you post the launch file?

I usually launch gazebo <include file="$(find gazebo_ros)/launch/empty_world.launch"> and passing the world_name and gui argument. The latter one causes the client window to open.

Eisenhorn gravatar image Eisenhorn  ( 2019-08-28 02:58:21 -0600 )edit

This is the launch file "main":


<launch> <include file="$(find sjtu_drone)/launch/simple.launch"> <arg name="world_name" value="$(find drone_construct)/worlds/ardrone_igniteworld.world"/> </include>

</launch>


rookietheml gravatar image rookietheml  ( 2019-08-28 03:03:02 -0600 )edit

And this is the simple.launch file


<launch> <arg name="paused" value="false"/> <arg name="use_sim_time" value="true"/> <arg name="gui" default="true"/> <arg name="headless" value="false"/> <arg name="debug" value="false"/> <arg name="world_name" default="$(find sjtu_drone)/worlds/contest.world"/>

<node name="gazebo" pkg="sjtu_drone" type="start_gzserver" args="$(arg world_name)" respawn="false"/>

<node name="spawn_model" pkg="sjtu_drone" type="spawn_model" respawn="false"/>

</launch>


rookietheml gravatar image rookietheml  ( 2019-08-28 03:03:56 -0600 )edit

Event if I just run the simple.launch file, it still not show any Gazebo window

rookietheml gravatar image rookietheml  ( 2019-08-28 03:06:30 -0600 )edit

@rookietheml can you please update your question with this information using the preformattedttext (101010) button instead of using a comment

jayess gravatar image jayess  ( 2019-08-28 07:57:11 -0600 )edit

Sorry for the formatting because this is my first time to use the forum, but I have just updated the answer Would you please help to have a look? Thank you!

rookietheml gravatar image rookietheml  ( 2019-08-28 21:50:40 -0600 )edit

Just a suggestion , remove the following line in the main.launch file

<arg name="world_name" value="$(find drone_construct)/worlds/ardrone_igniteworld.world"/>

modify the simple.launch file line

<arg name="world_name" default="$(find sjtu_drone)/worlds/contest.world"/>

with

<arg name="world_name" default="$(find drone_construct)/worlds/ardrone_igniteworld.world"/>

This would reduce some complexity for gazebo

BV_Pradeep gravatar image BV_Pradeep  ( 2019-08-29 01:31:53 -0600 )edit

I only see that the gz server is launched but not the client.

Should be a node of type type="gzclient". Have a look at the sjtu_drone if it offers also somethin like start_gzclient.

Have look at /opt/ros/melodic/share/gazebo_ros/launch/empty_world.launch as an example

Eisenhorn gravatar image Eisenhorn  ( 2019-08-29 02:47:38 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-08-28 21:40:31 -0600

bsheffield gravatar image

Did you build the package in your catkin workspace? There are many graphics libraries to compile against.

https://bitbucket.org/theconstructcor...

edit flag offensive delete link more

Comments

Yes I did that. I tried the example showed on this website http://www.theconstructsim.com/ros-qa.... And it works fine, so I followed the same procedure for the parrot ar drone but it doesn't work.

rookietheml gravatar image rookietheml  ( 2019-08-28 21:45:03 -0600 )edit
0

answered 2019-09-02 02:55:52 -0600

Eisenhorn gravatar image

I only see that the gz server is launched but not the client.

Should be a node of type type="gzclient". Have a look at the sjtu_drone if it offers also somethin like start_gzclient.

Have look at /opt/ros/melodic/share/gazebo_ros/launch/empty_world.launch as an example

edit flag offensive delete link more

Question Tools

Stats

Asked: 2019-08-28 02:38:45 -0600

Seen: 2,275 times

Last updated: Sep 02 '19