Implements Gateway for car controls

This commit is contained in:
2020-11-29 18:42:33 +01:00
parent b2ca7423ea
commit 843ada8357
6 changed files with 511 additions and 78 deletions

View File

@@ -1,6 +1,6 @@
package simulator
type SimulatorMsg struct {
type TelemetryMsg struct {
MsgType string `json:"msg_type"`
SteeringAngle float64 `json:"steering_angle"`
Throttle float64 `json:"throttle"`
@@ -13,3 +13,11 @@ type SimulatorMsg struct {
Time float64 `json:"time"`
Cte float64 `json:"cte"`
}
/* Json msg used to control cars. MsgType must be filled with "control" */
type ControlMsg struct {
MsgType string `json:"msg_type"`
Steering float32 `json:"steering"`
Throttle float32 `json:"throttle"`
Brake float32 `json:"brake"`
}