-
- 3.1. Autonomous mode: autonomously navigate to a target goal
- 3.2. Keyboard mode: control the quadrotor with keyboard and map with Octomap
- Xuhui Zhang (xuhui.zhang@tum.de)
Step 1. If not already done so, install ROS (Desktop-Full is recommended).
Step 2. Download the Unity executable files "ROS_with_SkyCamera.zip". >Link: https://syncandshare.lrz.de/getlink/fi4C8XwwgNP3gtPScV2b48pW/
Step 3. Install depth-image-proc.
sudo apt-get install ros-melodic-depth-image-proc # exchange melodic for your ros distro if necessary
Step 4. Install Octomap.
sudo apt-get install ros-melodic-octomap-ros # exchange melodic for your ros distro if necessary
sudo apt-get install ros-melodic-octomap-msgs
sudo apt-get install ros-melodic-octomap-server
sudo apt-get install ros-melodic-octomap-rviz-plugins
Step 5. Create a workspace and clone the repository, then build the workspace.
# cd ~/workspace_path
git clone git@github.com:XHZhang01/autonomous-navigation.git
catkin build
Step 6. Unzip the Unity executable files to /devel/lib/simulation
# cd ~/Unity_executable_files_path
unzip -d ~/workspace_path/devel/lib/simulation ROS_with_SkyCamera_executable.zip
Step 1. Open a terminal from your workspace, prepare to take off.
source devel/setup.bash
roslaunch simulation simulation.launch
Step 2. Open the second terminal, open state machine.
source devel/setup.bash
rosrun controller_pkg state_machine
Step 3. Open the third terminal, take off.
source devel/setup.bash
roslaunch simulation mission_starter.launch
Step 4. Open another terminal, send the goal.
source devel/setup.bash
rosrun navigation send_goal 100 0 0
Step 1. Open a terminal from your workspace.
source devel/setup.bash
roslaunch simulation simulation.launch use_octomap:=true
Step 2. Run keyboard control node.
source devel/setup.bash
rosrun teleop_twist_keyboard_cpp teleop_twist_keyboard # holonomic control
or
source devel/setup.bash
rosrun teleop teleop.py # smoother movement trajectory
Step 3. Use the keyboard to control the quadrotor to complete the mapping
Step 4. In rviz, enable OccupancyGrid or OccupancyMap to view the map in 3D or 2D. For better display, you can switch to Orbit view. Save the /projected_map by running
rosrun map_server map_saver map:=/projected_map -f PATH_TO_YOUR_FILE/mymap