Easy Navigation
Loading...
Searching...
No Matches
FaultyLocalizer Class Reference

Localizer that misbehaves on purpose, to test how EasyNav copes with it. More...

#include <FaultyLocalizer.hpp>

Inheritance diagram for FaultyLocalizer:
Collaboration diagram for FaultyLocalizer:

Public Member Functions

void on_initialize () override
 Reads the parameters; throws on an unknown fault.
void update (NavState &nav_state) override
 Nothing: everything happens in update_rt().
void update_rt (NavState &nav_state) override
 Localizes or injects the fault.

Detailed Description

Localizer that misbehaves on purpose, to test how EasyNav copes with it.

Every RT update writes "robot_pose" at a fixed pose ("<name>.x", "<name>.y", "<name>.yaw"), stamped now, and, after "<name>.fault_after" updates, injects the fault in "<name>.fault":

  • "none": keeps localizing.
  • "throw": throws from update_rt().
  • "hang": blocks update_rt() for "<name>.hang_time" seconds on each update.
  • "freeze": keeps writing the last pose, with its old stamp.
  • "stop_publishing": stops writing "robot_pose".
  • "nan": writes a NaN pose.
  • "jump": the pose jumps "<name>.jump_distance" meters along x, once, and stays there.

Member Function Documentation

◆ on_initialize()

void on_initialize ( )
override

Reads the parameters; throws on an unknown fault.

◆ update()

void update ( NavState & nav_state)
override

Nothing: everything happens in update_rt().

◆ update_rt()

void update_rt ( NavState & nav_state)
override

Localizes or injects the fault.


The documentation for this class was generated from the following files: