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

ControllerNode as the single exit of the velocity command: robot limits for the controller plugins, selection among sources (mux), smoothing, publication, and braking on deactivation. More...

#include <algorithm>
#include <atomic>
#include <chrono>
#include <cmath>
#include <limits>
#include <memory>
#include <optional>
#include <sstream>
#include <string>
#include <vector>
#include "gtest/gtest.h"
#include "diagnostic_msgs/msg/diagnostic_status.hpp"
#include "geometry_msgs/msg/twist.hpp"
#include "geometry_msgs/msg/twist_stamped.hpp"
#include "lifecycle_msgs/msg/state.hpp"
#include "lifecycle_msgs/msg/transition.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_lifecycle/lifecycle_node.hpp"
#include "easynav_controller/ControllerNode.hpp"
#include "easynav_core/ControllerMethodBase.hpp"
#include "easynav_core/SafetyChannel.hpp"
#include "easynav_core/VelocityCommand.hpp"
Include dependency graph for controller_node_velocity_tests.cpp:

Classes

class  ControllerNodeSafetyChannelTest
class  ControllerNodeVelocityTest

Functions

 TEST_F (ControllerNodeSafetyChannelTest, AProtectiveStopCommandsZeroAtOnceAndResumesFromZero)
 TEST_F (ControllerNodeSafetyChannelTest, AProtectiveStopIsPublishedEvenWithoutCommands)
 TEST_F (ControllerNodeSafetyChannelTest, ASpeedLimitAboveTheRobotLimitsChangesNothing)
 TEST_F (ControllerNodeSafetyChannelTest, ASpeedLimitAlsoCutsReversing)
 TEST_F (ControllerNodeSafetyChannelTest, ASpeedLimitCutsTheLimitsAndIsReachedBraking)
 TEST_F (ControllerNodeSafetyChannelTest, ASpeedLimitOfZeroHoldsTheRobot)
 TEST_F (ControllerNodeSafetyChannelTest, InhibitedMotionBrakesInARampAndResumes)
 TEST_F (ControllerNodeSafetyChannelTest, NewRobotLimitsKeepTheSpeedLimit)
 TEST_F (ControllerNodeSafetyChannelTest, NoSourceMovesTheRobotDuringAProtectiveStop)
 TEST_F (ControllerNodeSafetyChannelTest, ReconfiguringStartsWithoutTheSpeedLimit)
 TEST_F (ControllerNodeVelocityTest, AfterAnOverrideTheRampStartsFromIt)
 TEST_F (ControllerNodeVelocityTest, AtRestARestampedZeroIsNotRepublished)
 TEST_F (ControllerNodeVelocityTest, AtRestTheKeepaliveStillRepublishesTheRestampedZero)
 TEST_F (ControllerNodeVelocityTest, ControllerAskingToStopDeadIsBrakedWithinTheDecelerationLimit)
 TEST_F (ControllerNodeVelocityTest, ControllerPluginsQueryTheRobotLimitsFromTheNode)
 TEST_F (ControllerNodeVelocityTest, DeactivationBrakesInARampAndEndsWithAnExactZero)
 TEST_F (ControllerNodeVelocityTest, DeprecatedLimitsApplyWhenRobotLimitsAreNotConfigured)
 TEST_F (ControllerNodeVelocityTest, DeprecatedLimitsOutsideAControllerNode)
 TEST_F (ControllerNodeVelocityTest, DeprecatedLimitsSurviveReconfiguration)
 TEST_F (ControllerNodeVelocityTest, InvalidRobotLimitsFailToConfigure)
 TEST_F (ControllerNodeVelocityTest, KeepalivePublishesZeroAtRest)
 TEST_F (ControllerNodeVelocityTest, KeepaliveRepublishesTheHeldCommand)
 TEST_F (ControllerNodeVelocityTest, KeepsRampingWithoutNewCommandsAndThenStopsPublishing)
 TEST_F (ControllerNodeVelocityTest, KnowsWhichLimitsWereConfigured)
 TEST_F (ControllerNodeVelocityTest, NegativeOrNonFiniteTimeoutsFailToConfigure)
 TEST_F (ControllerNodeVelocityTest, NoDeprecatedLimitsMeansRobotLimits)
 TEST_F (ControllerNodeVelocityTest, NoNewCommandsBrakesToZeroAfterTheTimeoutAndResumes)
 TEST_F (ControllerNodeVelocityTest, NonFiniteCommandsAreNeverPublished)
 TEST_F (ControllerNodeVelocityTest, OverrideBypassesTheSmoother)
 TEST_F (ControllerNodeVelocityTest, PauseBrakesInARampAndResumeRampsUp)
 TEST_F (ControllerNodeVelocityTest, ProposalsArePrintedInTheNavStateDump)
 TEST_F (ControllerNodeVelocityTest, PublishesTheCommandRampingWithinTheLimits)
 TEST_F (ControllerNodeVelocityTest, ReceiverDetectsThatCommandsStopped)
 TEST_F (ControllerNodeVelocityTest, ReconfigurationStartsWithNoTimeoutState)
 TEST_F (ControllerNodeVelocityTest, ReconfigureRestoresTheConfiguredLimits)
 TEST_F (ControllerNodeVelocityTest, RobotLimitsTakePrecedenceOverDeprecatedOnes)
 TEST_F (ControllerNodeVelocityTest, SetRobotLimitsAppliesToTheSmoother)
 TEST_F (ControllerNodeVelocityTest, TakeoverIsPreferredAndSmoothedThenControlReturns)
 TEST_F (ControllerNodeVelocityTest, TakeoverWinsOverPauseAndOverrideOverEverything)
 TEST_F (ControllerNodeVelocityTest, TheDefaultTimeoutStopsAStaleCommand)
 TEST_F (ControllerNodeVelocityTest, TimeoutMustBeLongerThanTheControllerPeriod)
 TEST_F (ControllerNodeVelocityTest, VelocityQosKeepsOnlyTheLatestCommandAndOffersADeadline)
 TEST_F (ControllerNodeVelocityTest, ZeroVelocityLimitsAreValid)

Detailed Description

ControllerNode as the single exit of the velocity command: robot limits for the controller plugins, selection among sources (mux), smoothing, publication, and braking on deactivation.

Function Documentation

◆ TEST_F() [1/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
AProtectiveStopCommandsZeroAtOnceAndResumesFromZero  )

◆ TEST_F() [2/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
AProtectiveStopIsPublishedEvenWithoutCommands  )

◆ TEST_F() [3/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
ASpeedLimitAboveTheRobotLimitsChangesNothing  )

◆ TEST_F() [4/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
ASpeedLimitAlsoCutsReversing  )

◆ TEST_F() [5/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
ASpeedLimitCutsTheLimitsAndIsReachedBraking  )

◆ TEST_F() [6/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
ASpeedLimitOfZeroHoldsTheRobot  )

◆ TEST_F() [7/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
InhibitedMotionBrakesInARampAndResumes  )

◆ TEST_F() [8/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
NewRobotLimitsKeepTheSpeedLimit  )

◆ TEST_F() [9/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
NoSourceMovesTheRobotDuringAProtectiveStop  )

◆ TEST_F() [10/43]

TEST_F ( ControllerNodeSafetyChannelTest ,
ReconfiguringStartsWithoutTheSpeedLimit  )

◆ TEST_F() [11/43]

TEST_F ( ControllerNodeVelocityTest ,
AfterAnOverrideTheRampStartsFromIt  )

◆ TEST_F() [12/43]

TEST_F ( ControllerNodeVelocityTest ,
AtRestARestampedZeroIsNotRepublished  )

◆ TEST_F() [13/43]

TEST_F ( ControllerNodeVelocityTest ,
AtRestTheKeepaliveStillRepublishesTheRestampedZero  )

◆ TEST_F() [14/43]

TEST_F ( ControllerNodeVelocityTest ,
ControllerAskingToStopDeadIsBrakedWithinTheDecelerationLimit  )

◆ TEST_F() [15/43]

TEST_F ( ControllerNodeVelocityTest ,
ControllerPluginsQueryTheRobotLimitsFromTheNode  )

◆ TEST_F() [16/43]

TEST_F ( ControllerNodeVelocityTest ,
DeactivationBrakesInARampAndEndsWithAnExactZero  )

◆ TEST_F() [17/43]

TEST_F ( ControllerNodeVelocityTest ,
DeprecatedLimitsApplyWhenRobotLimitsAreNotConfigured  )

◆ TEST_F() [18/43]

TEST_F ( ControllerNodeVelocityTest ,
DeprecatedLimitsOutsideAControllerNode  )

◆ TEST_F() [19/43]

TEST_F ( ControllerNodeVelocityTest ,
DeprecatedLimitsSurviveReconfiguration  )

◆ TEST_F() [20/43]

TEST_F ( ControllerNodeVelocityTest ,
InvalidRobotLimitsFailToConfigure  )

◆ TEST_F() [21/43]

TEST_F ( ControllerNodeVelocityTest ,
KeepalivePublishesZeroAtRest  )

◆ TEST_F() [22/43]

TEST_F ( ControllerNodeVelocityTest ,
KeepaliveRepublishesTheHeldCommand  )

◆ TEST_F() [23/43]

TEST_F ( ControllerNodeVelocityTest ,
KeepsRampingWithoutNewCommandsAndThenStopsPublishing  )

◆ TEST_F() [24/43]

TEST_F ( ControllerNodeVelocityTest ,
KnowsWhichLimitsWereConfigured  )

◆ TEST_F() [25/43]

TEST_F ( ControllerNodeVelocityTest ,
NegativeOrNonFiniteTimeoutsFailToConfigure  )

◆ TEST_F() [26/43]

TEST_F ( ControllerNodeVelocityTest ,
NoDeprecatedLimitsMeansRobotLimits  )

◆ TEST_F() [27/43]

TEST_F ( ControllerNodeVelocityTest ,
NoNewCommandsBrakesToZeroAfterTheTimeoutAndResumes  )

◆ TEST_F() [28/43]

TEST_F ( ControllerNodeVelocityTest ,
NonFiniteCommandsAreNeverPublished  )

◆ TEST_F() [29/43]

TEST_F ( ControllerNodeVelocityTest ,
OverrideBypassesTheSmoother  )

◆ TEST_F() [30/43]

TEST_F ( ControllerNodeVelocityTest ,
PauseBrakesInARampAndResumeRampsUp  )

◆ TEST_F() [31/43]

TEST_F ( ControllerNodeVelocityTest ,
ProposalsArePrintedInTheNavStateDump  )

◆ TEST_F() [32/43]

TEST_F ( ControllerNodeVelocityTest ,
PublishesTheCommandRampingWithinTheLimits  )

◆ TEST_F() [33/43]

TEST_F ( ControllerNodeVelocityTest ,
ReceiverDetectsThatCommandsStopped  )

◆ TEST_F() [34/43]

TEST_F ( ControllerNodeVelocityTest ,
ReconfigurationStartsWithNoTimeoutState  )

◆ TEST_F() [35/43]

TEST_F ( ControllerNodeVelocityTest ,
ReconfigureRestoresTheConfiguredLimits  )

◆ TEST_F() [36/43]

TEST_F ( ControllerNodeVelocityTest ,
RobotLimitsTakePrecedenceOverDeprecatedOnes  )

◆ TEST_F() [37/43]

TEST_F ( ControllerNodeVelocityTest ,
SetRobotLimitsAppliesToTheSmoother  )

◆ TEST_F() [38/43]

TEST_F ( ControllerNodeVelocityTest ,
TakeoverIsPreferredAndSmoothedThenControlReturns  )

◆ TEST_F() [39/43]

TEST_F ( ControllerNodeVelocityTest ,
TakeoverWinsOverPauseAndOverrideOverEverything  )

◆ TEST_F() [40/43]

TEST_F ( ControllerNodeVelocityTest ,
TheDefaultTimeoutStopsAStaleCommand  )

◆ TEST_F() [41/43]

TEST_F ( ControllerNodeVelocityTest ,
TimeoutMustBeLongerThanTheControllerPeriod  )

◆ TEST_F() [42/43]

TEST_F ( ControllerNodeVelocityTest ,
VelocityQosKeepsOnlyTheLatestCommandAndOffersADeadline  )

◆ TEST_F() [43/43]

TEST_F ( ControllerNodeVelocityTest ,
ZeroVelocityLimitsAreValid  )