- 安装完ros kinetic版本后安装hector_quadrotor依赖:
sudo apt install -y ros-kinetic-gazebo-ros-control ros-kinetic-controller-interface ros-kinetic-hardware-interface ros-kinetic-hector-gazebo-plugins ros-kinetic-hector-pose-estimation ros-kinetic-hector-sensors-description ros-kinetic-message-to-tf
- home目录下建立工作空间:mkdir -p catkin_ws/src
- 在src空间下
git clone https://github.com/tu-darmstadt-ros-pkg/hector_quadrotor.git
- 回到catkin_ws工作空间,catkin_make编译
- 出现配件少的时候去百度搜索,如ros_control,在ros百科界面的source: git网址进去拷贝clone or dowload地址去src路径下继续catkin_make
- 完成后执行
roslaunch hector_quadrotor_demo indoor_slam_gazebo.launch
可以看到无人机出现: rosservice call /enable_motors "enable: true"
打开无人机电机
rostopic pub /cmd_vel geometry_msgs/Twist "linear:
x: 0.0
y: 0.0
z: 2.0
angular:
x: 0.0
y: 0.0
z: 0.0"
发布命令,无人机起飞。