Difference between revisions of "MarioCL-Drone01"

From robotica.unileon.es
Jump to: navigation, search
(Página nueva: '''Controlling the ar-drone using the Wii-mote''' *Install http://www.ros.org ROS *Launching ROS: :~$ roscore *Loading drone driver: :~$ rosrun ardrone_driver ar...)
 
m
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''Controlling the ar-drone using the Wii-mote'''
+
=Overview=
  
*Install [[http://www.ros.org ROS]]
+
The current work with AR.Drone from Parrot consists on evaluating different ways to interface a PC with AR.Drone.
  
*Launching ROS:
+
=Interfacing with AR.Drone=
 +
 
 +
==Controlling the AR.Drone using the Wii-mote on ROS==
 +
 
 +
'''Requirements'''
 +
*Install [[http://www.ros.org/wiki/ROS/Installation ROS]]
 +
 
 +
*Download the ''Mobile Robotics Lab at SIUE'' repository [[http://github.com/siue-cs/siue-ros-pkg siue-ros-pkg]]. This repository contains two packages ardrone_driver and ardrone_teleop which must to be installed in the stacks directory.
 +
 
 +
 
 +
'''Procedure'''
 +
*Verify AR.Drone boot sequence is completed and we can observe green leds on the bottom.
 +
 
 +
*Enable the WIFI connection with the AR.Drone.
 +
 
 +
*Launching ROS kernel:
  
 
       :~$ roscore
 
       :~$ roscore
  
 
*Loading drone driver:
 
*Loading drone driver:
 +
 
       :~$ rosrun ardrone_driver ardrone_driver
 
       :~$ rosrun ardrone_driver ardrone_driver
  
*Esto conecta el drone a la dirección del PC y en un puerto especifico y esta lista para leer datos .... (esta capacidad no esta totalmente desarrollada todavía). Para poder operar el drone se lanza el paquete ardrone_teleop
+
This command connects drone at localhost address.
         :~$ rosrun ardrone_teleop ardrone_teleop
+
 
 +
*Running the node to operate the drone
 +
 
 +
         :~$ rosrun ardrone_teleop ardrone_teleop.
 +
 
 +
In ardrone_driver directory we can find a script to launch both nodes, the driver and remote operating. To launch this script use:
 +
 
 +
        :~$ roslaunch <$ROS_ARDRONE_DRIVER_PATH>/ardrone_wiimote_teleop.launch
 +
 
 +
*To use the wiimote, run the python script into the wiimote packages
  
*ahora va a esperar la conexion con el mando de la wii. Esto se realiza simplemente con el paquete wiimote  mediante el comando
 
 
         :~$ rosrun wiimote wiimote_node.py
 
         :~$ rosrun wiimote wiimote_node.py
  
*En ese momento te pide que pulses los botones 1 y 2 del mando ...... y la conexión esta hecha.
+
*Wiimote application is waiting to press buttons 1 and 2 during at least 6 seconds. Next image describes the control layout
 +
 
 +
[[Image:Control_layout.jpeg|center|300px]]
 +
 
 +
'''ARDRone Driver Properties'''
 +
 
 +
''TOPICS''
 +
 
 +
To obtain the topic list for node use the followed command:
 +
        :~$ rostopic list -v
 +
 
 +
The list of topic for ARDrone driver is:
 +
 
 +
Published topics:
 +
 
 +
        /ardrone/imu/data [sensor_msgs/Imu] 1 publisher
 +
        /ardrone/state [ardrone_driver/ARDroneState] 1 publisher
 +
        /cmd_vel [geometry_msgs/Twist] 1 publisher
 +
 
 +
Subscribed topics:
 +
 
 +
        /cmd_vel [geometry_msgs/Twist] 1 subscriber
 +
 
 +
''MESSAGE''
 +
 
 +
To obtain the message list for a topic (ex /cmd_vel) use the followed command:
 +
 
 +
        :~$ rostopic type /cmd_vel
 +
 
 +
The message list for topic is
 +
 
 +
        /ardrone/imu/data
 +
                sensor_msgs/Imu
 +
        /ardrone/state
 +
                ardrone_driver/ARDroneState
 +
        /cmd_vel
 +
                geometry_msgs/Twist
  
 +
''SERVICE''
  
 +
To obtain the service list use the followed command:
  
[[Image:Control_layout.jpeg|center|300px]]
+
        :~$ rosservice list
 +
 
 +
The service list for topic is
 +
 
 +
        /ardrone/imu/calibrate
 +
        /ardrone/land
 +
        /ardrone/reset
 +
        /ardrone/takeoff
 +
        /ardrone_teleop/get_loggers
 +
        /ardrone_teleop/set_logger_level
 +
        /driver_drone/get_loggers
 +
        /driver_drone/set_logger_level
  
 
* Finally the drone flying:
 
* Finally the drone flying:
  
<wikiflv width="300" height="250" logo="true">/videos/videoSumo20100312.flv</wikiflv>
+
<wikiflv width="300" height="250" logo="true">/videos/Ar.drone.ros.flv</wikiflv>
 +
 
 +
 
 +
==Using URBI to monitor and control AR.Drone==
 +
 
 +
[[Image:URBI_balltracking.png|center|500px]]
 +
 
 +
* Video trial:
 +
 
 +
<wikiflv width="300" height="250" logo="true">/videos/Ar.drone.urbi.flv</wikiflv>
 +
 
 +
==Controlling drone with joystick or joypad using SDK Application==
 +
 
 +
'''Requirements'''
 +
*There are some packages required to compile the SDK code.
 +
 
 +
        :~$ sudo apt-get install libgtk2.0-dev
 +
        :~$ sudo apt-get install libsdl1.2-dev
 +
        :~$ sudo apt-get install libiw-dev
 +
 
 +
'''Procedure'''
 +
 
 +
*Download the SDK from the ARDrone development Wiki
 +
 
 +
*Unpack to a folder of your choice
 +
 
 +
*First we need to compile the base SDK.
 +
 
 +
        :~$ cd ARDroneAPI/ARDroneLib/Soft/Build
 +
        :~$ make
 +
 
 +
and let it build. Within ARDroneLib there will now be a targets_versions folder with the compiled code.
 +
 
 +
*Now we will compile the navigation example as it is the most verbose and has support for a PS3 controller o joystick
 +
 
 +
        :~$ cd ARDroneAPI/Examples/Linux/Navigation/Build
 +
        :~$ make
 +
        :~$ cd ARDroneAPI/ARDroneLib/Version/Release
 +
 
 +
*Run the example
 +
 
 +
        :~$ ./ardrone_navigation
 +
 
 +
[[Image:SDK_application.png|center|500px]]

Latest revision as of 09:35, 25 June 2014

Overview

The current work with AR.Drone from Parrot consists on evaluating different ways to interface a PC with AR.Drone.

Interfacing with AR.Drone

Controlling the AR.Drone using the Wii-mote on ROS

Requirements

  • Download the Mobile Robotics Lab at SIUE repository [siue-ros-pkg]. This repository contains two packages ardrone_driver and ardrone_teleop which must to be installed in the stacks directory.


Procedure

  • Verify AR.Drone boot sequence is completed and we can observe green leds on the bottom.
  • Enable the WIFI connection with the AR.Drone.
  • Launching ROS kernel:
      :~$ roscore
  • Loading drone driver:
      :~$ rosrun ardrone_driver ardrone_driver

This command connects drone at localhost address.

  • Running the node to operate the drone
       :~$ rosrun ardrone_teleop ardrone_teleop.

In ardrone_driver directory we can find a script to launch both nodes, the driver and remote operating. To launch this script use:

       :~$ roslaunch <$ROS_ARDRONE_DRIVER_PATH>/ardrone_wiimote_teleop.launch
  • To use the wiimote, run the python script into the wiimote packages
       :~$ rosrun wiimote wiimote_node.py
  • Wiimote application is waiting to press buttons 1 and 2 during at least 6 seconds. Next image describes the control layout
Control layout.jpeg

ARDRone Driver Properties

TOPICS

To obtain the topic list for node use the followed command:

       :~$ rostopic list -v

The list of topic for ARDrone driver is:

Published topics:

       /ardrone/imu/data [sensor_msgs/Imu] 1 publisher
       /ardrone/state [ardrone_driver/ARDroneState] 1 publisher
       /cmd_vel [geometry_msgs/Twist] 1 publisher

Subscribed topics:

       /cmd_vel [geometry_msgs/Twist] 1 subscriber

MESSAGE

To obtain the message list for a topic (ex /cmd_vel) use the followed command:

       :~$ rostopic type /cmd_vel

The message list for topic is

       /ardrone/imu/data
               sensor_msgs/Imu
       /ardrone/state
               ardrone_driver/ARDroneState
       /cmd_vel
               geometry_msgs/Twist

SERVICE

To obtain the service list use the followed command:

       :~$ rosservice list

The service list for topic is

       /ardrone/imu/calibrate
       /ardrone/land
       /ardrone/reset
       /ardrone/takeoff
       /ardrone_teleop/get_loggers
       /ardrone_teleop/set_logger_level
       /driver_drone/get_loggers
       /driver_drone/set_logger_level
  • Finally the drone flying:

<wikiflv width="300" height="250" logo="true">/videos/Ar.drone.ros.flv</wikiflv>


Using URBI to monitor and control AR.Drone

URBI balltracking.png
  • Video trial:

<wikiflv width="300" height="250" logo="true">/videos/Ar.drone.urbi.flv</wikiflv>

Controlling drone with joystick or joypad using SDK Application

Requirements

  • There are some packages required to compile the SDK code.
       :~$ sudo apt-get install libgtk2.0-dev
       :~$ sudo apt-get install libsdl1.2-dev
       :~$ sudo apt-get install libiw-dev

Procedure

  • Download the SDK from the ARDrone development Wiki
  • Unpack to a folder of your choice
  • First we need to compile the base SDK.
       :~$ cd ARDroneAPI/ARDroneLib/Soft/Build
       :~$ make

and let it build. Within ARDroneLib there will now be a targets_versions folder with the compiled code.

  • Now we will compile the navigation example as it is the most verbose and has support for a PS3 controller o joystick
       :~$ cd ARDroneAPI/Examples/Linux/Navigation/Build
       :~$ make
       :~$ cd ARDroneAPI/ARDroneLib/Version/Release
  • Run the example
       :~$ ./ardrone_navigation
SDK application.png