perception_interfaces 1.1.2
Loading...
Searching...
No Matches
Functions
state_setters.h File Reference

Setter functions for objects state members. More...

#include <perception_msgs_utils/impl/state_index.h>
#include <perception_msgs_utils/impl/checks.h>
#include <perception_msgs_utils/impl/utils.h>

Go to the source code of this file.

Functions

void perception_msgs::object_access::setX (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the x-position for a given object state.
 
template<typename T >
void perception_msgs::object_access::setX (T &obj, const double val, const bool reset_covariance=true)
 Set the x-position for a given template object that contains an object state.
 
void perception_msgs::object_access::setY (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the y-position for a given object state.
 
template<typename T >
void perception_msgs::object_access::setY (T &obj, const double val, const bool reset_covariance=true)
 Set the y-position for a given template object that contains an object state.
 
void perception_msgs::object_access::setZ (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the z-position for a given object state.
 
template<typename T >
void perception_msgs::object_access::setZ (T &obj, const double val, const bool reset_covariance=true)
 Set the z-position for a given template object that contains an object state.
 
void perception_msgs::object_access::setVelLon (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the longitdunial velocity for a given object state.
 
template<typename T >
void perception_msgs::object_access::setVelLon (T &obj, const double val, const bool reset_covariance=true)
 Set the longitudinal velocity for a given template object that contains an object state.
 
void perception_msgs::object_access::setVelLat (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the lateral velocity for a given object state.
 
template<typename T >
void perception_msgs::object_access::setVelLat (T &obj, const double val, const bool reset_covariance=true)
 Set the lateral velocity for a given template object that contains an object state.
 
void perception_msgs::object_access::setAccLon (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the longitudinal acceleration for a given object state.
 
template<typename T >
void perception_msgs::object_access::setAccLon (T &obj, const double val, const bool reset_covariance=true)
 Set the longitudinal acceleration for a given template object that contains an object state.
 
void perception_msgs::object_access::setAccLat (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the lateral acceleration for a given object state.
 
template<typename T >
void perception_msgs::object_access::setAccLat (T &obj, const double val, const bool reset_covariance=true)
 Set the lateral acceleration for a given template object that contains an object state.
 
void perception_msgs::object_access::setRoll (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the roll for a given object state.
 
template<typename T >
void perception_msgs::object_access::setRoll (T &obj, const double val, const bool reset_covariance=true)
 Set the roll for a given template object that contains an object state.
 
void perception_msgs::object_access::setRollRate (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the roll-rate for a given object state.
 
template<typename T >
void perception_msgs::object_access::setRollRate (T &obj, const double val, const bool reset_covariance=true)
 Set the roll-rate for a given template object that contains an object state.
 
void perception_msgs::object_access::setPitch (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the pitch for a given object state.
 
template<typename T >
void perception_msgs::object_access::setPitch (T &obj, const double val, const bool reset_covariance=true)
 Set the pitch for a given template object that contains an object state.
 
void perception_msgs::object_access::setPitchRate (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the pitch-rate for a given object state.
 
template<typename T >
void perception_msgs::object_access::setPitchRate (T &obj, const double val, const bool reset_covariance=true)
 Set the pitch-rate for a given template object that contains an object state.
 
void perception_msgs::object_access::setYaw (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the yaw for a given object state.
 
template<typename T >
void perception_msgs::object_access::setYaw (T &obj, const double val, const bool reset_covariance=true)
 Set the yaw for a given template object that contains an object state.
 
void perception_msgs::object_access::setYawRate (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the yaw-rate for a given object state.
 
template<typename T >
void perception_msgs::object_access::setYawRate (T &obj, const double val, const bool reset_covariance=true)
 Set the yaw-rate for a given template object that contains an object state.
 
void perception_msgs::object_access::setSteeringAngleAck (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the ackermann steering angle for a given object state.
 
template<typename T >
void perception_msgs::object_access::setSteeringAngleAck (T &obj, const double val, const bool reset_covariance=true)
 Set the ackermann steering angle for a given template object that contains an object state.
 
void perception_msgs::object_access::setSteeringAngleRateAck (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the ackermann steering angle rate for a given object state.
 
template<typename T >
void perception_msgs::object_access::setSteeringAngleRateAck (T &obj, const double val, const bool reset_covariance=true)
 Set the ackermann steering angle rate for a given template object that contains an object state.
 
void perception_msgs::object_access::setSteeringAngleFront (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the front wheel angle for a given object state.
 
template<typename T >
void perception_msgs::object_access::setSteeringAngleFront (T &obj, const double val, const bool reset_covariance=true)
 Set the front wheel angle for a given template object that contains an object state.
 
void perception_msgs::object_access::setSteeringAngleRear (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the rear wheel angle for a given object state.
 
template<typename T >
void perception_msgs::object_access::setSteeringAngleRear (T &obj, const double val, const bool reset_covariance=true)
 Set the rear wheel angle for a given template object that contains an object state.
 
void perception_msgs::object_access::setWidth (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the width for a given object state.
 
template<typename T >
void perception_msgs::object_access::setWidth (T &obj, const double val, const bool reset_covariance=true)
 Set the width for a given template object that contains an object state.
 
void perception_msgs::object_access::setLength (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the length for a given object state.
 
template<typename T >
void perception_msgs::object_access::setLength (T &obj, const double val, const bool reset_covariance=true)
 Set the length for a given template object that contains an object state.
 
void perception_msgs::object_access::setHeight (ObjectState &state, const double val, const bool reset_covariance=true)
 Set the height for a given object state.
 
template<typename T >
void perception_msgs::object_access::setHeight (T &obj, const double val, const bool reset_covariance=true)
 Set the height for a given template object that contains an object state.
 
void perception_msgs::object_access::setStandstill (ObjectState &state, const bool val)
 Set the standstill indication for a given object state.
 
template<typename T >
void perception_msgs::object_access::setStandstill (T &obj, const bool val)
 Set the standstill indication for a given template object that contains an object state.
 
void perception_msgs::object_access::setTurnIndicator (ObjectState &state, const uint8_t val)
 Set the turn indicator for a given object state.
 
template<typename T >
void perception_msgs::object_access::setTurnIndicator (T &obj, const uint8_t val)
 Set the turn indicator for a given template object that contains an object state.
 
void perception_msgs::object_access::setBrakeLight (ObjectState &state, const uint8_t val)
 Set the brake light for a given object state.
 
template<typename T >
void perception_msgs::object_access::setBrakeLight (T &obj, const uint8_t val)
 Set the brake light for a given template object that contains an object state.
 
void perception_msgs::object_access::setReverseLight (ObjectState &state, const uint8_t val)
 Set the reverse light for a given object state.
 
template<typename T >
void perception_msgs::object_access::setReverseLight (T &obj, const uint8_t val)
 Set the reverse light for a given template object that contains an object state.
 
void perception_msgs::object_access::setTrafficLightState (ObjectState &state, const uint8_t val)
 Set the traffic light state for a given object state.
 
template<typename T >
void perception_msgs::object_access::setTrafficLightState (T &obj, const uint8_t val)
 Set the traffic light state for a given template object that contains an object state.
 
void perception_msgs::object_access::setTrafficLightType (ObjectState &state, const uint8_t val)
 Set the traffic light type for a given object state.
 
template<typename T >
void perception_msgs::object_access::setTrafficLightType (T &obj, const uint8_t val)
 Set the traffic light type for a given template object that contains an object state.
 

Detailed Description

Setter functions for objects state members.

Definition in file state_setters.h.

Function Documentation

◆ setAccLat() [1/2]

void perception_msgs::object_access::setAccLat ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the lateral acceleration for a given object state.

Parameters
state
val
reset_covariance

Definition at line 189 of file state_setters.h.

189 {
191 const int idx = indexAccLat(state.model_id);
192 state.continuous_state[idx] = val;
193 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
194 }
void sanityCheckContinuousState(const ObjectState &state)
Perform sanity check on continuous state of given object state.
Definition checks.h:63
int indexAccLat(const unsigned char &model_id)
Get the vector-index that stores the lateral acceleration for a given model-id.
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.
Definition utils.h:153

◆ setAccLat() [2/2]

template<typename T >
void perception_msgs::object_access::setAccLat ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the lateral acceleration for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 205 of file state_setters.h.

205 {
206 setAccLat(obj.state, val, reset_covariance);
207 }
void setAccLat(ObjectState &state, const double val, const bool reset_covariance=true)
Set the lateral acceleration for a given object state.

◆ setAccLon() [1/2]

void perception_msgs::object_access::setAccLon ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the longitudinal acceleration for a given object state.

Parameters
state
val
reset_covariance

Definition at line 162 of file state_setters.h.

162 {
164 const int idx = indexAccLon(state.model_id);
165 state.continuous_state[idx] = val;
166 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
167 }
int indexAccLon(const unsigned char &model_id)
Get the vector-index that stores the longitudinal acceleration for a given model-id.

◆ setAccLon() [2/2]

template<typename T >
void perception_msgs::object_access::setAccLon ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the longitudinal acceleration for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 178 of file state_setters.h.

178 {
179 setAccLon(obj.state, val, reset_covariance);
180 }
void setAccLon(ObjectState &state, const double val, const bool reset_covariance=true)
Set the longitudinal acceleration for a given object state.

◆ setBrakeLight() [1/2]

void perception_msgs::object_access::setBrakeLight ( ObjectState &  state,
const uint8_t  val 
)
inline

Set the brake light for a given object state.

Parameters
state
val

Definition at line 623 of file state_setters.h.

623 {
625 const int idx = indexBrakeLight(state.model_id);
626 state.discrete_state[idx] = val;
627 }
void sanityCheckDiscreteState(const ObjectState &state)
Perform sanity check on discrete state of given object state.
Definition checks.h:83
int indexBrakeLight(const unsigned char &model_id)
Get the vector-index that stores the brake light state for a given model-id.

◆ setBrakeLight() [2/2]

template<typename T >
void perception_msgs::object_access::setBrakeLight ( T &  obj,
const uint8_t  val 
)
inline

Set the brake light for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val

Definition at line 637 of file state_setters.h.

637 {
638 setBrakeLight(obj.state, val);
639 }
void setBrakeLight(ObjectState &state, const uint8_t val)
Set the brake light for a given object state.

◆ setHeight() [1/2]

void perception_msgs::object_access::setHeight ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the height for a given object state.

Parameters
state
val
reset_covariance

Definition at line 549 of file state_setters.h.

549 {
551 const int idx = indexHeight(state.model_id);
552 state.continuous_state[idx] = val;
553 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
554 }
int indexHeight(const unsigned char &model_id)
Get the vector-index that stores the height for a given model-id.

◆ setHeight() [2/2]

template<typename T >
void perception_msgs::object_access::setHeight ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the height for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 565 of file state_setters.h.

565 {
566 setHeight(obj.state, val, reset_covariance);
567 }
void setHeight(ObjectState &state, const double val, const bool reset_covariance=true)
Set the height for a given object state.

◆ setLength() [1/2]

void perception_msgs::object_access::setLength ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the length for a given object state.

Parameters
state
val
reset_covariance

Definition at line 522 of file state_setters.h.

522 {
524 const int idx = indexLength(state.model_id);
525 state.continuous_state[idx] = val;
526 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
527 }
int indexLength(const unsigned char &model_id)
Get the vector-index that stores the length for a given model-id.

◆ setLength() [2/2]

template<typename T >
void perception_msgs::object_access::setLength ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the length for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 538 of file state_setters.h.

538 {
539 setLength(obj.state, val, reset_covariance);
540 }
void setLength(ObjectState &state, const double val, const bool reset_covariance=true)
Set the length for a given object state.

◆ setPitch() [1/2]

void perception_msgs::object_access::setPitch ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the pitch for a given object state.

Parameters
state
val
reset_covariance

Definition at line 273 of file state_setters.h.

273 {
275 double capped_val = val;
276 capped_val -= 2.0 * M_PI * std::floor((capped_val + M_PI) * (M_1_PI * 0.5));
277 if (capped_val <= -M_PI) capped_val += 2 * M_PI;
278 const int idx = indexPitch(state.model_id);
279 state.continuous_state[idx] = capped_val;
280 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
281 }
int indexPitch(const unsigned char &model_id)
Get the vector-index that stores the pitch for a given model-id.

◆ setPitch() [2/2]

template<typename T >
void perception_msgs::object_access::setPitch ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the pitch for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 292 of file state_setters.h.

292 {
293 setPitch(obj.state, val, reset_covariance);
294 }
void setPitch(ObjectState &state, const double val, const bool reset_covariance=true)
Set the pitch for a given object state.

◆ setPitchRate() [1/2]

void perception_msgs::object_access::setPitchRate ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the pitch-rate for a given object state.

Parameters
state
val
reset_covariance

Definition at line 303 of file state_setters.h.

303 {
305 const int idx = indexPitchRate(state.model_id);
306 state.continuous_state[idx] = val;
307 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
308 }
int indexPitchRate(const unsigned char &model_id)
Get the vector-index that stores the pitch rate for a given model-id.

◆ setPitchRate() [2/2]

template<typename T >
void perception_msgs::object_access::setPitchRate ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the pitch-rate for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 319 of file state_setters.h.

319 {
320 setPitchRate(obj.state, val, reset_covariance);
321 }
void setPitchRate(ObjectState &state, const double val, const bool reset_covariance=true)
Set the pitch-rate for a given object state.

◆ setReverseLight() [1/2]

void perception_msgs::object_access::setReverseLight ( ObjectState &  state,
const uint8_t  val 
)
inline

Set the reverse light for a given object state.

Parameters
state
val

Definition at line 647 of file state_setters.h.

647 {
649 const int idx = indexReverseLight(state.model_id);
650 state.discrete_state[idx] = val;
651 }
int indexReverseLight(const unsigned char &model_id)
Get the vector-index that stores the reverse light state for a given model-id.

◆ setReverseLight() [2/2]

template<typename T >
void perception_msgs::object_access::setReverseLight ( T &  obj,
const uint8_t  val 
)
inline

Set the reverse light for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val

Definition at line 661 of file state_setters.h.

661 {
662 setReverseLight(obj.state, val);
663 }
void setReverseLight(ObjectState &state, const uint8_t val)
Set the reverse light for a given object state.

◆ setRoll() [1/2]

void perception_msgs::object_access::setRoll ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the roll for a given object state.

Parameters
state
val
reset_covariance

Definition at line 216 of file state_setters.h.

216 {
218 double capped_val = val;
219 capped_val -= 2.0 * M_PI * std::floor((capped_val + M_PI) * (M_1_PI * 0.5));
220 if (capped_val <= -M_PI) capped_val += 2 * M_PI;
221 const int idx = indexRoll(state.model_id);
222 state.continuous_state[idx] = capped_val;
223 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
224 }
int indexRoll(const unsigned char &model_id)
Get the vector-index that stores the roll for a given model-id.

◆ setRoll() [2/2]

template<typename T >
void perception_msgs::object_access::setRoll ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the roll for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 235 of file state_setters.h.

235 {
236 setRoll(obj.state, val, reset_covariance);
237 }
void setRoll(ObjectState &state, const double val, const bool reset_covariance=true)
Set the roll for a given object state.

◆ setRollRate() [1/2]

void perception_msgs::object_access::setRollRate ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the roll-rate for a given object state.

Parameters
state
val
reset_covariance

Definition at line 246 of file state_setters.h.

246 {
248 const int idx = indexRollRate(state.model_id);
249 state.continuous_state[idx] = val;
250 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
251 }
int indexRollRate(const unsigned char &model_id)
Get the vector-index that stores the roll rate for a given model-id.

◆ setRollRate() [2/2]

template<typename T >
void perception_msgs::object_access::setRollRate ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the roll-rate for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 262 of file state_setters.h.

262 {
263 setRollRate(obj.state, val, reset_covariance);
264 }
void setRollRate(ObjectState &state, const double val, const bool reset_covariance=true)
Set the roll-rate for a given object state.

◆ setStandstill() [1/2]

void perception_msgs::object_access::setStandstill ( ObjectState &  state,
const bool  val 
)
inline

Set the standstill indication for a given object state.

Parameters
state
val

Definition at line 575 of file state_setters.h.

575 {
577 const int idx = indexStandstill(state.model_id);
578 state.discrete_state[idx] = val;
579 }
int indexStandstill(const unsigned char &model_id)
Get the vector-index that stores the standstill indication for a given model-id.

◆ setStandstill() [2/2]

template<typename T >
void perception_msgs::object_access::setStandstill ( T &  obj,
const bool  val 
)
inline

Set the standstill indication for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val

Definition at line 589 of file state_setters.h.

589 {
590 setStandstill(obj.state, val);
591 }
void setStandstill(ObjectState &state, const bool val)
Set the standstill indication for a given object state.

◆ setSteeringAngleAck() [1/2]

void perception_msgs::object_access::setSteeringAngleAck ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the ackermann steering angle for a given object state.

Parameters
state
val
reset_covariance

Definition at line 387 of file state_setters.h.

387 {
389 const int idx = indexSteeringAngleAck(state.model_id);
390 state.continuous_state[idx] = val;
391 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
392 }
int indexSteeringAngleAck(const unsigned char &model_id)
Get the vector-index that stores the ackermann steering angle for a given model-id.

◆ setSteeringAngleAck() [2/2]

template<typename T >
void perception_msgs::object_access::setSteeringAngleAck ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the ackermann steering angle for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 403 of file state_setters.h.

403 {
404 setSteeringAngleAck(obj.state, val, reset_covariance);
405 }
void setSteeringAngleAck(ObjectState &state, const double val, const bool reset_covariance=true)
Set the ackermann steering angle for a given object state.

◆ setSteeringAngleFront() [1/2]

void perception_msgs::object_access::setSteeringAngleFront ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the front wheel angle for a given object state.

Parameters
state
val
reset_covariance

Definition at line 441 of file state_setters.h.

441 {
443 const int idx = indexSteeringAngleFront(state.model_id);
444 state.continuous_state[idx] = val;
445 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
446 }
int indexSteeringAngleFront(const unsigned char &model_id)
Get the vector-index that stores the front wheel angle for a given model-id.

◆ setSteeringAngleFront() [2/2]

template<typename T >
void perception_msgs::object_access::setSteeringAngleFront ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the front wheel angle for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 457 of file state_setters.h.

457 {
458 setSteeringAngleFront(obj.state, val, reset_covariance);
459 }
void setSteeringAngleFront(ObjectState &state, const double val, const bool reset_covariance=true)
Set the front wheel angle for a given object state.

◆ setSteeringAngleRateAck() [1/2]

void perception_msgs::object_access::setSteeringAngleRateAck ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the ackermann steering angle rate for a given object state.

Parameters
state
val
reset_covariance

Definition at line 414 of file state_setters.h.

414 {
416 const int idx = indexSteeringAngleRateAck(state.model_id);
417 state.continuous_state[idx] = val;
418 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
419 }
int indexSteeringAngleRateAck(const unsigned char &model_id)
Get the vector-index that stores the steering angle rate for a given model-id.

◆ setSteeringAngleRateAck() [2/2]

template<typename T >
void perception_msgs::object_access::setSteeringAngleRateAck ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the ackermann steering angle rate for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 430 of file state_setters.h.

430 {
431 setSteeringAngleRateAck(obj.state, val, reset_covariance);
432 }
void setSteeringAngleRateAck(ObjectState &state, const double val, const bool reset_covariance=true)
Set the ackermann steering angle rate for a given object state.

◆ setSteeringAngleRear() [1/2]

void perception_msgs::object_access::setSteeringAngleRear ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the rear wheel angle for a given object state.

Parameters
state
val
reset_covariance

Definition at line 468 of file state_setters.h.

468 {
470 const int idx = indexSteeringAngleRear(state.model_id);
471 state.continuous_state[idx] = val;
472 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
473 }
int indexSteeringAngleRear(const unsigned char &model_id)
Get the vector-index that stores the rear wheel angle for a given model-id.

◆ setSteeringAngleRear() [2/2]

template<typename T >
void perception_msgs::object_access::setSteeringAngleRear ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the rear wheel angle for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 484 of file state_setters.h.

484 {
485 setSteeringAngleRear(obj.state, val, reset_covariance);
486 }
void setSteeringAngleRear(ObjectState &state, const double val, const bool reset_covariance=true)
Set the rear wheel angle for a given object state.

◆ setTrafficLightState() [1/2]

void perception_msgs::object_access::setTrafficLightState ( ObjectState &  state,
const uint8_t  val 
)
inline

Set the traffic light state for a given object state.

Parameters
state
val

Definition at line 671 of file state_setters.h.

671 {
673 const int idx = indexTrafficLightState(state.model_id);
674 state.discrete_state[idx] = val;
675 }
int indexTrafficLightState(const unsigned char &model_id)
Get the vector-index that stores the traffic light state for a given model-id.

◆ setTrafficLightState() [2/2]

template<typename T >
void perception_msgs::object_access::setTrafficLightState ( T &  obj,
const uint8_t  val 
)
inline

Set the traffic light state for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val

Definition at line 686 of file state_setters.h.

686 {
687 setTrafficLightState(obj.state, val);
688 }
void setTrafficLightState(ObjectState &state, const uint8_t val)
Set the traffic light state for a given object state.

◆ setTrafficLightType() [1/2]

void perception_msgs::object_access::setTrafficLightType ( ObjectState &  state,
const uint8_t  val 
)
inline

Set the traffic light type for a given object state.

Parameters
state
val

Definition at line 696 of file state_setters.h.

696 {
698 const int idx = indexTrafficLightType(state.model_id);
699 state.discrete_state[idx] = val;
700 }
int indexTrafficLightType(const unsigned char &model_id)
Get the vector-index that stores the traffic light type for a given model-id.

◆ setTrafficLightType() [2/2]

template<typename T >
void perception_msgs::object_access::setTrafficLightType ( T &  obj,
const uint8_t  val 
)
inline

Set the traffic light type for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val

Definition at line 711 of file state_setters.h.

711 {
712 setTrafficLightType(obj.state, val);
713 }
void setTrafficLightType(ObjectState &state, const uint8_t val)
Set the traffic light type for a given object state.

◆ setTurnIndicator() [1/2]

void perception_msgs::object_access::setTurnIndicator ( ObjectState &  state,
const uint8_t  val 
)
inline

Set the turn indicator for a given object state.

Parameters
state
val

Definition at line 599 of file state_setters.h.

599 {
601 const int idx = indexTurnIndicator(state.model_id);
602 state.discrete_state[idx] = val;
603 }
int indexTurnIndicator(const unsigned char &model_id)
Get the vector-index that stores the turn indicator state for a given model-id.

◆ setTurnIndicator() [2/2]

template<typename T >
void perception_msgs::object_access::setTurnIndicator ( T &  obj,
const uint8_t  val 
)
inline

Set the turn indicator for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val

Definition at line 613 of file state_setters.h.

613 {
614 setTurnIndicator(obj.state, val);
615 }
void setTurnIndicator(ObjectState &state, const uint8_t val)
Set the turn indicator for a given object state.

◆ setVelLat() [1/2]

void perception_msgs::object_access::setVelLat ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the lateral velocity for a given object state.

Parameters
state
val
reset_covariance

Definition at line 135 of file state_setters.h.

135 {
137 const int idx = indexVelLat(state.model_id);
138 state.continuous_state[idx] = val;
139 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
140 }
int indexVelLat(const unsigned char &model_id)
Get the vector-index that stores the lateral velocity for a given model-id.

◆ setVelLat() [2/2]

template<typename T >
void perception_msgs::object_access::setVelLat ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the lateral velocity for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 151 of file state_setters.h.

151 {
152 setVelLat(obj.state, val, reset_covariance);
153 }
void setVelLat(ObjectState &state, const double val, const bool reset_covariance=true)
Set the lateral velocity for a given object state.

◆ setVelLon() [1/2]

void perception_msgs::object_access::setVelLon ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the longitdunial velocity for a given object state.

Parameters
state
val
reset_covariance

Definition at line 108 of file state_setters.h.

108 {
110 const int idx = indexVelLon(state.model_id);
111 state.continuous_state[idx] = val;
112 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
113 }
int indexVelLon(const unsigned char &model_id)
Get the vector-index that stores the longitudinal velocity for a given model-id.
Definition state_index.h:93

◆ setVelLon() [2/2]

template<typename T >
void perception_msgs::object_access::setVelLon ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the longitudinal velocity for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 124 of file state_setters.h.

124 {
125 setVelLon(obj.state, val, reset_covariance);
126 }
void setVelLon(ObjectState &state, const double val, const bool reset_covariance=true)
Set the longitdunial velocity for a given object state.

◆ setWidth() [1/2]

void perception_msgs::object_access::setWidth ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the width for a given object state.

Parameters
state
val
reset_covariance

Definition at line 495 of file state_setters.h.

495 {
497 const int idx = indexWidth(state.model_id);
498 state.continuous_state[idx] = val;
499 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
500 }
int indexWidth(const unsigned char &model_id)
Get the vector-index that stores the width for a given model-id.

◆ setWidth() [2/2]

template<typename T >
void perception_msgs::object_access::setWidth ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the width for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 511 of file state_setters.h.

511 {
512 setWidth(obj.state, val, reset_covariance);
513 }
void setWidth(ObjectState &state, const double val, const bool reset_covariance=true)
Set the width for a given object state.

◆ setX() [1/2]

void perception_msgs::object_access::setX ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the x-position for a given object state.

Parameters
state
val
reset_covariance

Definition at line 27 of file state_setters.h.

27 {
29 const int idx = indexX(state.model_id);
30 state.continuous_state[idx] = val;
31 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
32 }
int indexX(const unsigned char &model_id)
Get the vector-index that stores the x-position for a given model-id.
Definition state_index.h:24

◆ setX() [2/2]

template<typename T >
void perception_msgs::object_access::setX ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the x-position for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 43 of file state_setters.h.

43 {
44 setX(obj.state, val, reset_covariance);
45 }
void setX(ObjectState &state, const double val, const bool reset_covariance=true)
Set the x-position for a given object state.

◆ setY() [1/2]

void perception_msgs::object_access::setY ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the y-position for a given object state.

Parameters
state
val
reset_covariance

Definition at line 54 of file state_setters.h.

54 {
56 const int idx = indexY(state.model_id);
57 state.continuous_state[idx] = val;
58 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
59 }
int indexY(const unsigned char &model_id)
Get the vector-index that stores the y-position for a given model-id.
Definition state_index.h:47

◆ setY() [2/2]

template<typename T >
void perception_msgs::object_access::setY ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the y-position for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 70 of file state_setters.h.

70 {
71 setY(obj.state, val, reset_covariance);
72 }
void setY(ObjectState &state, const double val, const bool reset_covariance=true)
Set the y-position for a given object state.

◆ setYaw() [1/2]

void perception_msgs::object_access::setYaw ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the yaw for a given object state.

Parameters
state
val
reset_covariance

Definition at line 330 of file state_setters.h.

330 {
332 double capped_val = val;
333 capped_val -= 2.0 * M_PI * std::floor((capped_val + M_PI) * (M_1_PI * 0.5));
334 if (capped_val <= -M_PI) capped_val += 2 * M_PI;
335 const int idx = indexYaw(state.model_id);
336 state.continuous_state[idx] = capped_val;
337 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
338 }
int indexYaw(const unsigned char &model_id)
Get the vector-index that stores the yaw for a given model-id.

◆ setYaw() [2/2]

template<typename T >
void perception_msgs::object_access::setYaw ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the yaw for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 349 of file state_setters.h.

349 {
350 setYaw(obj.state, val, reset_covariance);
351 }
void setYaw(ObjectState &state, const double val, const bool reset_covariance=true)
Set the yaw for a given object state.

◆ setYawRate() [1/2]

void perception_msgs::object_access::setYawRate ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the yaw-rate for a given object state.

Parameters
state
val
reset_covariance

Definition at line 360 of file state_setters.h.

360 {
362 const int idx = indexYawRate(state.model_id);
363 state.continuous_state[idx] = val;
364 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
365 }
int indexYawRate(const unsigned char &model_id)
Get the vector-index that stores the yaw-rate for a given model-id.

◆ setYawRate() [2/2]

template<typename T >
void perception_msgs::object_access::setYawRate ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the yaw-rate for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 376 of file state_setters.h.

376 {
377 setYawRate(obj.state, val, reset_covariance);
378 }
void setYawRate(ObjectState &state, const double val, const bool reset_covariance=true)
Set the yaw-rate for a given object state.

◆ setZ() [1/2]

void perception_msgs::object_access::setZ ( ObjectState &  state,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the z-position for a given object state.

Parameters
state
val
reset_covariance

Definition at line 81 of file state_setters.h.

81 {
83 const int idx = indexZ(state.model_id);
84 state.continuous_state[idx] = val;
85 if (reset_covariance) setContinuousStateCovarianceToUnknownAt(state, idx, idx);
86 }
int indexZ(const unsigned char &model_id)
Get the vector-index that stores the z-position for a given model-id.
Definition state_index.h:70

◆ setZ() [2/2]

template<typename T >
void perception_msgs::object_access::setZ ( T &  obj,
const double  val,
const bool  reset_covariance = true 
)
inline

Set the z-position for a given template object that contains an object state.

Template Parameters
T
Parameters
obj
val
reset_covariance

Definition at line 97 of file state_setters.h.

97 {
98 setZ(obj.state, val, reset_covariance);
99 }
void setZ(ObjectState &state, const double val, const bool reset_covariance=true)
Set the z-position for a given object state.