15namespace perception_msgs {
17namespace object_access {
24 inline double getX(
const ObjectState& state) {
26 return state.continuous_state[
indexX(state.model_id)];
38 inline double getX(
const T& obj) {
39 return getX(obj.state);
48 inline double getY(
const ObjectState& state) {
50 return state.continuous_state[
indexY(state.model_id)];
61 inline double getY(
const T& obj) {
62 return getY(obj.state);
71 inline double getZ(
const ObjectState& state) {
73 return state.continuous_state[
indexZ(state.model_id)];
84 inline double getZ(
const T& obj) {
85 return getZ(obj.state);
96 return state.continuous_state[
indexVelLon(state.model_id)];
106 template <
typename T>
119 return state.continuous_state[
indexVelLat(state.model_id)];
129 template <
typename T>
142 return state.continuous_state[
indexAccLon(state.model_id)];
152 template <
typename T>
165 return state.continuous_state[
indexAccLat(state.model_id)];
175 template <
typename T>
186 inline double getRoll(
const ObjectState& state) {
188 return state.continuous_state[
indexRoll(state.model_id)];
198 template <
typename T>
211 return state.continuous_state[
indexRollRate(state.model_id)];
221 template <
typename T>
234 return state.continuous_state[
indexPitch(state.model_id)];
244 template <
typename T>
267 template <
typename T>
278 inline double getYaw(
const ObjectState& state) {
280 return state.continuous_state[
indexYaw(state.model_id)];
290 template <
typename T>
303 return state.continuous_state[
indexYawRate(state.model_id)];
313 template <
typename T>
336 template <
typename T>
359 template <
typename T>
382 template <
typename T>
405 template <
typename T>
418 return state.continuous_state[
indexWidth(state.model_id)];
428 template <
typename T>
441 return state.continuous_state[
indexLength(state.model_id)];
451 template <
typename T>
464 return state.continuous_state[
indexHeight(state.model_id)];
474 template <
typename T>
499 template <
typename T>
522 template <
typename T>
545 template <
typename T>
568 template <
typename T>
594 template <
typename T>
620 template <
typename T>
Object state sanity checks.
void sanityCheckContinuousState(const ObjectState &state)
Perform sanity check on continuous state of given object state.
void sanityCheckDiscreteState(const ObjectState &state)
Perform sanity check on discrete state of given object state.
double getSteeringAngleAck(const ObjectState &state)
Get the ackermann steering angle for a given object state.
double getZ(const ObjectState &state)
Get the z-position for a given object state.
double getHeight(const ObjectState &state)
Get the height for a given object state.
double getRoll(const ObjectState &state)
Get the roll for a given object state.
double getYawRate(const ObjectState &state)
Get the yaw-rate for a given object state.
double getVelLon(const ObjectState &state)
Get the longitudinal velocity for a given object state.
uint8_t getTurnIndicator(const ObjectState &state)
Get the turn indicator state for a given object state.
uint8_t getBrakeLight(const ObjectState &state)
Get the brake light state for a given object state.
double getSteeringAngleRear(const ObjectState &state)
Get the rear wheel angle for a given object state.
uint8_t getTrafficLightState(const ObjectState &state)
Get the traffic light state for a given object state.
double getAccLon(const ObjectState &state)
Get the longitudinal acceleration for a given object state.
double getRollRate(const ObjectState &state)
Get the roll-rate for a given object state.
double getSteeringAngleFront(const ObjectState &state)
Get the front wheel angle for a given object state.
double getPitchRate(const ObjectState &state)
Get the pitch-rate for a given object state.
double getPitch(const ObjectState &state)
Get the pitch for a given object state.
double getYaw(const ObjectState &state)
Get the yaw for a given object state.
uint8_t getReverseLight(const ObjectState &state)
Get the reverse light state for a given object state.
double getAccLat(const ObjectState &state)
Get the lateral acceleration for a given object state.
double getY(const ObjectState &state)
Get the y-position for a given object state.
bool getStandstill(const ObjectState &state)
Get standstill indication for a given object state.
double getSteeringAngleRateAck(const ObjectState &state)
Get the steering angle rate for a given object state.
double getWidth(const ObjectState &state)
Get the width for a given object state.
double getX(const ObjectState &state)
Get the x-position for a given object state.
double getLength(const ObjectState &state)
Get the length for a given object state.
uint8_t getTrafficLightType(const ObjectState &state)
Get the traffic light type for a given object state.
double getVelLat(const ObjectState &state)
Get the longitudinal velocity for a given object state.
Object state vector indices based on state model.
int indexBrakeLight(const unsigned char &model_id)
Get the vector-index that stores the brake light state for a given model-id.
int indexRollRate(const unsigned char &model_id)
Get the vector-index that stores the roll rate for a given model-id.
int indexVelLon(const unsigned char &model_id)
Get the vector-index that stores the longitudinal velocity for a given model-id.
int indexWidth(const unsigned char &model_id)
Get the vector-index that stores the width for a given model-id.
int indexRoll(const unsigned char &model_id)
Get the vector-index that stores the roll for a given model-id.
int indexLength(const unsigned char &model_id)
Get the vector-index that stores the length for a given model-id.
int indexPitchRate(const unsigned char &model_id)
Get the vector-index that stores the pitch rate for a given model-id.
int indexYawRate(const unsigned char &model_id)
Get the vector-index that stores the yaw-rate for a given model-id.
int indexHeight(const unsigned char &model_id)
Get the vector-index that stores the height for a given model-id.
int indexVelLat(const unsigned char &model_id)
Get the vector-index that stores the lateral velocity for a given model-id.
int indexTurnIndicator(const unsigned char &model_id)
Get the vector-index that stores the turn indicator state for a given model-id.
int indexY(const unsigned char &model_id)
Get the vector-index that stores the y-position for a given model-id.
int indexSteeringAngleFront(const unsigned char &model_id)
Get the vector-index that stores the front wheel angle for a given model-id.
int indexSteeringAngleRear(const unsigned char &model_id)
Get the vector-index that stores the rear wheel angle for a given model-id.
int indexReverseLight(const unsigned char &model_id)
Get the vector-index that stores the reverse light state for a given model-id.
int indexZ(const unsigned char &model_id)
Get the vector-index that stores the z-position for a given model-id.
int indexAccLon(const unsigned char &model_id)
Get the vector-index that stores the longitudinal acceleration for a given model-id.
int indexStandstill(const unsigned char &model_id)
Get the vector-index that stores the standstill indication for a given model-id.
int indexTrafficLightType(const unsigned char &model_id)
Get the vector-index that stores the traffic light type for a given model-id.
int indexSteeringAngleRateAck(const unsigned char &model_id)
Get the vector-index that stores the steering angle rate for a given model-id.
int indexPitch(const unsigned char &model_id)
Get the vector-index that stores the pitch for a given model-id.
int indexAccLat(const unsigned char &model_id)
Get the vector-index that stores the lateral acceleration for a given model-id.
int indexSteeringAngleAck(const unsigned char &model_id)
Get the vector-index that stores the ackermann steering angle for a given model-id.
int indexX(const unsigned char &model_id)
Get the vector-index that stores the x-position for a given model-id.
int indexTrafficLightState(const unsigned char &model_id)
Get the vector-index that stores the traffic light state for a given model-id.
int indexYaw(const unsigned char &model_id)
Get the vector-index that stores the yaw for a given model-id.