package kinglong_msgs

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

// PerceptionObjects v2304
type PerceptionObjects struct {
	msg.Package `ros:"perception_msgs"`
	Header      Header
	Objs        []Object
	Cells       []ObstacleCell
}

type Object struct {
	msg.Package    `ros:"perception_msgs"`
	Id             uint32
	X              float32
	Y              float32
	Z              float32
	Vxrel          float32
	Vyrel          float32
	Xabs           float64
	Yabs           float64
	Vxabs          float32
	Vyabs          float32
	Width          float32
	Length         float32
	Height         float32
	Speed          float32
	Heading        float32
	Type           uint8
	Source         uint8
	Confidence     float32
	Age            uint32
	Velocitystatus uint8
	Cells          []ObstacleCell
}

type ObstacleCell struct {
	msg.Package `ros:"perception_msgs"`
	Idc         int32
	X           float64
	Y           float64
	Xg          float64
	Yg          float64
}

type PerceptionLocalization struct {
	msg.Package `ros:"perception_msgs"`

	Header      std_msgs.Header
	FrameUnmber uint64
	FusionLevel int8
	Status      int8
	Roll        float64
	Pitch       float64
	Yaw         float64
	RollStd     float32
	PitchStd    float32
	YawStd      float32

	Qw float64
	Qx float64
	Qy float64
	Qz float64

	AngularVelocityX float64
	AngularVelocityY float64
	AngularVelocityZ float64

	Latitude     float64
	Longitude    float64
	Altitude     float64
	LatitudeStd  float32
	LongitudeStd float32
	AltitudeStd  float32

	PositionX    float64
	PositionY    float64
	PositionZ    float64
	PositionXStd float32
	PositionYStd float32
	PositionZStd float32

	VelocityX    float64
	VelocityY    float64
	VelocityZ    float64
	VelocityXStd float32
	VelocityYStd float32
	VelocityZStd float32

	VelocityRx    float64
	VelocityRy    float64
	VelocityRz    float64
	VelocityRxStd float32
	VelocityRyStd float32
	VelocityRzStd float32

	AccelX float64
	AccelY float64
	AccelZ float64
}
