Ask Your Question
0

Gazebo not launch when run launch file

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

rookietheml gravatar image

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

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 imageEisenhorn ( 2019-08-28 02:58:21 -0500 )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 imagerookietheml ( 2019-08-28 03:03:02 -0500 )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 imagerookietheml ( 2019-08-28 03:03:56 -0500 )edit

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

rookietheml gravatar imagerookietheml ( 2019-08-28 03:06:30 -0500 )edit

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

jayess gravatar imagejayess ( 2019-08-28 07:57:11 -0500 )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 imagerookietheml ( 2019-08-28 21:50:40 -0500 )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 imageBV_Pradeep ( 2019-08-29 01:31:53 -0500 )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 imageEisenhorn ( 2019-08-29 02:47:38 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

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

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
0

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

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 imagerookietheml ( 2019-08-28 21:45:03 -0500 )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

Stats

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

Seen: 45 times

Last updated: Sep 02