[ROS Projects] – Performing LSD-SLAM with a ROS based Parrot AR. Drone

Written by Alberto Ezquerro

31/01/2018

 

 

Drones market is growing more and more each year, and so does the need of improving the way we control them. One of the most important topics here is, of course, how to navigate drones. In this series of videos we are going to have a look at how to implement in ROS one of the approaches that can allow us to perform Localization and Mapping in drones in a quite easy way: LSD-SLAM. LSD-SLAM is a direct monocular SLAM technique, developed by TUM, which allows to localize and create maps with drones with just a 3D camera. Hope you enjoy it!

You will learn step by step through 4 video tutorials:

[irp posts=”6638″ name=”ROS Q&A | How to Start Programming Drones using ROS”]

Part 1 – Setup the whole environment

How to perform LSD-SLAM with a ROS based Parrot AR.Drone with a Gazebo simulation. In this 1st video, you’re going to

  • Learn the definition of LSD SLAM (Large-Scale Direct Monocular SLAM)
  • Install LSD-SLAM packages and compile them
  • Setup the whole environment in order to have all the packages we need for performing LSD-SLAM with a Parrot AR.Drone.

 

Step 1. Create the project in ROS Development Studio(RDS)

You can simply build the project in RDS without any configuration in the local machine. If you haven’t had an account yet, please register here.

Step 2. Download  and compile the simulation environment

Let’s clone the drone simulation under the simulation_ws, you can find shell from Tools->shell

$ cd ~/simulation_ws/src
$ git clone https://bitbucket.org/theconstructcore/tum_ardrone_sim

Now we have to compile the package before using it.

Since the package is for ROS-indigo, we have to configure something first. Please replace the following part in the file ~/simulation_ws/src/tum_ardrone_sim/tum_ardrone/src/UINode/RosThread.h

...
#define __ROSTHREAD_H
 
#ifndef Q_MOC_RUN

#include "cvd/thread.h"
#include "tum_ardrone/filter_state.h"
#include "std_msgs/String.h"
#include "geometry_msgs/Twist.h"
#include "ardrone_autonomy/Navdata.h"
#include "ros/ros.h"
#include "sensor_msgs/Joy.h"
#include "std_srvs/Empty.h"
#include "std_msgs/Empty.h"

#endif

class tum_ardrone_gui;
...

Then compile it! (Notice: it may take a while, go get a coffee)

$ cd ~/simulation_ws
$ rosdep install tum_ardrone
$ catkine_make
$ source devel/setup.bash

 

 

 

 

 

Contents and links mentioned in the video:

Definition of LSD-SLAM (Large-Scale Direct Monocular SLAM): https://vision.in.tum.de/research/vslam/lsdslam

TUM ARDrone simulation: https://bitbucket.org/theconstructcore/tum_ardrone_sim

LSD-SLAM repository: https://github.com/tum-vision/lsd_slam

RDS – ROS Development Studio: https://www.theconstruct.ai/rds-ros-development-studio/

Course mentioned in the video: Programming Drones with ROS https://wp.me/P9Rthq-20N


Part 2 – Solve compilation errors & Launch the nodes for performing LSD SLAM

In this 2nd video of the series, we are going to solve some compilation errors we got in the previous video, and we are trying to launch the nodes for performing LSD SLAM.

[irp posts=”8584″ name=”How to launch two drones on a Single Gazebo Simulation”]


Part 3 – Launch the LSD-SLAM ROS node in an Hector Quadrotor simulation

In this 3rd video of the series, we are successfully achieve to launch the LSD-SLAM ROS node in an Hector Quadrotor simulation.


Part 4 – Perform LSD-SLAM in an small village environment

In this 4th video of the series, we have successfully achieved to launch the LSD-SLAM ROS nodes in an Hector Quadrotor simulation, and we perform some LSD-SLAM in an small village environment.

 

***


programming-drone-with-ros-course-banner

Masterclass 2023 batch2 blog banner

Check Out These Related Posts

129. ros2ai

129. ros2ai

I would like to dedicate this episode to all the ROS Developers who believe that ChatGPT or...

read more

11 Comments

  1. Anand

    I’m getting the following error while executing catkin_make:

    [ 90%] No install step for ‘thirdparty’
    [ 91%] Completed ‘thirdparty’
    [ 91%] Built target thirdparty
    Makefile:138: recipe for target ‘all’ failed
    make: *** [all] Error 2
    Invoking “make -j12 -l12” failed

    I’m new to ROS. Pls help

    Reply
    • Anonymous

      usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at “BOOST_JOIN”
      tum_ardrone_sim/tum_ardrone/CMakeFiles/drone_gui.dir/build.make:71: recipe for target ‘tum_ardrone_sim/tum_ardrone/src/UINode/moc_RosThread.cxx’ failed
      make[2]: *** [tum_ardrone_sim/tum_ardrone/src/UINode/moc_RosThread.cxx] Error 1
      CMakeFiles/Makefile2:8942: recipe for target ‘tum_ardrone_sim/tum_ardrone/CMakeFiles/drone_gui.dir/all’ failed
      make[1]: *** [tum_ardrone_sim/tum_ardrone/CMakeFiles/drone_gui.dir/all] Error 2
      make[1]: *** Waiting for unfinished jobs….
      [ 97%] Performing install step for ‘ardronelib’
      make[3]: warning: jobserver unavailable: using -j1. Add ‘+’ to parent make rule.
      [ 97%] Completed ‘ardronelib’
      [ 97%] Built target ardronelib
      Makefile:138: recipe for target ‘all’ failed
      make: *** [all] Error 2
      Invoking “make -j12 -l12” failed

      Included more info for reference

      Reply
      • Alberto Ezquerro Baraibar

        Hello Anand! Can you please provide some more data about your error? In which step are you having it? Or even better, can you share with us a ROSject with your project so far, so that we can directly check it?

        Reply
  2. Archit

    Hi, can you please give more details. Is there any drone which has SLAM deployed.

    Reply
    • Alberto Ezquerro Baraibar

      Hello Archit! As far as I know, there isn’t any drone which has LSD-SLAM already deployed.

      Reply
  3. Invest $ 4153 and get $ 25455 every month: https://bogazicitente.com/earnonebtc603191?a=8491

    Exactly how to Make $7964 FAST, Rapid Money, The Busy Budgeter: http://xsle.net/earnonebtc878942?w=5480

    Reply
  4. Exactly how would you use $56227 to make more loan: https://v.ht/4kkFo?&gkggg=nel6KwPvS1KyMS

    How to invest in Cryptocurrency and receive from $ 2963 per day: https://cutt.us/K12D3gTR3?hQ6ZMQaRMR

    Reply
  5. Binary options + Bitcoin = $ 2639 per week: https://cutt.us/QjC7xCyNk?&foumw=Tl0ppA

    How to invest in Bitcoin and receive from $ 9436 per day: https://v.ht/N3uvzI?&ydscj=oCbRW

    Reply
  6. Urgently withdraw your 111 Bitcoins: https://v.ht/sGscZ9

    Get yours $914326,98: https://v.ht/BrSlp

    Reply

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest

Share This