Ieee-delorean

From jderobot
Jump to: navigation, search

Encuesta[edit]

https://goo.gl/forms/nks5WRfjGegmyEJ73

People[edit]

  • Miguel Ángel Alba Blanco <miguelangel.abb@gmail.com>
  • Team Leader Adrián Rodrigo Castillo <adri_rodri_64@hotmail.es>
  • Isabel Villa Ruiz
  • Patricia Durán Castro
  • Miguel Alamillo Reguero
  • Rocío Díaz Fernández

Old members[edit]

  • Antonio Gómez Vergara <antonio.g.vergara@gmail.com>
  • Roberto Nombela Alonso <rober95@hotmail.com>
  • Vanessa Fernández Martinez
  • José Enrique Narváez <jenarvaezg@gmail.com>
  • Alba García de la Camacha <albagc8@gmail.com>

Project Description[edit]

Welcome to the page of the project in collaboration with Jderobot.

We're trying to build a small scale vehicle that can be controlled manually or be in autonomous mode. The goal with the manual control is to be able to drive the car over a local network, using for that another device like a computer, a phone or any other that can display HTML content.

The goal with the autonomous mode, however is to make the car to go to certain location (GPS coordinates). It should be able to get there avoiding small obstacles and walls.

We are using Arduino nano for the hardware side of the car itself, controlling the steering servo and the ESC.

All the car's intelligence comes from the on board Raspberry-Pi 2, running Ubuntu Mate and ROS. All the ROS nodes that we are developing are in Python language. Other nodes that we are using in this project that were developed by other people are made in C++.

In addition, we are also trying to develop an image streaming system that can help us to see where the car is going aling the ride.

You can see our code in the link DeLorean Github

Car Components[edit]

Electronics Speed Control (ESC)

  • Specifications:
    • Input Voltage : 7.2 V (x2 14,4 V)
    • Brake Current: 320A
    • Maximum Instantaneous Current: 160A/160A

ESC[edit]

The information is sent by a PWM signal at 50Hz (20ms) with an amplitude of 5V.

The pulse width determines the information to be sent. A 1500 microseconds PWM signal is the neutral position.

Steering Servo[edit]

The same way the ESC works. The information is sent by a PWM signal at 50Hz (20ms) with an amplitude of 5V. The pulse width determines the information to be sent. A 1500 microseconds PWM signal is the neutral position. Servo's position is determined by an angle, with a minimum value of 0 degrees to a maximum of 180 degrees, being 90 degrees the neutral position, 180 degrees full right position and 0 degrees the full left position.

Arduino[edit]

Arduino is directly connected to ESC and steering servo through digital pins that are listed under this section.

Raspberry[edit]

Raspberry Pi is the actual control center for gathering information and sending orders. It is connected via WiFi to the manual controller node or monitoring nodes (via ROS). It is also USB-connected to the Arduino Nano for serial connection.

Laser sensor[edit]

This hardware is capable of detecting distances. It will be managed by ROS driver.

GPS module[edit]

This module is connected to the Raspberry by USB. ROS driver gathers the sensor information (Global position).

Camera[edit]

We want to use a Raspberry-Pi camera for the image streaming. Because we don't own one yet, we are using a cheap GoPro-like camera that streams MJPEG coded pictures.

Power and component connection circuit[edit]

We built a prototype circuit that connects all the Arduino pins to the ESC and steering servo. In addition, we used a pre-built DC-DC converter that steps-down the 7.4v from the additional 4000mAh on the car (the other 2 batteries power the car itself) to an usable 5V for the Raspberry. The Raspberry, then, will power the Arduino, the Laser sensor and the GPS module via USB.

Objectives[edit]

objectives 2017-2018[edit]

Software[edit]

  • Install Ubuntu in Raspberry-Pi 2 or 3
  • Install JdRobot
  • Install ROS
  • Main autonomous system (ROS, python)
  • Manual control system (ROS, python)
  • Several controller node (Keyboard, PS3 and XBOX controller, Web controller)

Harware[edit]

  • Build power circuit
  • Make Raspberry-Pi camera work
  • Make Laser scan work
  • Make GPS module work
  • Install Aditional battery
  • Overall physical layout design and implementation

Objectives 2016-2017[edit]

Immediate manual-control project objectives[edit]

  • Connection checking and automatic stop in case of disconnection.
  • Make several controller nodes.
  • Network testing.
  • Speed testing.
  • Overall stability, lag and disconnection testing.

Immediate automated-control project objectives[edit]

  • Sensors data processing.
  • GPS localization.
  • Laser sensor data processing.
  • Overall autonomous navigation, avoiding obstacles and walls.

Timeline[edit]

Until August 2018[edit]

  • Mobile control
  • Streaming with a pi cam

week (14/03/2018)[edit]

  • Installed ROS GPS node.
  • ROS GPS node worked well, now we can read sensor_msgs/NavSatFix messages from the module.
  • We organized power and connection circuit.
  • Soldered power circuit.
  • Started to develop the software gear system to control car's speed when using joy device.

week(08/03/2018)[edit]

  • Created watchdog for controller-car connection test. Now when you control the car manually (either by ps3 controller or keyboard) the controller and the car

start a bonding process. If the bond is broken by going out of range or another cause, the car will automatically stop.

  • We investigated about GPS module. We managed to make our I.trek M7 GPS usb module to work with ROS, and now it publishes sensor_msgs/NavSatFix messages.

  • Video image over network was tested. With a cheap usb camera, we now can send compressed images by network, without introducing any noticeable lag or errors.

Video FPS is a little bit low, but acceptable.

week(24/01/2018) to week(9/02/2018)[edit]

  • Three new members arrived to the team!
  • A lot of development. In general, we learned basic ROS package creation and building, as well as important commands to make everything work.
  • Created the carcontrol_joy package. This allows us to control the car with PS3 or Xbox controller.

  • Created the range_tester package. This node makes sure the car is within range of operation while driving it. If it goes too far, it should stop automatically. Still testing.

  • Made research on ROS network communication. We managed to communicate various nodes spreaded on 2 different machines. We have now decided to use a car-mounted router to connect the car's raspberry to the controller node running in another machine via WiFi.
  • ROS raspicam_node is being tested. RAW image format seems too heavy to manage over wireless network. We will try to transmit compressed video instead.
  • Arduino servo and ESC connection, as well as power delivery circuit are being made.


week(20/11/2017)[edit]

  • Communication between pc-Raspberry-car with ROS node

week(13/11/2017)[edit]

  • Communication between ROS on Raspberry PI and PC.
  • Programming the publisher node with python 2.7


week(6/11/2017)[edit]

  • Making workspace
  • Installing raspicam_node
  • Programming control node


week (30/10/2017)[edit]

  • Installing ROS
  • First steps with camera pi


week (23/10/2017)[edit]

  • Installing ubuntu Mate in Raspberry

week (2/10/2017)[edit]

  • Making budget

week (25/09/2017)[edit]

  • Team Meeting
  • Budget Design

San Teleco (31/03/2017)[edit]

This day was our limit date in which the car should be remotely controled via WiFi because we were going to do a demonstration to the university to show our progress.

Before this, we were changing some parts of the code in order to have more control of the car so it doesn't hurt anyone.

The demonstration was really successful. The car control was incredible with low lag and we achieved a control distance of about 90 meters.

Some teachers came and offered their help with new ideas and resources. Even in the middle of the demonstration we added a new function in order to improve even more the control of the car, this function let us modificate the direction of the car instantly into a straight line by pressing "t", making it easier to drive.

We are really satisfied with the progress we have done and here we show you some photos and videos.




week (27/03/2017)[edit]

  • We create car_server_alfa.ino to resolve the discontrol that we had sometimes with de car
  • We resolve this problems with car_server_op_bet.ino and then, we are going to upgrade car_server.ino to V3.0

week (20/03/2017)[edit]

We drive the car via WiFi!!!

  • update car_server
  • update controlwifi.py

We had a problem with the ESC because it doesn´t provide enough power the Raspberry needs. We solved this with a power bank.

Week (13/03/2017)[edit]

  • First steps to wifi control.
To do this, we create a private network with a mobile phone and we connect the computer and the Raspberry at the same network. 
  • Create controlwifi.py --> This program send the necessary instructions to Arduino, to control the car.

week (27/02/2017)[edit]

  • Installing Raspbian
  • First communication proves between Raspberry and Arduino via serial.
In this proves we order the Arduino to turn on and off a Led. We send this orders via WiFi.

Week (20/02/2017)[edit]

  • Installing IDE controllers.
  • Installing Arduino controllers.
  • Sending instructions from Raspberry to Arduino with USB (we have some problems with this).

Week (13/2/2017)[edit]

  • Raspberry configuration.
  • Server configuration for the Raspberry.
  • Configuring Network of the controls car.

Week (30/1/2017)[edit]

  • Programming the Attiny for ultrasonic sensors (It works).

Week (14/10/2016)[edit]

  • Programming the Attiny for ultrasonic sensors
    • We have some problems with this, they are not well-prepared or have some failure the circuit.
  • Preparation of cables for ultrasonic sensors

Week (7/10/2016)[edit]

df -h
umount /dev/mmcblk0XX
sudo dd bs=1M if=ubuntu-16.04-preinstalled-server-armhf+raspi2.img.xz of=/dev/mmcblk0

  • To conect by SSH:
sudo nmap -sP 10.42.0.1-254

ssh ubuntu@(ipnmap)

  • Installing libraries for the GPIO
  • First steps programming the GPIO of the Raspberry, turning on and off a led



Week (3/10/2016)[edit]


Week (26/09/2016)[edit]


Week (19/09/2016)[edit]

  • Update web

Week (11/04/2016)[edit]

  • Installing ICE
  • Car customize


Week (14/03/2016)[edit]

  • Programming Attiny
  • Raspberry Configuration

Week (29/02/2016)[edit]

  • Programming a bluetooth controller V0.4

Week (22/02/2016)[edit]

  • Programming a bluetooth controller V0.3
  • Installing Python Server in Raspberry
  • Connection between Raspberry and Arduino

Week (15/02/2016)[edit]

  • Programming a bluetooth controller V0.2


Week (8/02/2016)[edit]

  • Programming a bluetooth controller V0.1

  • Implemented and design circuit in order to program Attiny

Week (3/02/2016)[edit]

  • Creating CreateType Arduino library
     #include <Arduino.h>;

class CreateType{
	public:
		struct Order{
	   		String Move = "";
	   		int Value= 0;
 		};
 		
		Order AddMyType(String MyStr);

	private:
		String _MyStr;
		Order _MyOrder;

};
  • Creating library header and body of the library
  • Debugging library and main program testing

Week (25/01/2016)[edit]

  • Refine Arduino Movement Code
  • Creating Types for the different move orders and values
  • Making sketch for the new CreateType Arduino library
 
#include <CreateType.h>
#include <Arduino.h>


  String character = ".";
  String AuxValuechar;

  CreateType::Order CreateType::AddMyType(String MyStr){
  CreateType::Order MyOrder;
  MyOrder.Move = "";
  MyOrder.Value = 0;
  AuxValuechar = "";

  int DotPos = MyStr.indexOf(character);
  //returns dot's position

  //puts order and value into the type
  if (DotPos == -1){
    for(int i=0; i<MyStr.length()/*-2*/; i++){ // Length - 2 because otherwise take CR and LF too
      MyOrder.Move = MyOrder.Move + MyStr[i];
    }
  }
  else{
    for(int i=0; i<DotPos; i++){
      MyOrder.Move = MyOrder.Move + MyStr[i];
    }
    for(int i=DotPos+1; i<MyStr.length(); i++){
      AuxValuechar = AuxValuechar + MyStr[i];
    }
    MyOrder.Value = AuxValuechar.toInt();
    return MyOrder;
  }
}


Week (16/11/2015)[edit]

  • Instalation of Arduinos attiny (micro arduinos) controler libraries
  • Investigation abaut programing Attiny
  • Instalation of OS in Raspberry

Week (9/11/2015)[edit]

  • Placement scheme of the ultrasonic sensors
  • Researching about micro arduinos atmel attiny85 and ultrasonic HC-SR04
  • Ultrasound testing

Next week[edit]

  • Better organization of servos orders recived by Bluetooth
  • Connection between both micro arduinos and ultrasounds with nano arduino

Week (2/11/2015)[edit]

  • Refine Arduino´s movement code
  • Now we can control the two engines at the same time

Next week[edit]

  • Better organization of servos orders recived by Bluetooth

Fourth week (26/10/2015)[edit]

  • Investigation of Arduino´s Servo library
  • Refine Arduino´s movement code
  • Investigation of Bluetooth protocol comunication
  • Solve some electric circuit issues on the bluetooth connection board

Next week[edit]

  • Create protocol comunication types for Bluetooth
  • Study multi-threading emulation on Arduino code(Motors and steering servo working together)

Thirth Week[edit]

  • Servo controled with the circuit implementation by bluetooth.
  • We can only use one servo at the same time


Next week[edit]

  • Study multi-controler of two servos at the same time


Second Week[edit]

  • Circuit implementation in the car


Begining the project

First servos control provements, with a protoboard.


First Week[edit]

  • Design a voltage divider circuit to use bluetooth

Essentials commands[edit]

This are some commands that we have used frecuently

GitHub[edit]

  • git init --> This command inicialice a git
  • git clone --> (only once), create link with the git to sincronice
  • git pull --> update the repository with our computer
  • git add --> add the variations we did
  • git commit --> add comment of this variations
  • git push --> upload this variations in the git, for all

Sftp[edit]

To connect to the sftp server: sftp "server direction"

  • put --> upload files

ROS[edit]

Connection between computers[edit]

  • Add the other ip computer direction

sudo nano /etc/hosts

  • Try that network works
ping -c 3 computer_name