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>
Asked by rookietheml on 2019-08-28 02:38:45 UTC
Answers
Did you build the package in your catkin workspace? There are many graphics libraries to compile against.
https://bitbucket.org/theconstructcore/parrot_ardrone/src/master/
Asked by bsheffield on 2019-08-28 21:40:31 UTC
Comments
Yes I did that. I tried the example showed on this website http://www.theconstructsim.com/ros-qa-153-use-rosjects-locally/. And it works fine, so I followed the same procedure for the parrot ar drone but it doesn't work.
Asked by rookietheml on 2019-08-28 21:45:03 UTC
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
Asked by Eisenhorn on 2019-09-02 02:55:52 UTC
Comments
Can you post the launch file?
I usually launch gazebo and passing the world_name and gui argument. The latter one causes the client window to open.
Asked by Eisenhorn on 2019-08-28 02:58:21 UTC
This is the launch file "main":
<?xml version="1.0"?>
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
Asked by rookietheml on 2019-08-28 03:03:02 UTC
And this is the simple.launch file
<!-- start gzserver and load the map -->
<!-- Spawn simulated quadrotor uav -->
<!-- start keyboard control ui
-->
Asked by rookietheml on 2019-08-28 03:03:56 UTC
Event if I just run the simple.launch file, it still not show any Gazebo window
Asked by rookietheml on 2019-08-28 03:06:30 UTC
@rookietheml can you please update your question with this information using the preformattedttext (
101010
) button instead of using a commentAsked by jayess on 2019-08-28 07:57:11 UTC
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!
Asked by rookietheml on 2019-08-28 21:50:40 UTC
Just a suggestion , remove the following line in the main.launch file
modify the simple.launch file line
with
This would reduce some complexity for gazebo
Asked by BV_Pradeep on 2019-08-29 01:31:53 UTC
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
Asked by Eisenhorn on 2019-08-29 02:47:38 UTC
Thanks a lot! It do works after I add gzclient in the launch file. But when I try to use this main.launch file, the Gazebo will hanging while showing preparing world. I change
to
and It will generate an empty world with the drone, so I am still trying to fix this problem.
Asked by rookietheml on 2019-08-29 07:30:45 UTC
Have you checked the contest.world file? Maybe there a some syntax errors, or models (dae, stl) are loaded which did not install or cannot be found.
Asked by Eisenhorn on 2019-08-29 07:55:46 UTC
Thank you for your advice! I fixed this problem as well by downloading a list of Gazebo models from this website:
Then create a models folder under ~/.Gazebo folder and copy the files just downloaded to this folder and it works.
Asked by rookietheml on 2019-08-30 01:32:45 UTC
Good to hear! Could you upvote my comments that helped you and mark them as answer? BR
Asked by Eisenhorn on 2019-08-30 08:59:18 UTC
You can't mark comments as correct, that can only be done to answers. You should write up an answer instead
Asked by jayess on 2019-08-30 09:04:32 UTC
@jayess: Thanks for the info! Posted the comment now as an answer.
Asked by Eisenhorn on 2019-09-02 02:56:51 UTC