Executing the trajectory with the real MAV/drone

MoveIt! does not currently come with the ability to execute the multi-DOF trajectories required to take full advantage of the quadcopter's dynamics. Instead, we will have to add some custom code in order to handle the trajectories generated by the MultiDofFollowJointTrajectoryAction action server.

For that, we will use a couple of Python scripts that have already been developed by the eYSIP. We can find their repository at https://github.com/eYSIP-2017.

First of all, we will download the tum_ardrone package, using the following command in the /src folder of our workspace:

$ git clone https://github.com/tum-vision/tum_ardrone.git  

Next, let's compile the package:

ROS packages for Ardrone and Debop are available for ROS Indigo, it requires effort to make it work on kinetic and later distributions of ROS.

The first step will be to publish the OctoMap, as we learned in the previous section:

$ roslaunch load_octomap load_octomap.launch  

Next, let's start the RViz environment by executing the launch file we created in the previous section:

$ roslaunch ardrone_moveit_config ardrone_navigation.launch  

Let's start the waypoint action server by issuing the following command:

$ rosrun drone_application move_to_waypoint.py _real_drone:=false _aruco_mapping:=false

And now, let's have the drone take off:

$ rostopic pub /ardrone/takeoff std_msgs/Empty [TAB][TAB]  

We will see how the drone takes off in MoveIt!

Next, let's go to the MoveIt! window, select a goal position for the drone, using the interactive arrows, and plan a trajectory to get there.

Finally, execute the follow trajectory node in order to execute the planned trajectory:

$ rosrun drone_application follow_trajectory.py _real_drone:=false _aruco_coords:=false _visualise_trajectory:=false  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.244.201