Coder Social home page Coder Social logo

drones's Introduction

JdeRobot

Current Release Version

THIS REPOSITORY HAS BEEN ARCHIVED AND IS DEPRECATED. Since 2020 we have adopted ROS as our main framework for developing Robotics, AI and ComputerVision applications and tools.

Introduction

JdeRobot is a software development suite for robotics, home-automation and computer vision applications. These domains include sensors for instance, cameras, actuators, and intelligent software in between. It has been designed to help in programming with such intelligent softwares. It is mainly written in C++ language and provides a distributed component-based programming environment where the application program is made up of a collection of several concurrent asynchronous components. Each component may run in different computers and they are connected using Ice communication middleware. Components may be written in C++, python, Java... and all of them interoperate through explicit Ice interfaces.

JdeRobot simplifies the access to hardware devices from the control program. Getting sensor measurements is as simple as calling a local function, and ordering motor commands as easy as calling another local function. The platform attaches those calls to the remote invocation on the components connected to the sensor or the actuator devices. They can be connected to real sensors and actuators or simulated ones, both locally or remotely using the network. Those functions build the API for the Hardware Abstraction Layer. The robotic application get the sensor readings and order the actuator commands using it to unfold its behavior. Several driver components have been developed to support different physical sensors, actuators and simulators. The drivers are used as components installed at will depending on your configuration. They are included in the official release. Currently supported robots and devices:

  • RGBD sensors: Kinect from Microsoft, Asus Xtion
  • Pioneer robot from MobileRobotics Inc.
  • Kobuki robot (TurtleBot) from Yujin Robot
  • Nao humanoid from Aldebaran
  • ArDrone quadrotor from Parrot
  • Firewire cameras, USB cameras, video files (mpeg, avi...), IP cameras (like Axis)
  • Pantilt unit PTU-D46 from Directed Perception Inc.
  • Laser Scanners: LMS from SICK and URG from Hokuyo
  • EVI PTZ camera from Sony
  • Gazebo and Stage simulators
  • Wiimote
  • X10 home automation devices

JdeRobot includes several robot programming tools and libraries. First, viewers and teleoperators for several robots, its sensors and motors. Second, a camera calibration component and a tuning tool for color filters. Third, VisualStates tool for programming robot behavior using hierarchical finite state machines. It includes many sample components using OpenCV, PCL, OpenGL, etc.. In addition, it also provides a library to develop fuzzy controllers, a library for projective geometry and some computer vision processing.

Each component may have its own independent Graphical User Interface or none at all. Currently, GTK and Qt libraries are supported, and several examples of OpenGL for 3D graphics with both libraries are included.

JdeRobot is open-source software, licensed as GPL and LGPL. It also uses third-party softwares like Gazebo simulator, OpenGL, GTK, Qt, Player, Stage, Gazebo, GSL, OpenCV, PCL, Eigen, Ogre.

JdeRobot is a project developed by Robotics Group of Universidad Rey Juan Carlos (Madrid, Spain).

Installation

Table of Contents

  • Add the latest ROS sources:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
  • Add the latest Gazebo sources:
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 67170598AF249743
  • Add the latest zeroc-ice sources:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv B6391CB2CFBA643D
sudo apt-add-repository "deb http://zeroc.com/download/Ice/3.7/ubuntu18.04 stable main"
  • Add JdeRobot repository (using dedicated file /etc/apt/sources.list.d/jderobot.list):
sudo sh -c 'echo "deb [arch=amd64] http://wiki.jderobot.org/apt `lsb_release -cs` main" > /etc/apt/sources.list.d/jderobot.list''
  • Get and add the public key from the JdeRobot repository
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 24E521A4
  • Update the repositories
sudo apt update
  • Install JdeRobot:
sudo apt install jderobot
sudo apt install jderobot-assets
  • After installing the package, you can close the terminal and reopen it to source the environment variables, OR just type:
source ~/.bashrc
  • If you already have a previous version of the packages installed, you only have to do:
sudo apt update && sudo apt upgrade

If you want to run JdeRobot in MS-Windows, MacOS or other Linux distributions you can use Docker containers. We have created a Docker image with current JdeRobot Release and all the necessary components to be used with JdeRobot-Academy. To download it, use:

docker pull jderobot/jderobot

For more information follow this link

Downloading the source code from the GitHub is strongly NOT RECOMMENDED for new users unless you know what you are doing.

You have two options here:

  1. Install all the dependencies from a binary package
  2. Install all the dependencies manually (NOT RECOMMENDED)

For the first one, you only have to type the following:

sudo apt install jderobot-deps-dev

and skip to the next section of this README.

For the second one... keep reading

JdeRobot has different external dependencies to build its structure. There are two types of dependencies: necessary dependencies and other dependencies. The firsts are needed to compile and install the basics of JdeRobot, that is, all its libraries and interfaces that are needed for the components or to develop components that use JdeRobot. The seconds are needed just for some components, but are not really necessary unless you want to use that components. For instance, the component gazeboserver uses Gazebo, a 3D robot simulator, so to use this component you may install Gazebo first.

First of all repeat the step Getting environment ready

Some libraries are required to compile, link or run JdeRobot. Just type the following commands:

  • Basic libraries:

sudo apt install build-essential libtool cmake g++ gcc git make

  • OpenGL libraries:

sudo apt install freeglut3 freeglut3-dev libgl1-mesa-dev libglu1-mesa

  • GTK2 libraries:
sudo apt install libgtk2.0-0 libgtk2.0-bin libgtk2.0-cil libgtk2.0-common libgtk2.0-dev libgtkgl2.0-1
sudo apt install libgtkgl2.0-dev libgtkglext1 libgtkglext1-dev libglademm-2.4-dev libgtkmm-2.4-dev 
sudo apt install libgnomecanvas2-0 libgnomecanvas2-dev  libgtkglext1-doc libgnomecanvasmm-2.6-dev
sudo apt install libgnomecanvasmm-2.6-1v5 libgtkglextmm-x11-1.2-0v5 libgtkglextmm-x11-1.2-dev
  • Gtk3 libraries:

sudo apt install libgoocanvasmm-2.0-6 libgoocanvasmm-2.0-dev

  • GSL libraries:

sudo apt install libgsl23 gsl-bin libgsl-dev

  • LibXML:

sudo apt install libxml++2.6-2v5 libxml++2.6-dev libtinyxml-dev

  • Eigen:

sudo apt install libeigen3-dev

  • Fireware:

sudo apt install libdc1394-22 libdc1394-22-dev

  • USB:

sudo apt install libusb-1.0-0 libusb-1.0-0-dev

  • CWIID:

sudo apt install libcwiid-dev

  • Python components:

sudo apt install python-matplotlib python-pyqt5 python-pip python-numpy python-pyqt5.qtsvg

  • Qfi

It can be compiled and installed from source: https://github.com/JdeRobot/ThirdParty/tree/master/qflightinstruments

  • Qt 5

sudo apt install qtbase5-dev libqt5script5 libqt5svg5-dev

  • Boost

sudo apt install libboost-system-dev libboost-filesystem-dev

  • ROS
sudo apt install ros-melodic-roscpp ros-melodic-std-msgs ros-melodic-cv-bridge ros-melodic-image-transport ros-melodic-roscpp-core ros-melodic-rospy ros-melodic-nav-msgs ros-melodic-geometry-msgs ros-melodic-mavros ros-melodic-gazebo-plugins ros-melodic-kobuki-msgs

Once all ros packages are installed, install the script that tunes the environment variables ROS in your .bashrc configuration file, and run it for the current shell:

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc 
source ~/.bashrc 
  • Google glog (logging)

sudo apt install libgoogle-glog-dev

  • GStreamer

sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

  • ICE
sudo apt install libdb5.3-dev libdb5.3++-dev libssl-dev libbz2-dev libmcpp-dev \
            libzeroc-ice3.7 libzeroc-icestorm3.7 zeroc-ice-slice libzeroc-ice-dev

compile ice:

git clone -b 3.7 https://github.com/zeroc-ice/ice.git 
cd ice/cpp
make CPP11=yes OPTIMIZE=yes
make install

Configure ICE for Python with pip

sudo pip2 install --upgrade pip
sudo pip2 install zeroc-ice==3.7.2
  • OpenNI 2

sudo apt-get install libopenni2-dev libopenni-dev

  • Point Cloud Library

sudo apt-get install libpcl-dev

  • OpenCV

sudo apt-get install libopencv-dev

  • NodeJS

sudo apt-get install nodejs

  • Kobuki robot libraries

You can find the source code in our git repository (http://github.com/jderobot/thirdparty.git)

  • SDK Parrot for ArDrone

If you want to install it manually from our third party repository, you only have to:

  1. Create a folder to compile the code mkdir ardronelib-build && cd ardronelib-build

  2. Download the installer, a CMakeLists.txt file

wget https://raw.githubusercontent.com/RoboticsURJC/JdeRobot-ThirdParty/master/ardronelib/CMakeLists.txt
wget https://raw.githubusercontent.com/RoboticsURJC/JdeRobot-ThirdParty/master/ardronelib/ffmpeg-0.8.pc.in
wget https://raw.githubusercontent.com/RoboticsURJC/JdeRobot-ThirdParty/master/ardronelib/ardronelib.pc.in
  1. Compile and install as usual:
cmake .
make
sudo make install

After installing all the dependencies you can compile the project, you can clone this repo and build it doing the following:

  • Download the source code from git:
git clone http://github.com/RoboticsURJC/JdeRobot.git
cd JdeRobot/
  • Check system and dependencies
mkdir build && cd build
cmake ..
  • Compile
make
  • Install
sudo make install

How To Contribute

To see the collaborate workflow and coding style of JdeRobot community, please refer to the wiki page.

Copyright and license

Copyright 2015 - JdeRobot Developers

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

=======

drones's People

Contributors

diegomrt avatar jmplaza avatar nkhedekar avatar pariaspe avatar ruffy-369 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

drones's Issues

"Setting up pepperflashplugin-nonfree (1.8.3+nmu1ubuntu1) ..." doesn't stop

Hello, I am using Ubuntu 18.04, after writing
$ sudo apt-get install ros-melodic-jderobot-drones
like in the readme file, the installation starts but never ends. The
Setting up pepperflashplugin-nonfree (1.8.3+nmu1ubuntu1) ...
line doesn't go away. I stopped the process and I can't remove it now.

[drone_teleop] Cameras and pos/vel freeze in new GUI

Each 20/30 sec both the cameras and the position/velocities freeze in the new drone_teleop GUI, as it's seen in the screenshot below. Tested using the new drone_teleop_all.perspective.

Clicking in some precise points/controls of the GUI unfreeze the perspective temporarily.

Captura de pantalla de 2020-05-29 18-37-03

[drone_wrapper] Make wrapper multi-instanciable

Namespace of drone_wrapper topics must be selected from python instantiation of the class, allowing using several robots of the same type in the same exercise. This is needed for the new web-templates (JdeRobot/RoboticsAcademy#671).
Current templates choose the namespace through the launch file (<group ns="cat">), which allows to use several robots at the same exercise.

Issue with installation on Noetic.

I'm trying to get the follow_road exercise working on ROS Noetic on Ubuntu 20.04 but I am getting this error:

taha@taha-PC:~/Academy/exercises/static/exercises/follow_road$ roslaunch follow_road.launch
... logging to /home/taha/.ros/log/257ff334-ad9d-11eb-ad94-251a44ff69c3/roslaunch-taha-PC-65169.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Resource not found: The following package was not found in : rqt_drone_teleop
ROS path [0]=/opt/ros/noetic/share/ros
ROS path [1]=/opt/ros/noetic/share
The traceback for the exception was written to the log file

This file "rqt_drone_teleop)/perspectives/drone_teleop_vel_cam.perspective" file is present and it seems to be a problem with environment variables. However I have double checked them and can't figure out what's wrong.
I have also attached a file that contains all of the output generated by the terminal during installation.
installation.txt

[drone_teleop] ROS-based solution for rqt-gui freezing

In any case, ROS-based solutions could rely on suscribing the GUI to new throttled pose and vel topics, that can be published at least in two different ways:

  • Launching a ROS throttling node directly from the exercise .launch (easiest way, a line of code)
  • Building our own "republish 1, discard the next 14 messages" solution within the drone_wrapper, which is capable of handling easily the actual 30 Hz callbacks

Originally posted by @diegomrt in #38 (comment)

[drone_wrapper] Add method to get landed state

Add a new method to the drone_wrapper to get the landed state of the aircraft. It is published in the /mavros/extended_state topic. Knowing if the aircraft is flying or on ground will be useful to program more robust solutions to some exercises.

This is how landed state is codified:

191e3908-3bcc-11e7-9f2b-bd07490f9d4e

[drone_teleop] Position in GUI partly synced with mavros topic

Some components of the Position information box of the new GUI freeze and never recover back. Interestingly, some others keep synced with /mavros/local_position/pose topic

The screenshot below was taken when x,y were frozen but z was still syncinc properly:

Captura de pantalla de 2020-05-29 18-44-51

RoboticsAcademy drone exercises in ROS1-Noetic and Gazebo-11

Tested and ran all drone exercises in ROS1-Noetic & Gazebo-11.

visual_lander-ros1-noetic.mp4

However, could not fix this

rosdep install --from-paths . --ignore-src --rosdistro noetic -y

rosdep-install-error
For now, I skipped that

Troubleshooting

  • rqt_gui error can be fixed by adding "--" before perspective file args inside the launch file. For example, inside exercises/position_control.launch change
<node name="rqt_gui" pkg="rqt_gui" type="rqt_gui" respawn="false" output="screen" args="perspective-file $(arg perspective)"/>

to

<node name="rqt_gui" pkg="rqt_gui" type="rqt_gui" respawn="false" output="screen" args="--perspective-file $(arg perspective)"/>
  • could not find drone_wrapper_class error can be fixed temporarily by
export PYTHONPATH=$PYTHONPATH:~/catkin_ws/src/rqt_drone_teleop/src/rqt_vel_teleop:~/catkin_ws/src/drone_wrapper/src/drone_wrapper

[rqt_drone_teleop] Remove dependancies to RQT

Move callbacks from exercise templates (mysolution.py) to RQTs.

With this enhancement RQT won't need a template to run. This makes sense with real drones or even testing with simulated drones.

[drone_teleop] Sync takeoff/landing button label in perspectives

Taking off from the "Takeoff button" in the Velocity control perspective, the button label changes to "Land". If you switch to the Position control perspective, the button remain as "Take off", as seen in the screenshot below.

Button labels should be synced between perspectives.

Captura de pantalla de 2020-05-29 19-59-18

[drone_teleop] Multiple builds failing

Builds of multiple packages in this repository seem to be failing due to rqt_drone_teleop. The issue may be caused due to an improper setup.py in the package. This could have been caused after #36 with the new modularization with the setup.py still instructing the build to find a src/rqt_drone_teleop.

An instance of the log error:

-- Install configuration: "None"
00:49:49 + cd /tmp/binarydeb/ros-melodic-rqt-drone-teleop-1.3.5
00:49:49 + mkdir -p /tmp/binarydeb/ros-melodic-rqt-drone-teleop-1.3.5/debian/ros-melodic-rqt-drone-teleop/opt/ros/melodic/lib/python2.7/dist-packages
00:49:49 + /usr/bin/env PYTHONPATH=/opt/ros/melodic/lib/python2.7/dist-packages:/tmp/binarydeb/ros-melodic-rqt-drone-teleop-1.3.5/obj-aarch64-linux-gnu/lib/python2.7/dist-packages:/opt/ros/melodic/lib/python2.7/dist-packages:/tmp/ros_buildfarm: CATKIN_BINARY_DIR=/tmp/binarydeb/ros-melodic-rqt-drone-teleop-1.3.5/obj-aarch64-linux-gnu /usr/bin/python2 /tmp/binarydeb/ros-melodic-rqt-drone-teleop-1.3.5/setup.py build --build-base /tmp/binarydeb/ros-melodic-rqt-drone-teleop-1.3.5/obj-aarch64-linux-gnu install --root=/tmp/binarydeb/ros-melodic-rqt-drone-teleop-1.3.5/debian/ros-melodic-rqt-drone-teleop --install-layout=deb --prefix=/opt/ros/melodic --install-scripts=/opt/ros/melodic/bin
00:49:50 running build
00:49:50 running build_py
00:49:50 error: package directory 'src/rqt_drone_teleop' does not exist
00:49:50 CMake Error at catkin_generated/safe_execute_install.cmake:4 (message):
00:49:50   
00:49:50   execute_process(/tmp/binarydeb/ros-melodic-rqt-drone-teleop-1.3.5/obj-aarch64-linux-gnu/catkin_generated/python_distutils_install.sh)
00:49:50   returned error code
00:49:50 Call Stack (most recent call first):
00:49:50   cmake_install.cmake:41 (include)

Update README with new noetic branch

Current changes in master branch (#90) have caused a jenkins build fail. It seems that gazebo pkg it is not found in drone_assets.
Since Kinetic branch is on EOL status, and new changes won't be included in kinetic release, I propose to update README removing kinetic tags and adding noetic new ones.

Drone_assets tags should be also added.

[DroneHangar] Plugins missing

The following plugins are missing for the Robotics Academy drone_hangar exercise

  • libwall1plugin.so
  • libwall2plugin.so
  • libwall3plugin.so
  • libwall4plugin.so

[drone_teleop] Modularize rqt package

The current version has only one plugin (module) which contains the whole GUI. Modularization will allow to use different rqt depending on the exercise needs.

The different alternatives will be created and store at assets.

[drone_assets] New package with drone assets

UDRF

URDF Status
turtlebot3_waffle_pi_colored_plate.xacro Used in follow_turtlebot

MODELS

  • By exercises:
DRONE GYMKHANA
MODEL Status
grass_plane Used
number1 Used
number2 Used
number3 Used
number4 Used
logoJdeRobot Used
arrow Used
hoop-red Used
custom-box-target-green Used
custom-box-target-red Used
sun Used
iris_dual_cam Used
FOLLOW ROAD
MODEL Status
grass_plane Used
sun Used
house3 Used but not needed
polaris_ranger_ev Used but not needed
lamp_post Used
road NOT FOUND
iris_dual_cam Used
LABYRINTH ESCAPE
MODEL Status
sun Used
arrow Used
simple_labyrinth Used
iris_dual_cam Used
POSITION CONTROL
MODEL Status
sun Used
construction_cone Used
ground_plane NOT FOUND
iris_dual_cam Used
RESCUE PEOPLE
MODEL Status
sun Used
face1 Used
face2 Used
face3 Used
face4 Used
face5 Used
face6 Used
rescue_area Used
iris_dual_cam Used
FOLLOW TURTLEBOT
MODEL Status
sun Used
ground_plane NOT FOUND
iris_dual_cam Used
DRONE HANGAR
MODEL Status
sun Used
hangar Used
wall1 Used
wall2 Used
wall3 Used
wall4 Used
grass_plane Used
iris_dual_cam Used
VISUAL LANDER
MODEL Status
sun Used
grass_plane Used
logo_JdeRobot Used
car_color_beacon Used
iris_dual_cam Used
DRONE CAT MOUSE
MODEL Status
sun Used
grass_plane Used
iris Used
iris_dual_cam Used
  • Full list:
MODEL Status
sun Used
grass_plane Used
ground_plane NOT FOUND
number1 Used
number2 Used
number3 Used
number4 Used
face1 Used
face2 Used
face3 Used
face4 Used
face5 Used
face6 Used
wall1 Used
wall2 Used
wall3 Used
wall4 Used
arrow Used
hoop-red Used
custom-box-target-green Used
custom-box-target-red Used
house3 Used but not needed
polaris_ranger_ev Used but not needed
lamp_post Used
road NOT FOUND
simple_labyrinth Used
construction_cone Used
rescue_area Used
hangar Used
logo_JdeRobot Used
logoJdeRobot Used
car_color_beacon Used
iris Used
iris_dual_cam Used

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.