source: pacpusframework/branches/2.0-beta1/include/Pacpus/structure/structureCanMobileye.h@ 89

Last change on this file since 89 was 89, checked in by morasjul, 11 years ago

PACPUS 2.0 Beta deployed in new branch

Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support

  • Property svn:executable set to *
File size: 3.3 KB
Line 
1/*********************************************************************
2// created: 2011/06/03 - 18:00
3// filename: structureCanMobileye.h
4//
5// author: Paul George
6// Copyright Heudiasyc UMR UTC/CNRS 6599
7//
8// version: $Id: $
9//
10// purpose: Description of the CAN structures of Mobileye
11*********************************************************************/
12
13#ifndef __STRUCTURECANMOBILEYE_H__
14#define __STRUCTURECANMOBILEYE_H__
15
16#include "kernel/road_time.h"
17
18#define MOBILEYE_MAX_OBSTACLE_COUNT 10
19#define OBSTACLE_MAX_X 250.0
20#define OBSTACLE_MAX_Y 31.93
21
22enum LaneValidStatus
23{
24 LANE_UNDEFINED = 0,
25 LANE_NEW = 1,
26 LANE_VALID = 2,
27 LANE_INVALID = 3
28};
29
30// corresponding CAN frame = 0x731,0x732
31typedef struct {
32 LaneValidStatus LaneValid;// 0 : undefined, 1 : new lane, 2 : valid lane, 3 : invalid lane
33 double LaneCurvature; //
34 double LaneHeading; //
35 double LaneOffset; //
36 int LaneConf; // Confidence : 0 -> 3
37}StructMobileyeLane;
38
39typedef struct{
40 road_time_t time;
41 road_timerange_t timerange;
42 StructMobileyeLane d;
43}TimestampedStructMobileyeLane;
44
45// corresponding CAN frame = 0x7FF
46typedef struct {
47 int obstacleCount; // Nombre d'obstacles
48}StructMobileyeObstaclesHeader;
49
50typedef struct{
51 road_time_t time;
52 road_timerange_t timerange;
53 StructMobileyeObstaclesHeader d;
54}TimestampedStructMobileyeObstaclesHeader;
55
56enum ObstacleType
57{
58 OBSTACLE_VEHICLE = 0,
59 OBSTACLE_TRUCK = 1,
60 OBSTACLE_BIKE = 2,
61 OBSTACLE_PEDESTRIAN = 3,
62 OBSTACLE_BICYCLE = 4
63};
64
65enum ObstacleStatus
66{
67 OBSTACLE_UNDEFINED = 0,
68 OBSTACLE_STANDING = 1,
69 OBSTACLE_STOPPED = 2,
70 OBSTACLE_MOVING = 3,
71 OBSTACLE_ONCOMING = 4,
72 OBSTACLE_PARKED = 5
73};
74
75// corresponding CAN frame = 0x739,0x73C,0x73F,0x742,0x745,0x748,0x74B,0x74E,0x751,0x754
76typedef struct {
77 int id; //
78 double x; //
79 double y; //
80 ObstacleType type; //
81 ObstacleStatus status; // 0 : Undefined, 1 : Standing, 2 : Stopped, 3 : Moving, 4 : Oncoming, 5 : Parked
82}StructMobileyeObstacle1;
83
84typedef struct{
85 road_time_t time;
86 road_timerange_t timerange;
87 StructMobileyeObstacle1 d;
88}TimestampedStructMobileyeObstacle1;
89
90// corresponding CAN frame = 0x73A,0x73D,0x740,0x743,0x746,0x749,0x74C,0x74F,0x752,0x755
91typedef struct {
92 double width; //
93 int age; //
94}StructMobileyeObstacle2;
95
96typedef struct{
97 road_time_t time;
98 road_timerange_t timerange;
99 StructMobileyeObstacle2 d;
100}TimestampedStructMobileyeObstacle2;
101
102typedef struct {
103 StructMobileyeLane rightLane; // 40 bytes
104 StructMobileyeLane leftLane; // 40 bytes
105 StructMobileyeObstaclesHeader obstaclesHeader; // 8 bytes
106 StructMobileyeObstacle1 obstacles1[MOBILEYE_MAX_OBSTACLE_COUNT]; // 10 * 32 = 320 bytes
107 StructMobileyeObstacle2 obstacles2[MOBILEYE_MAX_OBSTACLE_COUNT]; // 10 * 16 = 160 bytes ; total = 568 bytes
108} MobileyeDatas;
109
110typedef struct{
111 unsigned int LaneType;
112 unsigned int LaneQuality;
113 unsigned int LaneDegree;
114 double LanePositionC0;
115 //double LaneHeadingC1;
116 double LaneCurvatureC2;
117 double LaneCurvatureDerivC3;
118 road_time_t TimeStamp;
119} LaneInfoPart1;
120
121typedef struct{
122 double LaneHeadingC1;
123 road_time_t TimeStamp;
124} LaneInfoPart2;
125
126typedef struct {
127 LaneInfoPart1 LanePart1;
128 LaneInfoPart2 LanePart2;
129} MobileyeLaneData;
130
131#endif
Note: See TracBrowser for help on using the repository browser.