Class Resettable

Inheritance Relationships

Derived Type

Class Documentation

class Resettable

Interface for resettable nodes and nodelets.

This class subscribes the following topics:

  • /reset (any type): When a message is received on this topic, reset() is called.

  • ~reset (any type): When a message is received on this topic, reset() is called.

Subclassed by cras::TimeJumpResettable

Public Functions

explicit Resettable(const ::cras::LogHelperPtr &log)

Create the resettable interface. To also wire up to the reset topics, call initRos().

Parameters:

log[in] The logger to use for message logging.

virtual ~Resettable()
virtual void reset() = 0

Do the resetting. Subclasses have to implement the logic.

virtual void initRos(const ::ros::NodeHandle &pnh)

Initialize the ROS part of the interface - subscriber to /reset and ~reset topics.

Parameters:

pnh[in] The (private) node handle to setup the interface for.