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

Revision history [back]

Let's start with the second problem:

I assume you are using groovy. You need to install/clone several additional stacks to use hector_quadrotor with all features:

and of course the simulator_gazebo stack with the Gazebo simulator and related packages. Make sure to clone the groovy-devel branch of the hector_quadrotor, hector_gazebo and hector_models in groovy, but this should be the default. rosdep only installs system dependencies and some 3rd-party libraries packaged especially for ROS, not other packages and stacks.

I added a rosinstall file containing all dependencies to the repo. If you have the python-rosinstall package installed, you can simply create a new workspace using the following commands:

rosinstall hector_quadrotor_workspace /opt/ros/groovy https://raw.github.com/tu-darmstadt-ros-pkg/hector_quadrotor/groovy-devel/hector_quadrotor.rosinstall
cd hector_quadrotor_workspace
source setup.bash
rosmake hector_quadrotor_gazebo

I just verfied that this procedure works with a pure ROS groovy installation and the simulator_gazebo stack installed.

If all stacks are in your ROS_PACKAGE_PATH, you should be able to rosmake hector_quadrotor_gazebo and spawn a quadrotor in Gazebo using the roslaunch hector_quadrotor_gazebo spawn_quadrotor.launch command (or one of the other variants depending of your application).

You can also check the hector_quadrotor tutorials which contain some further instructions for doing indoor or outdoor SLAM.

The quadrotor can be controlled by velocity commands on the /cmd_vel topic and also publishes its state in tf and on the /ground_truth/state topic.

There are several solutions to control the quadrotor from within Matlab. Check this page for an overview. None of these methods works just out of the box as there is no supported ROS client library yet.

In our group we use the rosmatlab package to communicate with the simulated and real quadrotor. Installation is a bit complicated, but once installed writing litte scripts or publishing control commands from Matlab is very easy. The interface mimics roscpp as far as possible.

This Gazebo/Matlab approach is fine for commanding velocities that only change slowly compared to the drone's dynamics. If you want to simulate a real-time controller, you have to implement your own Gazebo plugin. The hector_quadrotor_controller package contains two plugins to simulate the propulsion system and the aerodynamics of the quadrotor using a Matlab model compiled with Matlab Coder. These plugins are disabled by default as not everyone has an installation of Matlab. We use these plugins together with the gazebo_rtt_plugin to load Orocos Real-Time Toolkit components into Gazebo for software-in-the-loop simulations, but this approach is currently not documented.