Difference between revisions of "F14: Team4-Self Driving Car - AUG"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Controller Communication Table)
(Controller Communication Table)
Line 629: Line 629:
 
| Data layout
 
| Data layout
 
|-
 
|-
| 0x040
+
| 0x082
 
| Heartbeat
 
| Heartbeat
 
|
 
|
 
|-
 
|-
| 0x14A
+
| 0x18A
| Motor Speed and Direction
+
| Motor Speed & Direction
 
|
 
|
  byte [0] : (uint8_t) Speed
+
  byte[0] : (uint8_t) Speed
  byte [1] : (uint8_t) Direction
+
  byte[1] : (uint8_t) Direction
|-  
+
|-
| 0x3E2
+
| 0x442
| Destination Change, Kill or Crash
+
| Power-Up Acknowledgement
 
|
 
|
|-
+
char version[16]
| 0x402
+
char time[16]
| Update Time
+
|-
|
 
|-  
 
 
|}
 
|}
  
Line 656: Line 654:
 
| Data layout
 
| Data layout
 
|-  
 
|-  
| 0x091
+
| 0x0D1
| Heartbeat Ack (Response to 0x040)
+
| Heartbeat Ack (Response to 0x082)
 
|
 
|
 
|-  
 
|-  
| 0x379
+
| 0x341
 
| Speed Data
 
| Speed Data
 
|
 
|
  byte [0] : (uint8_t) Speed of Car
+
  byte[0] : (uint8_t) Speed of Car
 
|-  
 
|-  
| 0x371
+
| 0x381
| Speed Data
+
| Error Message
 
|
 
|
byte [0] : (uint8_t) Speed of Car
 
 
|-
 
|-
| 0x451
+
| 0x411
| Power Up, Boot Status and Version
+
| Power Up
 
|
 
|
  byte [0] : (uint8_t) Power Up
+
  byte[0] : (char) Version
byte [1] : (uint8_t) Boot Status
 
byte [2] : (uint8_t) Version
 
 
|-
 
|-
 
|}
 
|}
Line 686: Line 681:
 
| Data layout
 
| Data layout
 
|-  
 
|-  
| 0x094
+
| 0x0D4
| Heartbeat Ack (Response to 0x040)
+
| Heartbeat Ack (Response to 0x082)
 
|
 
|
 
|-  
 
|-  
| 0x454
+
| 0x204
| Power Up, Boot Status and Version
+
| Compass Data
 
|
 
|
  byte [0] : (uint8_t) Power Up
+
  byte[0] : (uint8_t) Current Angle
  byte [1] : (uint8_t) Boot Status
+
  byte[1] : (uint8_t) Desired Angle
  byte [2] : (uint8_t) Version
+
  byte[2-3] : (uint16_t) Distance to Destination
 +
byte[4-5] : (uint16_t) Distance to Checkpoint
 
|-
 
|-
| 0x1D4
+
| 0x274
| Compass Heading and Desired Heading
+
| Request Checkpoint
 
|
 
|
  byte [0] : (uint8_t) Compass Heading
+
  byte[0] : (uint8_t) Checkpoint Number
byte [1] : (uint8_t) Desired Heading
 
 
|-
 
|-
| 0x234
+
| 0x2C4
| Request next Checkpoint
+
| Current Location
 
|
 
|
 +
byte[0-1] : (uint16_t) Latitude
 +
byte[2-3] : (uint16_t) Longitude
 +
byte[4] : (uint8_t) GPS Status
 
|-
 
|-
| 0x294
+
| 0x384
| Distance from Destination
+
| Error Message
 
|
 
|
byte [0] : (uint8_t) Distance
 
 
|-
 
|-
| 0x2B4
+
| 0x414
| Distance from Destination
+
| Power Up
 
|
 
|
  byte [0] : (string) Distance
+
  byte[0] : (char) Version
|-
 
| 0x2BC
 
| Distance from Destination
 
|
 
byte [0] : (string) Distance
 
|-
 
| 0x2F4
 
| Current Location of GPS
 
|
 
Message1: byte [0-7] : (string) Longitude and Latitude
 
Message2: byte [0-7] : (string) Longitude and Latitude
 
Message3: byte [0-7] : (string) Longitude and Latitude
 
 
|-
 
|-
 
|}
 
|}
  
 
{| class="wikitable"
 
{| class="wikitable"
|+ Communication Bridge + Android Controller Communication Table
+
|+ Communication Bridge + Android Controller Communication Table ==
 
|-
 
|-
 
| Message Number
 
| Message Number
Line 738: Line 723:
 
| Data layout
 
| Data layout
 
|-  
 
|-  
| 0x096
+
| 0x0D6
| Heartbeat Ack (Response to 0x040)
+
| Heartbeat Ack (Response to 0x082)
 
|
 
|
 
|-  
 
|-  
| 0x456
+
| 0x116
| Power Up, Boot Status and Version
+
| Pause Car
 +
|
 +
|-
 +
| 0x156
 +
| Resume Car
 +
|
 +
|-
 +
| 0x2A6
 +
| Next Checkpoint Data
 +
|
 +
Message1 : byte[0-1] : (uint16_t) Latitude
 +
Message1 : byte[2-3] : (uint16_t) Longitude
 +
Message1 : byte[4] : (uint8_t) New Route
 +
Message1 : byte[5] : (uint8_t) Final Checkpoint
 +
Message1 : byte[6] : (uint8_t) Checkpoint Number
 +
Message1 : byte[7] : (uint8_t) Frame Number
 +
|
 +
Message2 : byte[0-1] : (uint16_t) Total Distance
 +
Message2 : byte[2] : (uint8_t) Frame Number
 +
|-
 +
| 0x386
 +
| Error Message
 
|
 
|
byte [0] : (uint8_t) Power Up
 
byte [1] : (uint8_t) Boot Status
 
byte [2] : (uint8_t) Version
 
 
|-
 
|-
| 0x116
+
| 0x3C6
| On/Off Command
+
| Mode (Free/Home/GPS)
 
|
 
|
 +
byte[0] : (uint8_t) Mode
 
|-
 
|-
| 0x266
+
| 0x416
| Checkpoints from Android
+
| Power Up
 
|
 
|
  byte [0-7] : (string) Longitude, Latitude, Distance between two co-ordinates, Number of Checkpoints.
+
  byte[0] : (char) Version
 
|-
 
|-
 
|}
 
|}
Line 767: Line 771:
 
| Data layout
 
| Data layout
 
|-  
 
|-  
| 0x093
+
| 0x0D3
 
| Heartbeat Ack (Response to 0x040)
 
| Heartbeat Ack (Response to 0x040)
 
|
 
|
 
|-  
 
|-  
| 0x453
+
| 0x1C3
| Power Up, Boot Status and Version
 
|
 
byte [0] : (uint8_t) Power Up
 
byte [1] : (uint8_t) Boot Status
 
byte [2] : (uint8_t) Version
 
|-
 
| 0x1B3
 
 
| Front/Rear Sensor Data
 
| Front/Rear Sensor Data
 
|
 
|
  byte [0] : (uint8_t) Sensor Data
+
  byte[0] : (uint8_t) Left Sensor Data
 +
byte[1] : (uint8_t) Middle Sensor Data
 +
byte[2] : (uint8_t) Right Sensor Data
 +
byte[3] : (uint8_t) Rear Sensor Data
 
|-
 
|-
| 0x194
+
| 0x303
| Front/Rear Sensor Data
+
| Other Sensor Data
 
|
 
|
  byte [0] : (uint8_t) Sensor Data
+
  byte[0] : (uint8_t) Nattery Health Data
 +
byte[1] : (uint8_t) Light Sensor Data
 
|-
 
|-
| 0x1BB
+
| 0x383
| Front/Rear Sensor Data
+
| Error Message
 
|
 
|
byte [0] : (uint8_t) Sensor Data
 
 
|-
 
|-
| 0x333
+
| 0x413
| Data from Sensors like Tilt, Light etc.
+
| Power Up
 
|
 
|
  byte [0] : (uint8_t) Sensor Data
+
  byte[0] : (char) Version
|-
 
| 0x33B
 
| Data from Sensors like Tilt, Light etc.
 
|
 
byte [0] : (uint8_t) Sensor Data
 
|-
 
| 0x3B1
 
| Error and Communication Status
 
|
 
byte [0] : (uint8_t) Error Data
 
|-
 
| 0x3B9
 
| Error and Communication Status
 
|
 
byte [0] : (uint8_t) Error Data
 
 
|-
 
|-
 
|}
 
|}
Line 822: Line 807:
 
| Data layout
 
| Data layout
 
|-  
 
|-  
| 0x097
+
| 0x047
| Heartbeat Ack (Response to 0x040)
+
| Hardware Reset
 +
|
 +
|-
 +
| 0x0D7
 +
| Heartbeat Ack (Response to 0x082)
 
|
 
|
 
|-  
 
|-  
| 0x457
+
| 0x117
| Power Up, Boot Status and Version
+
| Pause Car
 +
|
 +
|-
 +
| 0x157
 +
| Resume Car
 +
|
 +
|-
 +
| 0x387
 +
| Error Message
 +
|
 +
|-
 +
| 0x3C7
 +
| Mode (Free/Home/GPS)
 
|
 
|
  byte [0] : (uint8_t) Power Up
+
  byte[0] : (uint8_t) Mode
byte [1] : (uint8_t) Boot Status
 
byte [2] : (uint8_t) Version
 
 
|-
 
|-
| 0x4D7
+
| 0x417
| Battery Status and Key Press
+
| Power Up
 
|
 
|
  byte [0] : (uint8_t) Battery Status
+
  byte[0] : (char) Version
 
|-
 
|-
 
|}
 
|}

Revision as of 07:17, 4 November 2014

Self Driving Car

Abstract

Objective and Scope

Team Members & Responsibilities

  • Sensor Controller:
    • Chinmay Vaidya
    • Manuj Shinkar
  • Motor Controller:
    • Viral Agrawal
    • Mitesh Sanghvi
  • I/O Unit:
    • Tej Kogekar
    • Mayur Salve
  • Communication Bridge + Android:
    • Jayanth Nallapothula
    • Manish Mandalik
    • Kwun Fung Ng (Daniel)
  • Geographical Controller:
    • Ishan Bhavsar
    • Tanuj Chirimar
    • Sushant Potdar
  • Master Controller:
    • Dhaval Parikh
    • Harita Dhiren Parekh
    • Rutwik Kulkarni

Introduction

Schedule

Sensor Team Schedule

Sl. No Start Date End Date Task Status Actual Completion Date
1 09/14/2014 09/20/2014 Understanding the logic of sensors to be used Completed 09/20/2014
2 09/21/2014 10/04/2014 Writing the codes for the different types of sensors Completed 10/04/2014
3 10/05/2014 10/11/2014 Testing the different sensors for accuracy and placing the order for the one we have selected. Completed 10/11/2014
4 10/12/2014 10/25/2014 Build CAN transceiver and send data to the Master Board Completed 10/25/2014
5 10/26/2014 11/01/2014 Place all the sensors on car and test for obstacle avoidance Completed 10/28/2014
6 11/02/2014 11/14/2014 Work on light and tilt sensors Scheduled YTD
7 11/15/2014 12/09/2014 Final testing and debugging Scheduled YTD

Motor Team Schedule

Sl. No Start Date End Date Task Status Actual Completion Date
1 09/14/2014 09/20/2014 Understand the logic of Motor Controller present in the RC Car Completed 09/20/2014
2 09/21/2014 09/27/2014 Replace on-board controller with SJSU One board Completed 09/22/2014
3 09/28/2014 10/04/2014 Drive the DC motor with SJSU One board at different Duty Cycles Completed 09/30/2014
4 10/05/2014 10/11/2014 Test the Servo and DC motor together for moving forward and taking turns Completed 10/09/2014
5 10/12/2014 10/18/2014 Build CAN Transceiver and move the car as per the CAN message received Completed 10/13/2014
6 10/19/2014 10/25/2014 Make arrangement for CAN subscription task Completed 10/25/2014
7 10/26/2014 11/01/2014 Interface encoder and calculate the actual speed at which car is running Completed 10/28/2014
8 11/02/2014 11/08/2014 Make compensation algorithm and make car to move at desired speed Scheduled YTD
9 11/09/2014 12/09/2014 Final testing and debugging Scheduled YTD

I/O Team Schedule

Sl. No Start Date End Date Task Status Actual Completion Date
1 09/14/2014 09/20/2014 Search and order GLCD module with touch screen, LEDs for headlights Completed 09/20/2014
2 09/21/2014 10/04/2014 Study of GLCD data frame formats and design GUI Completed 10/03/2014
3 10/05/2014 10/11/2014 Development of GLCD functions including touchscreen handler Completed 10/11/2014
4 10/12/2014 10/25/2014 Setup CAN subscription tasks for communication with Master controller Completed 10/27/2014
5 10/26/2014 11/01/2014 Develop hardware and code for automatic headlight control, battery health indication Ongoing YTD
6 11/02/2014 11/14/2014 Build hardware for switches and write interrupt handlers for the same Scheduled YTD
7 11/15/2014 12/09/2014 Mount GLCD, headlights, switches on car and final testing Scheduled YTD

Communication Bridge + Android Team Schedule

Sl. No Start Date End Date Task Status Actual Completion Date
1 09/14/2014 09/20/2014 Google maps API research Completed 09/20/2014
2 09/21/2014 10/04/2014 Mock locations on Google maps and simulate co-ordinates w/o gps Completed 10/04/2014
3 10/05/2014 10/11/2014 Two way Bluetooth communication and setup RTOS tasks Completed 10/11/2014
4 10/12/2014 10/25/2014 Raw GUI for app and setup CAN tasks for Start and Stop commands Completed 10/25/2014
5 10/26/2014 11/01/2014 Integration with GEO module and queue for each subscribed service Ongoing TBD
6 11/02/2014 11/09/2014 Incorporate all essential services into Android app and test for response Scheduled TBD
7 11/10/2014 11/16/2014 Final setup and changes for all the CAN tasks along with XBee interfacing Scheduled TBD
8 11/17/2014 11/23/2014 Testing with GEO module with real-time co-ordinates and plotting way points onto Maps Scheduled TBD
9 11/23/2014 12/09/2014 Final Testing and verification of all components on the main field Scheduled TBD

GEO Team Schedule

Sl. No Start Date End Date Task Status Actual Completion Date
1 09/7/2014 09/14/2014 Market research for GPS and Compass Modules Completed 09/14/2014
2 09/14/2014 09/21/2014 Place order / receive the modules Completed 09/20/2014
3 09/21/2014 09/28/2014 Interface GPS with SJ -One board via UART Completed 09/26/2014
4 09/28/2014 10/05/2014 Interface Compass with SJ-One Board via I2C Completed 10/03/2014
5 10/05/2014 10/12/2014 Parsing the GPS data stream Completed 10/11/2014
6 10/12/2014 10/19/2014 Calibration and testing of compass Completed 10/13/2014
7 10/12/2014 10/19/2014 Decide CAN message ID’s and message formats Completed 10/28/2014
8 10/19/2014 10/26/2014 Combining UART and GPS parsing. Create task for GPS Completed 10/25/2014
9 10/19/2014 10/26/2014 Combining compass calibration and i2c interface. Create task for Compass Completed 10/25/2014
10 10/26/2014 11/02/2014 Inter Task Communication (Queues/Shared Objects) In-Progress TBD
11 11/03/2014 11/10/2014 Synchronization and Data Integrity (Semaphores/Mutex/Critical Section) Scheduled TBD
12 11/11/2014 11/25/2014 Final Integration of CAN Framework and Implementation of CAN communication with other modules Scheduled TBD
13 11/26/2014 12/09/2014 Testing and debugging on car (Re-Calibration/Bug Fixes) Scheduled TBD

Master Team Schedule

Sl. No Start Date End Date Task Status Actual Completion Date
1 09/7/2014 09/13/2014 Understanding CAN Bus and API's Completed 09/13/2014
2 09/14/2014 09/20/2014 Deciding System Flow Completed 09/20/2014
3 09/21/2014 09/27/2014 Deciding MSG id's for all devices Completed 10/27/2014
4 09/28/2014 10/11/2014 Testing Subscription between 2 devices Completed 10/4/2014
5 09/28/2014 10/11/2014 Making CAN bus hardware to interface all SJOne boards Completed 10/11/2014
6 09/28/2014 10/11/2014 Testing subscription and time sync between all devices Completed 10/11/2014
7 10/12/2014 10/18/2014 Reading sensor data from boards at the subscription rate Completed 10/26/2014
8 10/19/2014 11/1/2014 Algorithm for obstacle avoidance Completed 10/27/2014
9 11/2/2014 11/15/2014 Algorithm for GPS based navigation Scheduled TBD
10 11/16/2014 11/22/2014 Initial testing and tweaking of the car Scheduled TBD
11 11/23/2014 12/9/2014 Final Testing! Showdown time! Scheduled TBD

Parts List & Cost

Qty Description Manufacturer Part Number Total Cost
1 RC Car - - $$$
10 CAN transceivers - - Free
1 GPS module - - $$
1 Magnetometer Module - - $
1 Ultrasonic Sensor - - $$
1 Misc Components - - $
Total Cost INCREASING!!

Backup Parts & cost

Qty Description Manufacturer Part Number Total Cost

Design & Implementation

CAN 11-bit ID Format

MSG DST SRC
5 bits (11-6) 3 bits (5-3) 3 bits (2-0)

Controller ID Table

Controller ID Controller Type
001 Motor Controller
010 Master Controller
011 Sensor Controller
100 GEO Controller
110 Communication Bridge + Android Controller
111 I/O Controller

Controller Communication Table

Master Controller Communication Table
Message Number Purpose Data layout
0x082 Heartbeat
0x18A Motor Speed & Direction
byte[0] : (uint8_t) Speed
byte[1] : (uint8_t) Direction
0x442 Power-Up Acknowledgement
char version[16]
char time[16]
Motor Controller Communication Table
Message Number Purpose Data layout
0x0D1 Heartbeat Ack (Response to 0x082)
0x341 Speed Data
byte[0] : (uint8_t) Speed of Car
0x381 Error Message
0x411 Power Up
byte[0] : (char) Version
GEO Controller Communication Table
Message Number Purpose Data layout
0x0D4 Heartbeat Ack (Response to 0x082)
0x204 Compass Data
byte[0] : (uint8_t) Current Angle
byte[1] : (uint8_t) Desired Angle
byte[2-3] : (uint16_t) Distance to Destination
byte[4-5] : (uint16_t) Distance to Checkpoint
0x274 Request Checkpoint
byte[0] : (uint8_t) Checkpoint Number
0x2C4 Current Location
byte[0-1] : (uint16_t) Latitude
byte[2-3] : (uint16_t) Longitude
byte[4] : (uint8_t) GPS Status
0x384 Error Message
0x414 Power Up
byte[0] : (char) Version
Communication Bridge + Android Controller Communication Table ==
Message Number Purpose Data layout
0x0D6 Heartbeat Ack (Response to 0x082)
0x116 Pause Car
0x156 Resume Car
0x2A6 Next Checkpoint Data
Message1 : byte[0-1] : (uint16_t) Latitude
Message1 : byte[2-3] : (uint16_t) Longitude
Message1 : byte[4] : (uint8_t) New Route
Message1 : byte[5] : (uint8_t) Final Checkpoint
Message1 : byte[6] : (uint8_t) Checkpoint Number
Message1 : byte[7] : (uint8_t) Frame Number
Message2 : byte[0-1] : (uint16_t) Total Distance
Message2 : byte[2] : (uint8_t) Frame Number
0x386 Error Message
0x3C6 Mode (Free/Home/GPS)
byte[0] : (uint8_t) Mode
0x416 Power Up
byte[0] : (char) Version
Sensor Controller Communication Table
Message Number Purpose Data layout
0x0D3 Heartbeat Ack (Response to 0x040)
0x1C3 Front/Rear Sensor Data
byte[0] : (uint8_t) Left Sensor Data
byte[1] : (uint8_t) Middle Sensor Data
byte[2] : (uint8_t) Right Sensor Data
byte[3] : (uint8_t) Rear Sensor Data
0x303 Other Sensor Data
byte[0] : (uint8_t) Nattery Health Data
byte[1] : (uint8_t) Light Sensor Data
0x383 Error Message
0x413 Power Up
byte[0] : (char) Version
I/O Controller Communication Table
Message Number Purpose Data layout
0x047 Hardware Reset
0x0D7 Heartbeat Ack (Response to 0x082)
0x117 Pause Car
0x157 Resume Car
0x387 Error Message
0x3C7 Mode (Free/Home/GPS)
byte[0] : (uint8_t) Mode
0x417 Power Up
byte[0] : (char) Version

Testing & Technical Challenges

Sl. No Test Case Test Description Result

Challenges and Learning

Future Enhancement

Conclusion

Project Video

Project Source Code

References

Acknowledgement

References Used

  1. Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.
  2. en.wikipedia.org/