Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version


So I worked on solving this issue. It was mainly two problems:

1) The Gazebo client wasnt being launched. Thats because this simulation version is intended for use in ROSDevelopementStudio, so by default the GUI isnt launched for performance reasons. But even if you launched the version that should open the gui, current versions of gazebo just crash, at least in Kinetic Gazebo7.

2) The Environment variables that set up where the models and plugins are in this particular simulation are set outside the ros package system, so this causes other issues, like not appearing the parrot drone mesh or not having any collisions.

All these issues are explained with detail in this video: VIDEO

The repo updated with the solution you can find it here: DRONE CONSTRUCT GIT, kinetic-gazebo7 Branch

You will also need to download this package Spawn_robot_tools: Spawn Robot Tools

To make it work, I created a script called inside drone_construct/scripts that sets the local variables correctly and launched the simulation with the GUI enables and the simulation unpaused:


#find where the 'sjtu_drone' is
pack_path=$(rospack find sjtu_drone)

#export the gazebo pathes
export GAZEBO_MODEL_PATH=$pack_path/models:$GAZEBO_MODEL_PATH
export GAZEBO_RESOURCE_PATH=$pack_path:/usr/share/gazebo-3.0:/usr/share/gazebo- 
export GAZEBO_PLUGIN_PATH=$pack_path/plugins:$GAZEBO_PLUGIN_PATH

#call the client of Gazebo
roslaunch drone_construct main.launch gui:=true paused:=false

And the sjtu_drone package has been modified to use a different gazebo launch system to avoid problems localy. This is because the original simulation uses gazebo binaries to launch everything and not gazebo_ros.

So you just have to do the following and it should work:

 mkdir -p ~/parrot_ws/src;cd ~/parrot_ws/src
 git clone;cd parrot_ardrone;git checkout kinetic-gazebo7;~/parrot_ws/src
 git clone
 cd ~/parrot_ws
catkin_make;source devel/setup.bash;rospack profile
rosrun drone_construct

You should then get something like this:

image description

You can then make the drone take off and land publishing in these topics:

 rostopic pub /drone/takeoff std_msgs/Empty "{}"
 rostopic pub /drone/land std_msgs/Empty "{}"

And then move it around with this ros binary ( go up , stop and down with T , G and B keys. The other keys are the standard keyboard teleop use):

 rosrun teleop_twist_keyboard

Hope this was usefull.