Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lpoves2020 committed Feb 28, 2024
1 parent 4eb0b23 commit b8a80c5
Show file tree
Hide file tree
Showing 31 changed files with 521 additions and 27 deletions.
26 changes: 10 additions & 16 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# in the templates via {{ site.myvariable }}.

title: ROBOTICS LAB URJC
email: [email protected]
description: "Bitácora para mi trabajo de fin de grado"
github_username: larapoves
email: [email protected]
description: "Bitacora for my University degree final project"
github_username: bb6698
minimal_mistakes_skin: dark
search: true
logo: ./logo.png
Expand All @@ -27,9 +27,9 @@ markdown: kramdown
remote_theme: mmistakes/minimal-mistakes
# Outputting
permalink: /:categories/:title/
paginate: 1 # amount of posts to show
paginate: 5 # amount of posts to show
paginate_path: /page:num/
timezone: Europe/Madrid
timezone: # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

include:
- _pages
Expand All @@ -56,25 +56,19 @@ plugins:
- jekyll-include-cache

author:
name : "Lara Poves Martínez"
name : "Barbara Villalba Herreros"
avatar : "/assets/images/bio-photo.jpeg"
bio : "Ingeniería robótica software en la URJC"
bio : "Software robotics engineer at URJC"
links:
- label: "GitHub"
icon: "fab fa-fw fa-github"
url: "https://github.com/larapoves"
- label: "LinkedIn"
icon: "fab fa-fw fa-linkedin"
url: "https://www.linkedin.com/in/lara-poves-mart%C3%ADnez-147ba62a7/"

url: "https://github.com/bb6698"
footer:
links:
- label: "LinkedIn"
icon: "fab fa-fw fa-linkedin"
url: "https://www.linkedin.com/in/lara-poves-mart%C3%ADnez-147ba62a7/"

- label: "GitHub"
icon: "fab fa-fw fa-github"
url: "https://github.com/larapoves"
url: "https://github.com/bb6698"

defaults:
# _posts
Expand Down
7 changes: 6 additions & 1 deletion docs/_pages/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ permalink: /about me/
title: "About me"
---

Hola, soy Lara y estoy terminando el grado de ingeniería robótica software en la Universidad Rey Juan Carlos.
Hello, my name is Bárbara and I am currently finishing my degree in Robotics Engineering at URJC.

I am passionate about programming and everything related to robots and helping people through robotics.
Currently improving my knowledge about ROS, ROS2, C++, Python, C,...etc.

I am a hard-working, constant person who hardly gives up on things. I love challenges and overcome them and always trying to move forward to be competent in the future
33 changes: 33 additions & 0 deletions docs/_posts/2022-03-20-Getting started-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "Week 1-10. Getting started"
last_modified_at: 2023-03-20T19:43:00
categories:
- Blog
tags:
- ROS Noetic
- PX4
- Mavros
- Mavlink
- Gazebo
- openCV
- PyQt5
---

This weeks were to create the workspace, install all needs and start developing a simple teleoperate for drone.

## Weeks 1-8
In the first two months I investigated how to install mavros and mavlink on my personal computer.

Previously I had ROS installed, the non-etic distribution and gazebo, which I did not have to install.

I found problems to be able to work with PX4 on my computer. The problem was that I had ROS and ROS2 installed, which had a conflict between both versions.
Which I opted for a simple solution and was to create a virtual machine with a Linux 22.04 operating system and install ROS no etic, Gazebo, mavros, mavlink and I was able to launch the PX4 package without any problem

## Week 8-10

The next weeks, I started developing a simple teleoperate for Iris drone. I tried some libraries (opencv and pyqt5). Finalliced I chooice Pyqt5 because I worked with hem and it was simple.

The teleoperator will consist of commanding positions and speeds to the iris drone through some sliders, we will also command orientations and angular speeds.

It is a first contact with a drone since my TFG will try to focus on reinforcement learning through a drone.

145 changes: 145 additions & 0 deletions docs/_posts/2022-03-21-Teleop-Drone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
title: "Month 1-2.Teleop Drone"
last_modified_at: 2023-03-20T13:05:00
categories:
- Blog
tags:
- ROS Noetic
- PX4
- Mavros
- Mavlink
- Gazebo
- openCV
- PyQt5
---

These months developed simple teleop for iris drone.

## Month 1
In the first few months it investigates how to load the sdf iris model into the PX4 package.

To load the iris model in the launch 'mavros_posix_sitl.launch' it was enough with change sdf field for model iris:

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/mavros_posix_sitl.launch.png" alt="mavros_posix_sitl" width="500"/>
</p>

But I found the problem that PX4 was not able to load the model well and could not find the exact folder where it was located.
During a week of research and reading the PX4 forum, I tried to load the model by passing it as a parameter to launch itself, that is, passing the destination path to launch so that PX4 could find it:

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/load_vehicle.launch.png" alt="load_vehicle" width="500"/>
</p>

This was a possible solution to be able to load the desired model.

From here I already developed the teleoperator for the drone that will consist of two nodes:

- The interface where we can see the image of the drone's camera and command different behaviors for the movement of the drone

- The teleoperator that will consist of reading the data that we are receiving from the interface and processing it correctly.

The first approximation was to do everything in the same node but having to launch it with PX4 and using the Pyqt5 library would have conflicts, which led me to separate it into two nodes.

## Month 2

In the second month I focused on developing the previously mentioned node and develop a launch that launches the iris model with the world and both nodes.

First of all we will talk about the interface node and after the teleoperate node.

### Interface node

To develop the interface for us to command the drone we will use the Pyqt5 library.

The node consists of two classes, one for the image that we are going to process from the camera and another class for the interface with the different buttons and sliders.

#### Camara Image
To process the image we will subscribe to the topic '/iris/usb_cam/image_raw'. In order to use the image with the Pyqt5 library, we first need to convert the topic to openCV.
After having it in opencv format, we must transform it into QT format, which will be an image with Pixmap format.

The camera image also shows the current FPS. This will be done simply by measuring the time elapsed between one image and another and calculating the frequency of the image (it is the inverse of the period). Said calculation will make an average with all the measurements and we will update the FPS every second:

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/ImageCapture.png" alt="ImageCapture" width="500"/>
</p>

Finally with opencv we can use a function called putText to average the FPS.

### Controls Fuctions
For the drone commands we will have different buttons and sliders to be able to do it:

- The buttons are for LAND, TAKE_OFF,POSITION AND VELOCITY. When these buttons are pressed, a String message will be sent to the topic '/commands/mode'.
POSITION AND VELOCITY are modes in how we want to command the drone, whether in position control or speed control.
LAND and TAKEOFF are modes to land and take off the drone.

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/BottomsInterface.png" alt="BottomsInterface" width="500"/>
</p>

- The sliders are to send position, speed and orientation to the drone depending on which control the user has chosen. And the topics '/commands/control_position' and '/commands/control_velocity' will be used, filling the messages with type PoseStamped and Twist

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/Sliders.png" alt="Sliders" width="500"/>
</p>

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/AddSliders.png" alt="AddSliders" width="500"/>
</p>


### Teleop node

The teleoperated node will consist of subscribing to the interface node issues, processing them (saying if we are in position and speed control, or taking off or landing) and commanding the drone.

I will use the OFFBOARD flight mode, which consists of a mode to control the movement and attitude of the vehicle, establishing the position, the speed. acceleration...etc In order for the commands for the drone to work, we have to make sure that the vehicle is armed and for this we will use a service to be able to say that the vehicle is ready. Without the armed vehicle, the drone would not be able to fly.

For each control I will subscribe to the topics of the interface node to obtain the messages and later to be able to process them.

In order to control the modes in which we find ourselves, we will use some simple checks:

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/Modes.png" alt="Modes" width="500"/>
</p>

#### Control Position
The position control will consist of commanding the drone positions in the gazebo world and it will go towards them, in addition we will also command turns in the z axis in radians from 0 to pi.
This control will only work only when the drone has taken off.

To make the turns in the z axis we have had to subscribe to the topic '/mavros/local_position/pose' to obtain the local position of the drone and obtain what orientations it has since when we publish the angle we are working in quaternions not in angles which we will use Two methods of the tfs euler_from_quaternion and quaternion_from_euler to be able to transform the euler angles (in this case we are interested in the z axis) into quaternions

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/ControlPosition.png" alt="ControlPosition" width="500"/>
</p>

#### Control Velocity
The position control will consist of commanding the drone speeds in the gazebo world and it will go towards them, in addition we will also command angular speed in the z axis in radians/seconds from 0 to pi.
This control will only work only when the drone has taken off.

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/ControlVelocity.png" alt="ControlVelocity" width="500"/>
</p>

#### Mode Land
In order to land the drone we will use a service called "/mavros/cmd/land" and when the user presses the LAND button the drone will land where it is

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/LAND.png" alt="LAND" width="500"/>
</p>

#### Mode Take Off
In order to take off the drone and make it fly, we send the height on the z axis by position.

### Results

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/Teleop-Interface.png" alt="Teleop" width="500"/>
</p>

### Conclusions
It is a very simple teleoperator and a contact to know the controls that we can command a drone. Both the interface and the teleoperator could be improved by having other types of behaviors such as commanding speeds, angular speeds, turns and positions in the 3 axes.






80 changes: 80 additions & 0 deletions docs/_posts/2023-06-16-Airsim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: "Airsim"
last_modified_at: 2023-03-20T13:05:00
categories:
- Blog
tags:
- Airsim
- UnRealEngine
---

## Why use Airsim?
First, Airsim is a simulator open source that it use in robotic applications and machine learning. AirSim provides a realistic simulated environment for experimenting with control, navigation and perception algorithms on unmanned aerial vehicles (UAVs), ground vehicles and water vehicles. The simulator is compatible with platforms such as Linux, Windows and macOS.

In your case, we use Linux.

Airsim has different environments depending on the application.

### Scenarios within Airsim

Mentioned above, airsim offers different scenarios, such as:

1. AbandonedPark
2. Africa
3. AirSimNH: It's a small urban neighborhood
4. Blocks
5. Building_99
6. LandscapeMountains
7. MSBuild2018 (soccer field)
8. TrapCamera
9. ZhangJiajie

Depend the version releases for Linux, we can have a other scenarios, as instance:

- City: Large environment with moving vehicles and pedestrians.These scenarios consist of 2 packages
- Forest

<p align="center">
<img src="/2022-tfg-barbara-villalba/images/MAPS_AIRSIM.png" alt="maps" width="500"/>
</p>

### Sensors

Airsim provides differentes sensors as instance:

1. Camera
2. Barometer
3. Imu
4. Gps
5. Magnetometer
6. Distance Sensor
7. Lidar

### Environment

In Airsim, you can configure the enviroment:

1. The weather: you can have effects as instance rain,fog,dug,snow,etc.
2. Time of day,atmospheric effects
3. Collision and detection

### Vehicles types

In Airsim, it exists differents types of availables vehicles:

1. PhysXCar: Represents a ground vehicle with realistic physics based on the PhysX physics engine.

2. SimpleFlight : Represents a drone with a simplified flight model.

3. SimpleQuadcopter: Represents a quadcopter type drone with a basic flight model.

4. SimpleWheeledVehicle: Represents a wheeled ground vehicle with a simplified physics model.









Loading

0 comments on commit b8a80c5

Please sign in to comment.