Gazebo not launch when run launch file
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>
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.
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>
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>
Event if I just run the simple.launch file, it still not show any Gazebo window
@rookietheml can you please update your question with this information using the preformattedttext (
101010
) button instead of using a commentSorry 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!
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
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