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

Is it possible to run the hector_quadrotor demos in kinetic?

asked 2016-09-29 22:14:05 -0500

pcarleton gravatar image

I installed the kinetic following the Debian instructions.

I found the hector_quadrotor indoor slam tutorial here: http://wiki.ros.org/hector_quadrotor/...

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 ...
(more)
edit retag flag offensive close merge delete

Comments

any update on this?

jbourne gravatar image jbourne  ( 2016-10-19 20:48:11 -0500 )edit

I am having a similar issue on kinetic

baraki gravatar image baraki  ( 2016-11-04 14:48:33 -0500 )edit

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.

shianchen gravatar image shianchen  ( 2019-03-15 09:07:54 -0500 )edit

I'm having issue launching indoor hector slam, did you also had similar problem trying to run the indoor simulation?

Wajeeh gravatar image Wajeeh  ( 2019-03-22 02:09:20 -0500 )edit

4 Answers

Sort by » oldest newest most voted
8

answered 2017-03-02 07:07:32 -0500

Kittenator gravatar image

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
edit flag offensive delete link more

Comments

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?

Kent gravatar image Kent  ( 2017-03-09 15:22:59 -0500 )edit

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 !

Kittenator gravatar image Kittenator  ( 2017-03-14 06:41:13 -0500 )edit

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

fabriceN gravatar image fabriceN  ( 2017-08-29 07:43:40 -0500 )edit

@fabriceN hector_quadrotor_demo is a package of hector_quadrotor.

bxl gravatar image bxl  ( 2017-10-06 18:49:35 -0500 )edit

Hi, Any idea how i can make this service call in a script using python?

lahiruherath gravatar image lahiruherath  ( 2017-10-22 16:40:25 -0500 )edit

I am getting the error that outdoor_flight_gazebo.launch is neither a launch file in pack or a launch file name

patrick_rice gravatar image patrick_rice  ( 2017-12-22 13:03:44 -0500 )edit

@lahiruherath, you would need to port the entire script as far as i can tell.

patrick_rice gravatar image patrick_rice  ( 2017-12-22 13:04:28 -0500 )edit

My issue was solved by sourcing the setup.bash file myself after running the script.

patrick_rice gravatar image patrick_rice  ( 2017-12-22 13:09:48 -0500 )edit
0

answered 2018-02-22 03:54:07 -0500

i get an error when i call the service enable_motors "ERROR: Unable to load type [hector_uav_msgs/EnableMotors]. Have you typed 'make' in [hector_uav_msgs]?"

edit flag offensive delete link more

Comments

Make sure to source devel/setup.bash before making the service call. The instructions given by Kittenator work for me, but this is the error I get if I don't source.

mturnshek gravatar image mturnshek  ( 2018-03-05 12:47:29 -0500 )edit
0

answered 2018-11-29 11:52:48 -0500

jamesislost gravatar image

How are you controlling the quadcopter in this case? is there a teleop option for keyboard? I can only find xbox/ps3 controller options?

edit flag offensive delete link more
0

answered 2019-04-18 06:49:46 -0500

fuad_sa gravatar image

Hello, i followed your instructions above, but when i enter catkin_make, i recieved this message below :

[ 97%] Linking CXX executable /home/fuad/catkin_ws/devel/lib/hector_quadrotor_teleop/quadrotor_teleop [ 97%] Built target quadrotor_teleop [ 97%] Building CXX object hector_worldmodel_urdf_import/CMakeFiles/hector_worldmodel_urdf_import.dir/src/worldmodel_urdf_import.cpp.o /home/fuad/catkin_ws/src/hector_worldmodel_urdf_import/src/worldmodel_urdf_import.cpp:5:48: fatal error: hector_worldmodel_msgs/UserPercept.h: No such file or directory compilation terminated. hector_worldmodel_urdf_import/CMakeFiles/hector_worldmodel_urdf_import.dir/build.make:62: recipe for target 'hector_worldmodel_urdf_import/CMakeFiles/hector_worldmodel_urdf_import.dir/src/worldmodel_urdf_import.cpp.o' failed make[2]: * [hector_worldmodel_urdf_import/CMakeFiles/hector_worldmodel_urdf_import.dir/src/worldmodel_urdf_import.cpp.o] Error 1 CMakeFiles/Makefile2:14255: recipe for target 'hector_worldmodel_urdf_import/CMakeFiles/hector_worldmodel_urdf_import.dir/all' failed make[1]: [hector_worldmodel_urdf_import/CMakeFiles/hector_worldmodel_urdf_import.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: ** [all] Error 2 Invoking "make -j1" failed

What should i do ? Anybody can help with this ? thanks

edit flag offensive delete link more

Comments

Hi! Did you solve this problem?

Rustem gravatar image Rustem  ( 2019-12-07 06:27:27 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-09-29 22:14:05 -0500

Seen: 7,341 times

Last updated: Feb 22 '18