Easy Navigation
Loading...
Searching...
No Matches
command_guard_tests.cpp File Reference

safety::CommandGuard around the VelocityMux: timeout, non-finite commands, new controller commands, keepalive, QoS and diagnostics. More...

#include <algorithm>
#include <cmath>
#include <limits>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "gtest/gtest.h"
#include "diagnostic_msgs/msg/diagnostic_status.hpp"
#include "geometry_msgs/msg/twist_stamped.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_lifecycle/lifecycle_node.hpp"
#include "easynav_controller/VelocityMux.hpp"
#include "easynav_controller/safety/CommandGuard.hpp"
#include "easynav_core/VelocityCommand.hpp"
Include dependency graph for command_guard_tests.cpp:

Classes

class  CommandGuardTest
class  VelocityMux
 Decides, every RT cycle, which velocity command is sent to the robot. More...

Functions

 TEST_F (CommandGuardTest, ACommandAfterTheJumpRestartsTheTimeout)
 TEST_F (CommandGuardTest, AfterTheClockJumpsBackTheTimeoutCountsFromTheJump)
 TEST_F (CommandGuardTest, AHeldNonZeroTargetIsZeroedAfterTheTimeout)
 TEST_F (CommandGuardTest, AnErrorReportedBeforeAResetIsClearedAfterIt)
 TEST_F (CommandGuardTest, AnySourceKeepsTheCommandAlive)
 TEST_F (CommandGuardTest, AZeroTargetNeverTimesOut)
 TEST_F (CommandGuardTest, DiagnosticIsWrittenOnlyAfterAProblemAndOnChanges)
 TEST_F (CommandGuardTest, InvalidParametersAreRejected)
 TEST_F (CommandGuardTest, KeepaliveIsDueEveryPeriodAfterThePublication)
 TEST_F (CommandGuardTest, KeepaliveIsDueRightAfterTheClockJumpsBack)
 TEST_F (CommandGuardTest, NoKeepaliveIfDisabled)
 TEST_F (CommandGuardTest, NonFiniteProposalsAreDiscarded)
 TEST_F (CommandGuardTest, OnlyNewControllerCommandsAreProposed)
 TEST_F (CommandGuardTest, OnlyNonFiniteProposalsEndInATimeout)
 TEST_F (CommandGuardTest, PauseWhileTimedOutCommandsZero)
 TEST_F (CommandGuardTest, QosKeepsOnlyTheLatestCommandAndOffersADeadlineWithAKeepalive)
 TEST_F (CommandGuardTest, RepeatedJumpsBackStillTimeOut)
 TEST_F (CommandGuardTest, ResetForgetsTheTimeout)
 TEST_F (CommandGuardTest, TimeoutMustBeLongerThanTheControllerPeriod)
 TEST_F (CommandGuardTest, ZeroTimeoutDisablesIt)

Detailed Description

safety::CommandGuard around the VelocityMux: timeout, non-finite commands, new controller commands, keepalive, QoS and diagnostics.

Function Documentation

◆ TEST_F() [1/20]

TEST_F ( CommandGuardTest ,
ACommandAfterTheJumpRestartsTheTimeout  )

◆ TEST_F() [2/20]

TEST_F ( CommandGuardTest ,
AfterTheClockJumpsBackTheTimeoutCountsFromTheJump  )

◆ TEST_F() [3/20]

TEST_F ( CommandGuardTest ,
AHeldNonZeroTargetIsZeroedAfterTheTimeout  )

◆ TEST_F() [4/20]

TEST_F ( CommandGuardTest ,
AnErrorReportedBeforeAResetIsClearedAfterIt  )

◆ TEST_F() [5/20]

TEST_F ( CommandGuardTest ,
AnySourceKeepsTheCommandAlive  )

◆ TEST_F() [6/20]

TEST_F ( CommandGuardTest ,
AZeroTargetNeverTimesOut  )

◆ TEST_F() [7/20]

TEST_F ( CommandGuardTest ,
DiagnosticIsWrittenOnlyAfterAProblemAndOnChanges  )

◆ TEST_F() [8/20]

TEST_F ( CommandGuardTest ,
InvalidParametersAreRejected  )

◆ TEST_F() [9/20]

TEST_F ( CommandGuardTest ,
KeepaliveIsDueEveryPeriodAfterThePublication  )

◆ TEST_F() [10/20]

TEST_F ( CommandGuardTest ,
KeepaliveIsDueRightAfterTheClockJumpsBack  )

◆ TEST_F() [11/20]

TEST_F ( CommandGuardTest ,
NoKeepaliveIfDisabled  )

◆ TEST_F() [12/20]

TEST_F ( CommandGuardTest ,
NonFiniteProposalsAreDiscarded  )

◆ TEST_F() [13/20]

TEST_F ( CommandGuardTest ,
OnlyNewControllerCommandsAreProposed  )

◆ TEST_F() [14/20]

TEST_F ( CommandGuardTest ,
OnlyNonFiniteProposalsEndInATimeout  )

◆ TEST_F() [15/20]

TEST_F ( CommandGuardTest ,
PauseWhileTimedOutCommandsZero  )

◆ TEST_F() [16/20]

TEST_F ( CommandGuardTest ,
QosKeepsOnlyTheLatestCommandAndOffersADeadlineWithAKeepalive  )

◆ TEST_F() [17/20]

TEST_F ( CommandGuardTest ,
RepeatedJumpsBackStillTimeOut  )

◆ TEST_F() [18/20]

TEST_F ( CommandGuardTest ,
ResetForgetsTheTimeout  )

◆ TEST_F() [19/20]

TEST_F ( CommandGuardTest ,
TimeoutMustBeLongerThanTheControllerPeriod  )

◆ TEST_F() [20/20]

TEST_F ( CommandGuardTest ,
ZeroTimeoutDisablesIt  )