Skip to content

Waypoint Following

Inkyu edited this page Aug 20, 2017 · 3 revisions

In this flight, we will command the MAV to fly a smooth trajectory given a set of waypoints in SE3 space. It differs to the step response flight in that finer goal poses are transmitted to the MAV; implying that we can expect lower accuracy of tracking error between the reference and the state.

For this flight, please follow the procedures below.

  1. ssh to your on-board NUC computer and run the launch file:
$roslaunch dji_sdk Onboard_exp_with_zr300_rw_indoor_falcon2.launch
  1. Initialize MSF using rqt_copter.

Checkpoint: The world and state tfs from rviz should be aligned (x-axis pointing forward, y-axis pointing left). This could not be the case due to several reasons, such as inaccurate calibration. If only the yaw (heading) angle is offset, try to change it using the python script ~/indigo_catkin_ws/src/rovio/src/init_rovio_enu.py.

  1. Run the keyboard interface node on your ground station computer:

$ROS_NAMESPACE=yourMavName rosrun keyboard keyboard

  1. Add a "service caller" in rqt (plugin ➜ Services ➜ Service caller) and choose /yourMavName/visualize_path. Do not call the service yet.

(Note: To see the image above in higher resolution, right click and select 'View Image'.)

  1. Open rviz and add a visualization_msgs/MarkerArray topic with the name /yourMavName/waypoint_navigator_polynomial_markers. Please check that your set-up matches the screenshot below.

  2. Call yourMavName/visualize_path by choosing this service from the drop-down menu in Service Caller and clicking the Call button (top-right). You should be able to see the planned path in rviz.

  3. Turn on the motor in 'A' mode.

  4. Switch to 'F' mode.

  5. Activate the keyboard input window and type 'b'.

  6. Call /yourMavName/execute_path by choosing this service from the drop-down menu in Service Caller and clicking Call. The MAV should follow the planned path slowly as shown in the video below.

Demonstration video

  1. To land, call /yourMavName/land using the Service Caller.

Congratulations! You have just finished building your own visual-inertial odometry-aided MAV! ☺

Please keep in mind that the platform is dangerous and requires a certain level of safety regulation. Enjoy the flights and be safe!

⇒ Any problems? Have a look at our Troubleshooting page.

Clone this wiki locally