旋翼飞行器 ROS - Gazebo 仿真环境搭建

UAV

系统环境

系统 版本
Ubuntu 18.04.1
ROS Melodic Morenia
GitHub https://github.com/ethz-asl/rotors_simulator

配置工作空间

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src             
$ git clone https://github.com/ethz-asl/rotors_simulator.git  
$ git clone https://github.com/ethz-asl/mav_comm.git 
$ sudo apt install ros-melodic-octomap-msgs ros-melodic-octomap-ros libgoogle-glog-dev ros-melodic-joy python-catkin-tools python-pygame

编译

$ cd ~/catkin_ws/
$ catkin init  # If you haven't done this before.
$ catkin build
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

运行

$ roslaunch rotors_gazebo mav_hovering_example.launch mav_name:=firefly world_name:=basic
$ roslaunch rotors_gazebo mav_with_keyboard.launch mav_name:=firefly world_name:=basic

发送命令

 $ rostopic pub /firefly/command/motor_speed mav_msgs/Actuators '{angular_velocities: [100, 100, 100, 100, 100, 100]}'

猜你喜欢

转载自blog.csdn.net/otter1010/article/details/90694312