-
-
Notifications
You must be signed in to change notification settings - Fork 17
Drone
Jason Liu edited this page Oct 31, 2022
·
2 revisions
-
Run the master install script by running:
python3 -c "$(wget https://raw.githubusercontent.com/umrover/mrover-ros/master/install.py -O-)" --install-drone
This will install ROS, create a Catkin workspace, and clone the necessary repositories. It also downloads the ground control software and everything you need to run the simulation. -
catkin build
-
source /opt/ros/noetic/setup.bash
(or .zsh) -
source ~/catkin_ws/devel/setup.bash
(or .zsh)
(It's recommended to put 3-4 in a function in your bash/zshrc):
src-ros() {
source /opt/ros/noetic/setup.zsh
source ~/catkin_ws/devel/setup.zsh
}
- Similar to 3-4, either run or put these lines in a function in your bash/zshrc:
setup-drone() {
cwd=$(pwd)
cd ~/catkin_ws/src/px4
DONT_RUN=1 make px4_sitl_default gazebo
source Tools/simulation/gazebo/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/simulation/gazebo/sitl_gazebo
cd $cwd
}
- Launch the ground control software by navigating to wherever you downloaded it to (in the install script) and run
./QGroundControl
- Launch the drone and simulation:
roslaunch mrover drone.launch
- Once the simulation starts up, ensure that typing "commander takeoff" and "commander land" make the drone takeoff and land, respectively, in the simulation.