Class RlController

Inheritance Relationships

Base Type

  • public ControllerBase

Derived Type

Class Documentation

class RlController : public ControllerBase

Subclassed by legged::OnnxController

Public Functions

controller_interface::return_type update(const rclcpp::Time &time, const rclcpp::Duration &period) override
controller_interface::CallbackReturn on_configure(const rclcpp_lifecycle::State &previous_state) override
controller_interface::CallbackReturn on_activate(const rclcpp_lifecycle::State &previous_state) override
controller_interface::CallbackReturn on_deactivate(const rclcpp_lifecycle::State &previous_state) override

Protected Functions

void runPolicy()
virtual bool parserCommand(const std::string &name)
virtual bool parserObservation(const std::string &name)

Protected Attributes

Policy::SharedPtr policy_
CommandManager::SharedPtr commandManager_
ObservationManager::SharedPtr observationManager_
bool async_ = {false}
std::atomic_bool running_ = {false}
std::thread policyThread_
RepeatedTimer policyTimer_
std::string actionType_ = {"position_absolute"}
vector_t desiredPosition_
scalar_t policyFrequency_ = {50.}
rclcpp::Time lastPlayTime_
int historySize_ = {1}
bool historyByTerm_ = {true}
std::shared_ptr<rclcpp::Publisher<std_msgs::msg::Float64MultiArray>> publisher_
std::shared_ptr<realtime_tools::RealtimePublisher<std_msgs::msg::Float64MultiArray>> publisherRealtime_