Some precision about the way it was released
|8 years ago|
|LICENSES||8 years ago|
|cfg||8 years ago|
|launch||8 years ago|
|msg||9 years ago|
|src||8 years ago|
|.travis.yml||8 years ago|
|AUTHORS||8 years ago|
|CMakeLists.txt||8 years ago|
|COPYING||8 years ago|
|LISEZMOI.md||8 years ago|
|README.md||8 years ago|
|compte-rendu.pdf||9 years ago|
|package.xml||8 years ago|
Copyright © 2015 CentraleSupélec
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
La documentation originale est en français : LISEZMOI.md. La documentation ci-dessous n’est qu’une traduction.
The original manual is the french "LISEZMOI.md", you read below a translation of this file.
A video demonstration is available here. It has been achived with a student who didn't know how the project works.
This package was developped with the Indigo version of ROS.
#!sh sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list' wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add - sudo apt-get update sudo apt-get install ros-indigo-desktop-full ros-indigo-freenect-stack ros-indigo-ardrone-autonomy libncursesw5-dev
Catkin workspace creation
For instance :
#!sh source /opt/ros/indigo/setup.bash mkdir -p ~/hand_control_ws/src cd ~/hand_control_ws/src catkin_init_workspace
If necessary, rename the folder with the file named
hand_control, and move it in
~/hand_control_ws/src/ or in the subfolder
src of your catkin workspace.
You're now able to compile :
#!sh cd ~/hand_control_ws # or your catkin workspace catkin_make
Then you can run the following commands to be able to use the ROS commands. If necessary replace "hand_control_ws" by the name of your catkin workspace.
#!sh source /opt/ros/indigo/setup.bash source ~/hand_control_ws/devel/setup.bash echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc echo "source ~/hand_control_ws/devel/setup.bash" >> ~/.bashrc
Connection and setting up of the Kinect
- Connect the Kinect (under voltage) to the computer via USB ;
- Put the Kinect on the ground, pointed toward the roof ; be aware that your arm must be perpendicular to the Kinect in order to control the drone properly ;
- Launch the "launchfile" kinect_commander.launch :
roslaunch hand_control kinect_commander.launch;
- Check the drone parameters :
- launch rviz :
rosrun rqt_rviz rqt_rviz
- display the output of the filtering (topic :
/filter/output; frame :
/camera_depth_optical_frame) and locate the hand ;
- launch rqt_reconfigure :
rosrun rqt_reconfigure rqt_reconfigurein order to :
- change the filter parameters until you only see the points of the hand/glove/panel on rviz (see above).
- change the parameter
neutral_altof the node
commanderto the wanted height (in meters), correponding to the height of the hand for which the height of the drone will be stable.
- launch rviz :
Parameters of the filter
The parameters of the filter (that can be changed thanks to
dynamic_reconfigure and in particular
rqt_reconfigure) are :
z_max: in meters, maximal height of the hand. It must be lower than the height of the roof.
- for a glove or a colored panel (green, blue, etc.), we generaly have :
hue: for example 220 (sky blue) or 150 (green) or 0 (pink/red) ;
delta_hue: between 10 and 20 ;
sat/val_min: 0.0 ;
sat/val_max: 1.0 ;
- for a black glove :
hue: 0 ;
delta_hue: 180 ;
sat_min: 0.0 ;
sat_max: 1.0 ;
val_min: 0.0 ;
val_max: 0.3 (at your convenience);
rqt_reconfigure, but with the
estimator node :
reverse: swap x and y, the axes of the Kinect (default : false, ie. unchecked)
reverse_angle: change the angle choosen for the compute of the angle of the hand (default : false, ie. unchecked)
Connection to the drone and steering
- Connect the computer to the wifi network of the drone ;
- Launch the "launchfile" ardrone.launch :
roslaunch hand_control ardrone.launch;
- Taking off :
rostopic pub /ardrone/takeoff std_msgs/Empty;
- or launch the node keyboard_cmd :
rosrun hand_control keyboard_cmdand use t on the keyboard.
- Landing :
rostopic pub /ardrone/land std_msgs/Empty;
- or, launch the node keyboard_cmd, and use b on the keyboard.
- Emergency stop :
rostopic pub /ardrone/reset std_msgs/Empty;
- or, launch the node keyboard_cmd, and use g on the keyboard.
- Forward/backward & side translations : hand tilt ;
- Rotate (around the vertical axis z) : angle of the hand with the the axis parallel to the ground and perpendicular to the kinect ;
- go up/go down : hand height.
Options and parameters of the command
To edit the options of the command, change (if not already)
rosrun rqt_reconfigure rqt_reconfigure :
max_curvature: not used for the moment ;
x/y/z/theta_minimal_deviation: thresholds required above which the movement of the hand is not taken into account. If all are 0.0, the drone responds linearly.
- x, y : between 0. and 1. (corresponding to the x and y of the normal to the plane);
- z : in meters ;
- theta : in degrees.
neutral_alt: height of the hand for the immobility of the height of the drone ;
min_points_number: minimal number of points (for the point cloud used for the regression) necessary in order to send a command to the drone ;
angle/x/y/z_vel: proportionality coefficients to apply to the inputs in order to establish the command sent to the drone. Increase it will increase the speed of the drone ;
up_fact: proportionality coefficients to apply to the command that increases the height of the drone, compared to the equivalent command to reduce it (in order to correct the effect of gravity).
It allows you to publish commands on the topic
cmd_vel and so to steer the drone. It is scheduled for azerty keyboards. To launch it, run :
#!sh rosrun hand_control keyboard_cmd
To increase/decrease the speed (there is an explication on the controlpanel) : a,z,e,r and w,x,c,v
The informations of the drone are updated when a key is pressed.
To quit : CTRL+C and press "Enter" to return to the console.
Problems - Possible improvements
If commands are published on
cmd_vel(from the Kinect for instance) after the launch of
ardrone.launchand before the takeoff, then, after the takeoff, the drone seems to obey to commands published before the takeoff.
As written above, the display of navigation data on
keyboard_cmdis only updated when a key is pressed, and can therefore stay fixed when the keyboard commander is not used.
The takeoff/landing is not controllable with the hand. The keyboard must be used (
rostopic pub) instead. We can correct this by creating two new thresholds, minimal and maximal, for the hand height : a very low hand would make the drone land and a very high hand would make the drone take off.