0
$\begingroup$

Rosanswers logo

I installed the kinetic following the Debian instructions.

I found the hector_quadrotor indoor slam tutorial here: http://wiki.ros.org/hector_quadrotor/Tutorials/Quadrotor%20indoor%20SLAM%20demo

I tried installing ros-hydro-hector-quadrotor-demo, but that package was not found. I tried following the wstool instructions, however when I ran catkin_make I got the output listed below (I'm not sure how to make it more concise):

[  0%] Built target std_msgs_generate_messages_py
[  0%] [  0%] [  0%] Built target _hector_uav_msgs_generate_messages_check_deps_RawMagnetic
Built target _hector_uav_msgs_generate_messages_check_deps_YawrateCommand
Built target _hector_uav_msgs_generate_messages_check_deps_ServoCommand
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_RC
[  0%] [  0%] Built target _hector_uav_msgs_generate_messages_check_deps_RuddersCommand
Built target _hector_uav_msgs_generate_messages_check_deps_Compass
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_MotorCommand
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_AttitudeCommand
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_ThrustCommand
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_RawImu
[  0%] [  0%] Built target _hector_uav_msgs_generate_messages_check_deps_Supply
Built target _hector_uav_msgs_generate_messages_check_deps_MotorStatus
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_Altimeter
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_VelocityXYCommand
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_RawRC
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_MotorPWM
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_VelocityZCommand
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_PositionXYCommand
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_HeightCommand
[  0%] Built target _hector_uav_msgs_generate_messages_check_deps_HeadingCommand
[  0%] [  0%] Built target std_msgs_generate_messages_eus
Built target std_msgs_generate_messages_cpp
[  0%] Built target std_msgs_generate_messages_lisp
[  0%] [  0%] Built target _hector_uav_msgs_generate_messages_check_deps_ControllerState
Built target std_msgs_generate_messages_nodejs
[  0%] Built target _hector_nav_msgs_generate_messages_check_deps_GetDistanceToObstacle
[  0%] Built target _hector_nav_msgs_generate_messages_check_deps_GetRobotTrajectory
[  0%] [  0%] [  0%] Built target nav_msgs_generate_messages_nodejs
Built target _hector_nav_msgs_generate_messages_check_deps_GetNormal
Built target _hector_nav_msgs_generate_messages_check_deps_GetSearchPosition
[  0%] [  0%] [  0%] Built target nav_msgs_generate_messages_lisp
Built target nav_msgs_generate_messages_py
Built target nav_msgs_generate_messages_eus
[  0%] [  0%] [  0%] Built target _catkin_empty_exported_target
Built target rosgraph_msgs_generate_messages_cpp
Built target nav_msgs_generate_messages_cpp
[  0%] Built target _hector_nav_msgs_generate_messages_check_deps_GetRecoveryInfo
[  0%] [  0%] [  0%] Built target actionlib_msgs_generate_messages_eus
Built target roscpp_generate_messages_eus
Built target geometry_msgs_generate_messages_cpp
[  0%] Built target actionlib_msgs_generate_messages_lisp
[  0%] [  0%] [  0%] [  0%] Built target geometry_msgs_generate_messages_eus
Built target geometry_msgs_generate_messages_lisp
Built target geometry_msgs_generate_messages_py
Built target geometry_msgs_generate_messages_nodejs
[  0%] [  0%] [  0%] [  0%] Built target actionlib_msgs_generate_messages_nodejs
Built target actionlib_msgs_generate_messages_py
Built target actionlib_msgs_generate_messages_cpp
Built target roscpp_generate_messages_cpp
[  0%] [  0%] [  0%] [  0%] Built target roscpp_generate_messages_lisp
Built target rosgraph_msgs_generate_messages_eus
Built target roscpp_generate_messages_nodejs
Built target rosgraph_msgs_generate_messages_lisp
[  0%] Built target rosgraph_msgs_generate_messages_py
[  0%] [  0%] Built target roscpp_generate_messages_py
Built target rosgraph_msgs_generate_messages_nodejs
[  0%] [  0%] Built target sensor_msgs_generate_messages_py
[  0%] Built target sensor_msgs_generate_messages_nodejs
Built target sensor_msgs_generate_messages_cpp
[  0%] Built target hector_quadrotor_aerodynamics
[  0%] Built target sensor_msgs_generate_messages_eus
[  0%] Built target sensor_msgs_generate_messages_lisp
[  0%] Built target map_to_image_node
[  0%] Built target _driver_base_generate_messages_check_deps_ConfigString
[  0%] Built target _driver_base_generate_messages_check_deps_ConfigValue
[  0%] Built target _driver_base_generate_messages_check_deps_SensorLevels
[  0%] [  0%] Building CXX object hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/src/diffdrive_plugin_6w.cpp.o
[  1%] Built target hector_gazebo_plugins_gencfg
[  2%] Building CXX object hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/src/diffdrive_plugin_multi_wheel.cpp.o
Built target gazebo_ros_force_based_move
[  2%] Built target hector_gazebo_reset_plugin
[  2%] Built target _hector_gazebo_plugins_generate_messages_check_deps_SetBias
[  2%] Built target hector_gazebo_ros_gps
[  3%] Built target hector_gazebo_ros_magnetic
[  3%] Building CXX object hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_gazebo_ros_sonar.dir/src/gazebo_ros_sonar.cpp.o
[  4%] Building CXX object hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_servo_plugin.dir/src/servo_plugin.cpp.o
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp: In member function ‘virtual void gazebo::GazeboRosSonar::Load(gazebo::sensors::SensorPtr, sdf::ElementPtr)’:
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:60:68: error: no matching function for call to ‘dynamic_pointer_cast(gazebo::sensors::SensorPtr&)’
   sensor_ = boost::dynamic_pointer_cast<sensors::RaySensor>(_sensor);
                                                                    ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:60:68: note: candidate is:
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
                 from /usr/include/gazebo-7/gazebo/common/CommonTypes.hh:24,
                 from /usr/include/gazebo-7/gazebo/common/Plugin.hh:44,
                 from /home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/include/hector_gazebo_plugins/gazebo_ros_sonar.h:32,
                 from /home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:29:
/usr/include/boost/smart_ptr/shared_ptr.hpp:808:42: note: template<class T, class U> boost::shared_ptr<X> boost::dynamic_pointer_cast(const boost::shared_ptr<U>&)
 template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
                                          ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:808:42: note:   template argument deduction/substitution failed:
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:60:68: note:   ‘gazebo::sensors::SensorPtr {aka std::shared_ptr<gazebo::sensors::Sensor>}’ is not derived from ‘const boost::shared_ptr<U>’
   sensor_ = boost::dynamic_pointer_cast<sensors::RaySensor>(_sensor);
                                                                    ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:68:49: warning: ‘std::string gazebo::sensors::Sensor::GetWorldName() const’ is deprecated (declared at /usr/include/gazebo-7/gazebo/sensors/Sensor.hh:200) [-Wdeprecated-declarations]
   std::string worldName = sensor_->GetWorldName();
                                                 ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:90:50: error: ‘class gazebo::sensors::RaySensor’ has no member named ‘GetAngleMax’
   range_.field_of_view = std::min(fabs((sensor_->GetAngleMax() - sensor_->GetAngleMin()).Radian()), fabs((sensor_->GetVerticalAngleMax() - sensor_->GetVerticalAngleMin()).Radian()));
                                                  ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:90:75: error: ‘class gazebo::sensors::RaySensor’ has no member named ‘GetAngleMin’
   range_.field_of_view = std::min(fabs((sensor_->GetAngleMax() - sensor_->GetAngleMin()).Radian()), fabs((sensor_->GetVerticalAngleMax() - sensor_->GetVerticalAngleMin()).Radian()));
                                                                           ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:90:116: error: ‘class gazebo::sensors::RaySensor’ has no member named ‘GetVerticalAngleMax’
   range_.field_of_view = std::min(fabs((sensor_->GetAngleMax() - sensor_->GetAngleMin()).Radian()), fabs((sensor_->GetVerticalAngleMax() - sensor_->GetVerticalAngleMin()).Radian()));
                                                                                                                    ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:90:149: error: ‘class gazebo::sensors::RaySensor’ has no member named ‘GetVerticalAngleMin’
   range_.field_of_view = std::min(fabs((sensor_->GetAngleMax() - sensor_->GetAngleMin()).Radian()), fabs((sensor_->GetVerticalAngleMax() - sensor_->GetVerticalAngleMin()).Radian()));
                                                                                                                                                     ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:91:43: warning: ‘double gazebo::sensors::RaySensor::GetRangeMax() const’ is deprecated (declared at /usr/include/gazebo-7/gazebo/sensors/RaySensor.hh:103) [-Wdeprecated-declarations]
   range_.max_range = sensor_->GetRangeMax();
                                           ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:92:43: warning: ‘double gazebo::sensors::RaySensor::GetRangeMin() const’ is deprecated (declared at /usr/include/gazebo-7/gazebo/sensors/RaySensor.hh:94) [-Wdeprecated-declarations]
   range_.min_range = sensor_->GetRangeMin();
                                           ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp: In member function ‘virtual void gazebo::GazeboRosSonar::Update()’:
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:141:43: warning: ‘gazebo::physics::MultiRayShapePtr gazebo::sensors::RaySensor::GetLaserShape() const’ is deprecated (declared at /usr/include/gazebo-7/gazebo/sensors/RaySensor.hh:253) [-Wdeprecated-declarations]
   int num_ranges = sensor_->GetLaserShape()->GetSampleCount() * sensor_->GetLaserShape()->GetVerticalSampleCount();
                                           ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:141:88: warning: ‘gazebo::physics::MultiRayShapePtr gazebo::sensors::RaySensor::GetLaserShape() const’ is deprecated (declared at /usr/include/gazebo-7/gazebo/sensors/RaySensor.hh:253) [-Wdeprecated-declarations]
   int num_ranges = sensor_->GetLaserShape()->GetSampleCount() * sensor_->GetLaserShape()->GetVerticalSampleCount();
                                                                                        ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp:143:41: warning: ‘gazebo::physics::MultiRayShapePtr gazebo::sensors::RaySensor::GetLaserShape() const’ is deprecated (declared at /usr/include/gazebo-7/gazebo/sensors/RaySensor.hh:253) [-Wdeprecated-declarations]
     double ray = sensor_->GetLaserShape()->GetRange(i);
                                         ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/servo_plugin.cpp: In member function ‘virtual void gazebo::ServoPlugin::Update()’:
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/servo_plugin.cpp:203:25: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
     servo[FIRST].joint->SetMaxForce(0, maximumTorque);
                         ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/servo_plugin.cpp:205:28: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
       servo[SECOND].joint->SetMaxForce(0, maximumTorque);
                            ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/servo_plugin.cpp:207:29: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
         servo[THIRD].joint->SetMaxForce(0, maximumTorque);
                             ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/servo_plugin.cpp:211:25: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
     servo[FIRST].joint->SetMaxForce(0, 0.0);
                         ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/servo_plugin.cpp:213:28: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
       servo[SECOND].joint->SetMaxForce(0, 0.0);
                            ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/servo_plugin.cpp:215:29: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
         servo[THIRD].joint->SetMaxForce(0, 0.0);
                             ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/diffdrive_plugin_6w.cpp: In member function ‘virtual void gazebo::DiffDrivePlugin6W::Update()’:
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/diffdrive_plugin_6w.cpp:231:25: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
     joints[FRONT_LEFT]->SetMaxForce(0, torque);
                         ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/diffdrive_plugin_6w.cpp:232:23: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
     joints[MID_LEFT]->SetMaxForce(0, torque);
                       ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/diffdrive_plugin_6w.cpp:233:24: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
     joints[REAR_LEFT]->SetMaxForce(0, torque);
                        ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/diffdrive_plugin_6w.cpp:235:26: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
     joints[FRONT_RIGHT]->SetMaxForce(0, torque);
                          ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/diffdrive_plugin_6w.cpp:236:24: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
     joints[MID_RIGHT]->SetMaxForce(0, torque);
                        ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/diffdrive_plugin_6w.cpp:237:25: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
     joints[REAR_RIGHT]->SetMaxForce(0, torque);
                         ^
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/diffdrive_plugin_multi_wheel.cpp: In member function ‘virtual void gazebo::GazeboRosDiffDriveMultiWheel::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/paul/hector_quadrotor_tutorial/src/hector_gazebo/hector_gazebo_plugins/src/diffdrive_plugin_multi_wheel.cpp:250:27: error: ‘class gazebo::physics::Joint’ has no member named ‘SetMaxForce’
         joints_[side][i]->SetMaxForce(0, torque);
                           ^
hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_servo_plugin.dir/build.make:54: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_servo_plugin.dir/src/servo_plugin.cpp.o' failed
make[2]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_servo_plugin.dir/src/servo_plugin.cpp.o] Error 1
CMakeFiles/Makefile2:6278: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_servo_plugin.dir/all' failed
make[1]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_servo_plugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_gazebo_ros_sonar.dir/build.make:54: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_gazebo_ros_sonar.dir/src/gazebo_ros_sonar.cpp.o' failed
make[2]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_gazebo_ros_sonar.dir/src/gazebo_ros_sonar.cpp.o] Error 1
CMakeFiles/Makefile2:6243: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_gazebo_ros_sonar.dir/all' failed
make[1]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/hector_gazebo_ros_sonar.dir/all] Error 2
hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/build.make:54: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/src/diffdrive_plugin_6w.cpp.o' failed
make[2]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/src/diffdrive_plugin_6w.cpp.o] Error 1
CMakeFiles/Makefile2:5422: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/all' failed
make[1]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/all] Error 2
hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/build.make:54: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/src/diffdrive_plugin_multi_wheel.cpp.o' failed
make[2]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/src/diffdrive_plugin_multi_wheel.cpp.o] Error 1
CMakeFiles/Makefile2:5457: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/all' failed
make[1]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Base path: /home/paul/hector_quadrotor_tutorial
Source space: /home/paul/hector_quadrotor_tutorial/src
Build space: /home/paul/hector_quadrotor_tutorial/build
Devel space: /home/paul/hector_quadrotor_tutorial/devel
Install space: /home/paul/hector_quadrotor_tutorial/install
####
#### Running command: "make cmake_check_build_system" in "/home/paul/hector_quadrotor_tutorial/build"
####
####
#### Running command: "make -j4 -l4" in "/home/paul/hector_quadrotor_tutorial/build"
####
Invoking "make -j4 -l4" failed

Here is my apt sources file:

 % cat /etc/apt/sources.list.d/ros-latest.list 
deb http://packages.ros.org/ros/ubuntu jessie main

And here is my Debian release information

Distributor ID: Debian
Description:    Debian GNU/Linux 8.5 (jessie)
Release:        8.5
Codename:       jessie

And here is my gazebo version:

 % gazebo --version
Gazebo multi-robot simulator, version 7.0.0
Copyright (C) 2012-2016 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

If it's not possible to run on kinetic, is there an easy way to switch ROS versions on Debian? It seems like earlier versions are only supported on Ubuntu.


Originally posted by pcarleton on ROS Answers with karma: 11 on 2016-09-29

Post score: 1


Original comments

Comment by jbourne on 2016-10-19:
any update on this?

Comment by baraki on 2016-11-04:
I am having a similar issue on kinetic

Comment by shianchen on 2019-03-15:
I am trying implement this project too. I launch the project successfully. But i can only control the copter by keyboard. Can anyone tell me how to make the copter fly using SLAM, just like the video shows? Thank you.

Comment by Wajeeh on 2019-03-22:
I'm having issue launching indoor hector slam, did you also had similar problem trying to run the indoor simulation?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi,

I was wondering the same thing and found a way to download and build Hector Quadrotor for Kinetic. There is a number of packages to install (using apt-get) and some to clone from their git in a catkin workspace, then it compiles fine. Then there are some options to deactivate (the propulsion and aerodynamics plugins). I've made a script for the whole process. In the end you should be able to run the demo by doing 'roslaunch hector_quadrotor_demo indoor_slam_gazebo.launch'

#!/bin/bash

# to execute when in catkin_ws/src folder
sudo apt-get install ros-kinetic-ros-control
sudo apt-get install ros-kinetic-gazebo-ros-control
sudo apt-get install ros-kinetic-unique-identifier
sudo apt-get install ros-kinetic-geographic-info
sudo apt-get install ros-kinetic-laser-geometry
sudo apt-get install ros-kinetic-tf-conversions
sudo apt-get install ros-kinetic-tf2-geometry-msgs
sudo apt-get install ros-kinetic-joy

git clone -b kinetic-devel https://github.com/tu-darmstadt-ros-pkg/hector_quadrotor
git clone -b catkin https://github.com/tu-darmstadt-ros-pkg/hector_localization
git clone -b kinetic-devel https://github.com/tu-darmstadt-ros-pkg/hector_gazebo
git clone -b kinetic-devel https://github.com/tu-darmstadt-ros-pkg/hector_models
git clone -b catkin https://github.com/tu-darmstadt-ros-pkg/hector_slam

sed -i -e 's/option(USE_PROPULSION_PLUGIN "Use a model of the quadrotor propulsion system" ON)/option(USE_PROPULSION_PLUGIN "Use a model of the quadrotor propulsion system" OFF)/g' hector_quadrotor/hector_quadrotor/hector_quadrotor_gazebo/urdf/CMakeLists.txt

sed -i -e 's/option(USE_AERODYNAMICS_PLUGIN "Use a model of the quadrotor aerodynamics" ON)/option(USE_AERODYNAMICS_PLUGIN "Use a model of the quadrotor aerodynamics" OFF)/g' hector_quadrotor/hector_quadrotor/hector_quadrotor_gazebo/urdf/CMakeLists.txt

# this is to deactivate warnings
sed -i -e 's/add_dependencies(landing_action hector_uav_msgs_generate_message_cpp)//g' hector_quadrotor/hector_quadrotor/hector_quadrotor_actions/CMakeLists.txt

sed -i -e 's/add_dependencies(pose_action hector_uav_msgs_generate_message_cpp)//g' hector_quadrotor/hector_quadrotor/hector_quadrotor_actions/CMakeLists.txt

sed -i -e 's/add_dependencies(takeoff_action hector_uav_msgs_generate_message_cpp)//g' hector_quadrotor/hector_quadrotor/hector_quadrotor_actions/CMakeLists.txt

sed -i -e 's/add_dependencies(hector_quadrotor_controllers hector_uav_msgs_generate_message_cpp)//g' hector_quadrotor/hector_quadrotor/hector_quadrotor_controllers/CMakeLists.txt


cd ..
catkin_make
source devel/setup.bash

Originally posted by Kittenator with karma: 96 on 2017-03-02

This answer was ACCEPTED on the original site

Post score: 8


Original comments

Comment by Kent on 2017-03-09:
Hi! Thanks! It worked! But the quadrotor just refuse to take off even if I publish geometry_msgs/Twist messages through topic /cmd_vel. Do you have any idea what could be wrong?

Comment by Kittenator on 2017-03-14:
You have to enable the motors by calling the \enable_motors service :

rosservice call \enable_motors true

Then you should be able to make it fly !

Comment by fabriceN on 2017-08-29:
Thanks a lot @Kittenator for this wonderful help! However, once in ran catkin_make, I saw that hector_quadrotot_demo has not been built. Only hector_gazebo, hector_localization, hector_models, hector_quadrotor and hector_slam Somebody can help me to find out what happens? Thank you very much for you

Comment by bxl on 2017-10-06:
@fabriceN hector_quadrotor_demo is a package of hector_quadrotor.

Comment by lahiruherath on 2017-10-22:
Hi, Any idea how i can make this service call in a script using python?

Comment by patrick_rice on 2017-12-22:
I am getting the error that outdoor_flight_gazebo.launch is neither a launch file in pack or a launch file name

Comment by patrick_rice on 2017-12-22:
@lahiruherath, you would need to port the entire script as far as i can tell.

Comment by patrick_rice on 2017-12-22:
My issue was solved by sourcing the setup.bash file myself after running the script.

Comment by SMEAC on 2018-09-24:
Thanks a lot @Kittenator. There does appear to be an error in the sed code given above. In each sed command you need to remove the first hector_quadrotor/ from a CMakeLists.txt location. e.g. hector_quadrotor/hector_quadrotor_gazebo/urdf/CMakeLists.txt, not hector_quadrotor/hector_quadrotor/...

Comment by Wajeeh on 2019-03-20:
I'm getting this error when I am trying to cmake on ros kinetic ubuntu, plz help

-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
    CMake Error at /home/wajeeh-ros/catkin_ws/devel/share/hector_quadrotor_model/cmake/hector_quadrotor_modelConfig.cmake:148 (message):
      Project 'hector_quadrotor_gazebo_plugins' tried to find library
      '-lpthread'.  The library is neither a target nor built/installed properly.
      Did you compile project 'hector_quadrotor_model'? Did you find_package() it
      before the subdirectory containing its code is included?
    Call Stack (most recent call first):
      /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
      hector_quadrotor/hector_quadrotor_gazebo_plugins/CMakeLists.txt:7 (find_package)
    
     --Configuring incomplete, errors occurred!
    See also "/home/wajeeh-ros/catkin_ws/build/CMakeFiles/CMakeOutput.log".
    See also "/home/wajeeh-ros/catkin_ws/build/CMakeFiles/CMakeError.log
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.