Hector_quadrotor compiled summary | ubuntu 14.04 ros – indigo version

  • Based on Ubuntu 14.04 LTS
  • The ROS version used is Indigo

Hector_quadrotor ROS package is mainly used for modeling, control and simulation of quadrotor UAV.

Note: the two installation modes optional: install the binary packages | install the source files


install the binary packages

  • Execute the following command
sudo apt-get update
sudo apt-get install ros-indigo-hector-quadrotor-demo
Copy the code

This installation method, can not see the source code, I recommend from the source file installation method.

install the source files

1. Install the dependent libraries

System and dependent libraries needed for Ubuntu 14.04 | ros – indigo | Gazebo | gazebo_ros_pkgs | geographic_msgs here assumes that has installed Ubuntu 14.04, ros – indigo and Gazebo.

  • Run the following command to install itgazebo_ros_pkgs
sudo apt-get install ros-indigo-gazebo-ros-pkgs ros-indigo-gazebo-ros-control
Copy the code

If you have problems installing here, please refer to the official Gazebo installation tutorial for further information.

  • Run the following command to install itgeographic_msgs
sudo apt-get install ros-indigo-geographic-msgs
Copy the code

2. Download and compile hector_quadrotor

  • 1 tohector_quadrotorConfigure the workspace
mkdir -p ~/hector_ws/src
cd ~/hector_ws/src
catkin_init_workspace
cd ..
catkin_make
echo "source ~/hector_ws/devel/setup.bash" >> ~/.bashrc
Copy the code
  • cloninghector_quadrotorTo the local

Download, download, download to local hector_quadrotor – indigo – devel | making, can’t, can’t, can’t git clone, because cloning is kinetic version by default. After downloading to a local directory, manually unzip the entire folder and place it in the ~/hector_ws/ SRC directory.

Then execute the following command.

cd ~/hector_ws/src
cd hector_quadrotor
wstool init src tutorials.rosinstall 
Copy the code

Hector_quadrotor/SRC /hector_ws/ SRC /hector_quadrotor/ SRC Then go to the directory and you may find that there is a Hector_quadrotor in this directory. Delete it. The purpose of running wstool init SRC tutorials. Rosinstall is to download the dependency package. I don’t know why there is a hector_quadrotor package in the dependency package which is the same as the previous directory. Otherwise a workspace with two packages of the same name will not compile properly. .

  • compilehector_quadrotor
cd ~/hector_ws
catkin_make
Copy the code

There are generally no bugs and will compile successfully.

Run a demo

  • rviz

  • gazebo