package pjisuv_msgs

import (
	"github.com/bluenviron/goroslib/v2/pkg/msg"
	"github.com/bluenviron/goroslib/v2/pkg/msgs/geometry_msgs"
	"github.com/bluenviron/goroslib/v2/pkg/msgs/std_msgs"
)

type AutoDrivingCommand struct {
	msg.Package    `ros:"nox_msgs"`
	Header         std_msgs.Header
	VehicleId      int16
	TargetSteering float64
	TargetSpeed    float64
}
type Chassis struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	VehicleId   int16
	Steering    float64
	Speed       float64
}
type Command struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	Cmd         string
}

type ControllerLog struct {
	msg.Package `ros:"nox_msgs"`
}
type EsrTrack struct {
	msg.Package       `ros:"nox_msgs"`
	Header            std_msgs.Header
	Canmsg            string
	TrackID           uint8 `rosname:"track_ID"`
	TrackLatRate      float32
	TrackGroupChanged bool
	TrackStatus       uint8
	TrackAngle        float32
	TrackRange        float32
	TrackBridgeObject bool
	TrackRollingCount bool
	TrackWidth        float32
	TrackRangeAccel   float32
	TrackMedRangeMode uint8
	TrackRangeRate    float32
}
type EsrTrackArray struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	Esrtrack    []EsrTrack
}
type GPSData struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	Longitude   float64
	Latitude    float64
	Heading     float64
	Roll        float64
	Pitch       float64
	V           geometry_msgs.Vector3
	A           geometry_msgs.Vector3
	W           geometry_msgs.Vector3
	State       int32
}
type Lane struct {
	msg.Package     `ros:"nox_msgs"`
	msg.Definitions `ros:"uint8 TYPE_UNDEFINED=0,uint8 TYPE_WHITE=16,uint8 TYPE_YELLOW=32,uint8 TYPE_SOLID=1,uint8 TYPE_DASHED=2,uint8 TYPE_DOUBLE=3"`
	Points          []geometry_msgs.Vector3
	Type            uint8
	Reliability     int32
}

type Lanes struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	Lanes       []Lane
	Position    float64
}

type Location struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	X           float64
	Y           float64
	Z           float64
	Yaw         float64
	Pitch       float64
	Roll        float64
}

type Navigation struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	State       int64
	Points      []NaviPoint
}
type NaviPoint struct {
	msg.Package  `ros:"nox_msgs"`
	X            float64
	Y            float64
	Z            float64
	Yaw          float64
	Speed        float64
	Acceleration float64
}

type Obstacle struct {
	msg.Package `ros:"nox_msgs"`
	Position    geometry_msgs.Point
	Orientation geometry_msgs.Quaternion
	Dimensions  geometry_msgs.Vector3
	Velocity    geometry_msgs.Vector3
	ConvexHull  geometry_msgs.Polygon `rosname:"convexHull"`
	Label       string
	Reliability int32
}
type ObstacleList struct {
	msg.Package     `ros:"nox_msgs"`
	msg.Definitions `ros:"uint8 LIDAR=1,uint8 RADAR=2,uint8 RASTER=16,uint8 OBJECT=32,uint8 UNDEFINED=0"`
	Header          std_msgs.Header
	Obstacles       []Obstacle
	Type            uint8
}
type ObstacleSet struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	Lists       []ObstacleList
}
type Road struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	Blocks      []RoadBlock
	Status      int32
}

type RoadBlock struct {
	msg.Package `ros:"nox_msgs"`
	Points      []RoadPoint
	TargetIndex int32
	MinSpeed    float64 `rosname:"minSpeed"`
	MaxSpeed    float64 `rosname:"maxSpeed"`
}
type RoadPoint struct {
	msg.Package `ros:"nox_msgs"`
	X           float64
	Y           float64
	Z           float64
	Yaw         float64
}

type SrrTrack struct {
	msg.Package           `ros:"nox_msgs"`
	msg.Definitions       `ros:"uint8 CAN_TX_DETECT_VALID_LEVEL_Suspect_Detection=0,uint8 CAN_TX_DETECT_VALID_LEVEL_Level_1=1,uint8 CAN_TX_DETECT_VALID_LEVEL_Level_2=2,uint8 CAN_TX_DETECT_VALID_LEVEL_Level_3=3,uint8 CAN_TX_DETECT_VALID_LEVEL_Level_4=4,uint8 CAN_TX_DETECT_VALID_LEVEL_Level_5=5,uint8 CAN_TX_DETECT_VALID_LEVEL_Level_6=6,uint8 CAN_TX_DETECT_VALID_LEVEL_Level_7=7,bool CAN_TX_DETECT_STATUS_No_Data=0,bool CAN_TX_DETECT_STATUS_Valid_Data_Present=1"`
	Header                std_msgs.Header
	CANTXDETECTVALIDLEVEL uint8   `rosname:"CAN_TX_DETECT_VALID_LEVEL"`
	CANTXDETECTSTATUS     bool    `rosname:"CAN_TX_DETECT_STATUS"`
	CANTXDETECTRANGERATE  float32 `rosname:"CAN_TX_DETECT_RANGE_RATE"`
	CANTXDETECTRANGE      float32 `rosname:"CAN_TX_DETECT_RANGE"`
	CANTXDETECTANGLE      float32 `rosname:"CAN_TX_DETECT_ANGLE"`
	CANTXDETECTAMPLITUDE  float32 `rosname:"CAN_TX_DETECT_AMPLITUDE"`
}
type SrrTrackArray struct {
	msg.Package `ros:"nox_msgs"`
	Header      std_msgs.Header
	Srrtrack    []SrrTrack
}

type Status struct {
	msg.Package     `ros:"nox_msgs"`
	msg.Definitions `ros:"uint32 UNDEFINED=0,uint32 BASIC_MASK=4026531840,uint32 NORMAL=268435456,uint32 OFFLINE=536870912,uint32 DISABLE=805306368,uint32 WORKING_MASK=251658240,uint32 FREE=16777216,uint32 BUSY=33554432,uint32 WAITING=50331648,uint32 EXTRA_MASK=255"`
	Header          std_msgs.Header
	Name            string
	Id              int32
	State           uint32
}
