Skip to content

Commit e7f2fe0

Browse files
New Branch and update of the necessary changes from PR "Extension of the hostVehicleData #441" (before it broke down).
Signed-off-by: Nader Thomas <thomas.nader@bmw.de> Signed-off-by: spider <Thomas.Nader@bmw.de> Signed-off-by: Thomas Nader <Thomas.Nader@bmw.de>
1 parent fe63661 commit e7f2fe0

File tree

2 files changed

+311
-6
lines changed

2 files changed

+311
-6
lines changed

osi_common.proto

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ message StatePoint
553553
//
554554
optional Orientation3d orientation = 3;
555555
}
556+
556557
//
557558
// \brief Detailed WavelengthRange message.
558559
//
@@ -579,3 +580,57 @@ message WavelengthData
579580
//
580581
optional double samples_number = 3;
581582
}
583+
584+
//
585+
// \brief A description for the positions of the pedals.
586+
//
587+
message Pedalry
588+
{
589+
// Position of the acceleration-pedal.
590+
// Range: 0-1 (Unpressed - fully pressed)
591+
//
592+
optional double pedal_position_acceleration = 1;
593+
594+
// Position of the brake-pedal.
595+
// Range: 0-1 (Unpressed - fully pressed)
596+
//
597+
optional double pedal_position_brake = 2;
598+
599+
// Position of the clutch-pedal.
600+
// Range: 0-1 (Unpressed - fully pressed)
601+
//
602+
optional double pedal_position_clutch = 3;
603+
}
604+
605+
//
606+
// A description of the steering wheel.
607+
//
608+
message VehicleSteeringWheel
609+
{
610+
// Angle of the steering wheel.
611+
// Zero means the steering wheel is in its center position, a positive value
612+
// means the steering wheel is turned to the left and a negative value
613+
// means the steering wheel is turned to the right of the center position.
614+
//
615+
// Unit: rad
616+
//
617+
optional double angle = 1;
618+
619+
// Angular speed of the steering wheel.
620+
// Zero means the steering wheel stays in its position, a positive value
621+
// means the steering wheel is turned to the left and a negative value
622+
// means the steering wheel is turned to the right.
623+
//
624+
// Unit: rad/s
625+
//
626+
optional double angular_speed = 2;
627+
628+
// Torque of the steering wheel to the hand.
629+
// Zero means there is no force from the steering wheel to the driver`s hands.
630+
// A positive value means the steering wheel would turn to the left without driver`s forces
631+
// and a negative value means the steering wheel would turn to the right without driver`s forces.
632+
//
633+
// Unit: N*m
634+
//
635+
optional double torque = 3;
636+
}

osi_hostvehicledata.proto

Lines changed: 256 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,281 @@ syntax = "proto2";
22

33
option optimize_for = SPEED;
44

5+
import "osi_version.proto";
56
import "osi_common.proto";
67

78
package osi3;
89

10+
// \brief Host vehicle data is about the perception of the vehicle about it's own, internal states.
11+
// It can be understood as an interface container for restbussimulation signals.
12+
// If there is a duplication with values from the rest of SensorView or SensorData, than these shall be taken.
913
//
10-
// \brief Interface for host vehicle data that is available to sensors and
11-
// other functions due to host vehicle's internal communication.
14+
// It consists of different messages categorizing the vehicle in:
15+
// Vehicle-Basics, Vehicle-Powertrain, Vehicle-SteeringWheel, Vehicle-Wheels, Vehicle-Localization.
1216
//
1317
// \image html OSI_HostVehicle.svg
1418
//
15-
// All coordinates and orientations are relative to the global ground truth
16-
// coordinate system.
17-
//
1819
message HostVehicleData
1920
{
21+
// The interface version used by the sender.
22+
//
23+
optional InterfaceVersion version = 10;
24+
25+
// The timestamp of the host vehicle data. Zero time is arbitrary but must be
26+
// identical for all messages. Zero time does not need to coincide with
27+
// the unix epoch. Recommended is the starting time point of the
28+
// simulation or measurement.
29+
//
30+
// \note This is the point in time that the host vehicle data message becomes
31+
// available as snapshot from the board net information.
32+
//
33+
optional Timestamp timestamp = 11;
34+
35+
// Deprecated: Will be removed in next major release. Moved to VehiclePositionAndKinematics.
2036
// Current estimated location based on GPS- and related navigation sensors.
2137
//
2238
// \note Note that dimension and base_polygon need not be set.
2339
//
2440
optional BaseMoving location = 1;
2541

26-
// Current estimated location error based on GPS- and related navigation
42+
// Deprecated: Will be removed in next major release. Moved to VehiclePositionAndKinematics.
43+
// Current estimated location error based on GPS- and related navigation
2744
// sensors.
2845
//
2946
// \note Note that dimension and base_polygon need not be set.
3047
//
3148
optional BaseMoving location_rmse = 2;
49+
50+
// The basic parameters of the vehicle.
51+
//
52+
optional VehicleBasics vehicle_basics = 3;
53+
54+
// Interface regarding the powertrain.
55+
//
56+
optional VehiclePowertrain vehicle_powertrain = 4;
57+
58+
// Interface regarding the steering wheel.
59+
//
60+
optional VehicleSteeringWheel vehicle_steering_wheel = 5;
61+
62+
// Interface regarding the wheels.
63+
//
64+
optional VehicleWheels vehicle_wheels = 6;
65+
66+
// Interface regarding the localization.
67+
//
68+
optional VehiclePositionAndKinematics vehicle_position_and_kinematics = 7;
69+
70+
//
71+
// \brief The absolute base parameters of the vehicle.
72+
//
73+
message VehicleBasics
74+
{
75+
// The total mass of the vehicle (curb weight).
76+
//
77+
// Unit: kg
78+
//
79+
// \par Reference:
80+
// Paragraph 42 of the German Road Traffic Admission Regulations (StVZO).
81+
//
82+
optional double curb_weight = 1;
83+
}
84+
85+
//
86+
// \brief State description of the powertrain.
87+
//
88+
message VehiclePowertrain
89+
{
90+
// The positions of the pedals.
91+
//
92+
optional Pedalry pedalry = 1;
93+
94+
// The actual gear of the transmission.
95+
// E.g. a gear lever can be in "D" and transmission in "4", but not the
96+
// other way around.
97+
//
98+
// The sign of this field is linked to the gear's mode as following:
99+
// - zero: neutral position
100+
// - positive: driving forward mode
101+
// - negative: reverse mode (generally -1, but few vehicles have several
102+
// reverse mode gears)
103+
//
104+
optional int32 gear_transmission = 2;
105+
106+
// Information about the motor(s).
107+
//
108+
repeated Motor motor = 3;
109+
110+
//
111+
// \brief A description for the positions of the pedals.
112+
//
113+
message Motor
114+
{
115+
// The type of the motor.
116+
//
117+
optional Type type = 1;
118+
119+
// Rounds per minute of the engine. RPM can be from E-Motor/ Engine.
120+
//
121+
// Unit: 1/min
122+
//
123+
optional double rpm = 2;
124+
125+
// Torque in Nm. It can either be from Engine/E-Motor or combined Torque values.
126+
//
127+
// Unit: N*m
128+
//
129+
optional double torque = 3;
130+
131+
// Definition which type of motor is used.
132+
//
133+
enum Type
134+
{
135+
// The powertrain mode is unknown.
136+
//
137+
TYPE_UNKNOWN = 0;
138+
139+
// It is another powertrain mode.
140+
//
141+
TYPE_OTHER = 1;
142+
143+
// A motor working after the principle of Nicolaus Otto.
144+
//
145+
TYPE_OTTO = 2;
146+
147+
// A motor working after the principle of Rudolf Diesel.
148+
//
149+
TYPE_DIESEL = 3;
150+
151+
// A motor working electric.
152+
//
153+
TYPE_ELECTRIC = 4;
154+
}
155+
}
156+
}
157+
158+
//
159+
// \brief The focus here is on the description of the wheels.
160+
//
161+
message VehicleWheels
162+
{
163+
// Description of each wheel.
164+
//
165+
// \note OSI uses singular instead of plural for repeated field names.
166+
//
167+
repeated WheelData wheel_data = 1;
168+
169+
//
170+
// \brief The focus here is on the description of a wheel.
171+
//
172+
message WheelData
173+
{
174+
// The axle which contains this wheel. A value of 0 represents the
175+
// front-most axle of the vehicle with higher numbers incrementing
176+
// towards the rear-most axle.
177+
//
178+
optional uint32 axle = 1;
179+
180+
// The index of the wheel on the axle, counting in the direction
181+
// of positive-y, that is, right-to-left.
182+
//
183+
// For example, on a standard 2-axle, 4-wheel car, the rear-right
184+
// wheel would be (axle=1, index=0).
185+
// This concept works also for twin tires.
186+
//
187+
optional uint32 index = 2;
188+
189+
// Rotation rate of the wheel based on the processed output of the hall sensor measurements at the wheel.
190+
// The rotation rate around the y-axis with respect to the wheel's coordinate system.
191+
//
192+
// Unit: rad/s.
193+
//
194+
// The sign convention is defined using the right-hand rule.
195+
// It is applied on the y-axis of the vehicle's reference system (center of bounding box).
196+
// Counterclockwise is positive and clockwise is negative.
197+
//
198+
// \image html OSI_RotationRate.svg
199+
// \note The vehicle's reference coordinate system is only used to determine the sign convention of the rotation rate.
200+
//
201+
optional double rotation_rate = 3;
202+
203+
// Contains the longitudinal, measured slip of the tire.
204+
// \par References:
205+
// - https://www.kfz-tech.de/Biblio/Formelsammlung/Schlupf.htm
206+
//
207+
// Unit: %
208+
//
209+
// The sign convention is defined using the right-hand rule.
210+
// It is applied on the y-axis of the vehicle's reference system (center of bounding box).
211+
// Counterclockwise is positive and clockwise is negative.
212+
//
213+
optional double slip = 4;
214+
}
215+
}
216+
217+
//
218+
// \brief Current calculated and estimated location that can be based on GNSS- and related navigation sensors,
219+
// but this message does not contain the single sensor values of the sensorics.
220+
//
221+
// This message contains the most accurate information the vehicle knows about its positioning and kinematics
222+
// available on the board net.
223+
// Because of this the values can differ from the "true" values calculated out of
224+
// GroundTruth::proj_string, GroundTruth::MovingObject::BaseMoving::position, GroundTruth::host_vehicle_id.
225+
//
226+
message VehiclePositionAndKinematics
227+
{
228+
// Geodetic origin of the ENU (east-north-up) cartesian coordinate system regarding WGS84.
229+
//
230+
optional GeodeticPosition enu_origin = 1;
231+
232+
// The host vehicle location and kinematics at \c HostVehicleData::timestamp.
233+
//
234+
// \note If \c HostVehicleData::enu_origin is specified, then the \c BaseMoving parent frame used by
235+
// \c HostVehicleData::location is the ENU frame according to ISO8855 with the geodetic origin of
236+
// \c HostVehicleData::enu_origin. Otherwise \c BaseMoving parent frame is an arbitrary cartesian coordinate system
237+
// with its axis conventions following ISO8855.
238+
//
239+
// \note Note that dimension and base_polygon need not be set.
240+
//
241+
optional BaseMoving base = 2;
242+
243+
// The host vehicle location and kinematics root-mean-square errors at \c HostVehicleData::timestamp.
244+
//
245+
// \note If \c HostVehicleData::enu_origin is specified, then the \c BaseMoving parent frame used by
246+
// \c HostVehicleData::location is the ENU frame according to ISO8855 with the geodetic origin of
247+
// \c HostVehicleData::enu_origin. Otherwise \c BaseMoving parent frame is an arbitrary cartesian coordinate system
248+
// with its axis conventions following ISO8855.
249+
//
250+
// \note Note that dimension and base_polygon need not be set.
251+
//
252+
optional BaseMoving base_rmse = 3;
253+
254+
//
255+
// \brief The geodetic position of the vehicle.
256+
// In which context it is used has to be specified in the concrete field.
257+
//
258+
message GeodeticPosition
259+
{
260+
// Longitude in decimal degrees regarding WGS84.
261+
//
262+
// Unit: Degree
263+
// Range: [-180; 180]
264+
//
265+
optional double longitude = 1;
266+
267+
// Latitude in decimal degrees regarding WGS84.
268+
//
269+
// Unit: Degree
270+
// Range: [-90; 90]
271+
//
272+
optional double latitude = 2;
273+
274+
// Height above sea level regarding EGM96.
275+
//
276+
// Unit: m
277+
// Range: [-300; 10000]
278+
//
279+
optional double altitude = 3;
280+
}
281+
}
32282
}

0 commit comments

Comments
 (0)