16namespace perception_msgs {
18namespace object_access {
22 const std::string kExceptionUnknownModel =
"Unknown model ID: ";
31 return state.continuous_state.size();
55 return EGO::CONTINUOUS_STATE_SIZE;
56 case EGORWS::MODEL_ID:
57 return EGORWS::CONTINUOUS_STATE_SIZE;
58 case ISCACTR::MODEL_ID:
59 return ISCACTR::CONTINUOUS_STATE_SIZE;
60 case HEXAMOTION::MODEL_ID:
61 return HEXAMOTION::CONTINUOUS_STATE_SIZE;
62 case TRAFFICLIGHT::MODEL_ID:
63 return TRAFFICLIGHT::CONTINUOUS_STATE_SIZE;
65 throw std::invalid_argument(kExceptionUnknownModel + std::to_string(model_id));
76 return state.discrete_state.size();
100 return EGO::DISCRETE_STATE_SIZE;
101 case EGORWS::MODEL_ID:
102 return EGORWS::DISCRETE_STATE_SIZE;
103 case ISCACTR::MODEL_ID:
104 return ISCACTR::DISCRETE_STATE_SIZE;
105 case HEXAMOTION::MODEL_ID:
106 return HEXAMOTION::DISCRETE_STATE_SIZE;
107 case TRAFFICLIGHT::MODEL_ID:
108 return TRAFFICLIGHT::DISCRETE_STATE_SIZE;
110 throw std::invalid_argument(kExceptionUnknownModel + std::to_string(model_id));
122 if (!state.continuous_state_covariance.empty())
return state.continuous_state_covariance.size();
134 template <
typename T>
158 if (state.continuous_state_covariance.empty())
return;
160 state.continuous_state_covariance.at(n * i + j) = CONTINUOUS_STATE_COVARIANCE_UNKNOWN;
int getDiscreteStateSize(const ObjectState &state)
Get the discrete state size for a given object state.
void setContinuousStateCovarianceToUnknownAt(ObjectState &state, const unsigned int i, const unsigned int j)
Set the continuous state covariance to unknown at (i,j) for a given object state. Empty storage remai...
int getContinuousStateSize(const ObjectState &state)
Get the continuous state size for a given object state.
int getContinuousStateCovarianceSize(const ObjectState &state)
Get the continuous state covariance size for a given object state. Empty storage exposes the full mod...