Open 3D Engine ROS2 Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
ROS2::PidMotorControllerRequests Class Referenceabstract

#include <PidMotorControllerBus.h>

Inherits AZ::EBusTraits.

Public Types

using BusIdType = AZ::EntityId
 

Public Member Functions

virtual void SetSetpoint (float setpoint)=0
 
virtual float GetSetpoint ()=0
 
virtual float GetCurrentMeasurement ()=0
 
virtual float GetError ()=0
 

Static Public Attributes

static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 

Detailed Description

Interface to communicate with a PID motor controller. It allows to apply a setpoint and track performance of the controller.

Member Function Documentation

◆ GetCurrentMeasurement()

virtual float ROS2::PidMotorControllerRequests::GetCurrentMeasurement ( )
pure virtual

Retrieve current measurement. Measurement is the value of the movement - eg protrusion of an actuator. For linear actuators, measurement is given in meters. For the rotational actuators, measurement is given in radians. When the setpoint is reached this should be close to setpoint.

Returns
measurement value in meters or radians.

◆ GetError()

virtual float ROS2::PidMotorControllerRequests::GetError ( )
pure virtual

Retrieve current control error (difference between setpoint and measurement) When the setpoint is reached this should be close to zero. For linear actuators, the error is given in meters. For the rotational actuators, the error is given in radians.

Returns
controller error's value in meters or radians

◆ GetSetpoint()

virtual float ROS2::PidMotorControllerRequests::GetSetpoint ( )
pure virtual

Get current setpoint value for position controller. If SetSetpoint has not been called, it returns initial position of joint. For linear actuators, the setpoint is given in meters. For the rotational actuators, the setpoint is given in radians.

Returns
setpoint value in meters or radians

◆ SetSetpoint()

virtual void ROS2::PidMotorControllerRequests::SetSetpoint ( float  setpoint)
pure virtual

Set current setpoint value for position controller. The setpoint is the desired position for a simulated actuator. For linear actuators, the setpoint is given in meters. For the rotational actuators, the setpoint is given in radians.

Parameters
setpointvalue in meters or radians

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