argos::CBatteryDischargeModelMotion Class Reference

A battery discharge model based only on motion. More...

#include <battery_equipped_entity.h>

Inheritance diagram for argos::CBatteryDischargeModelMotion:
Collaboration diagram for argos::CBatteryDischargeModelMotion:

Public Member Functions

 CBatteryDischargeModelMotion ()
 
virtual void Init (TConfigurationNode &t_tree)
 Initializes the resource. More...
 
void SetPosFactor (Real f_factor)
 
void SetOrientFactor (Real f_factor)
 
virtual void SetBattery (CBatteryEquippedEntity *pc_battery)
 
virtual void operator() ()
 
- Public Member Functions inherited from argos::CBatteryDischargeModel
 CBatteryDischargeModel ()
 
virtual ~CBatteryDischargeModel ()
 
virtual void Reset ()
 Resets the resource. More...
 
virtual void Destroy ()
 Undoes whatever was done by Init(). More...
 
- Public Member Functions inherited from argos::CBaseConfigurableResource
virtual ~CBaseConfigurableResource ()
 Class destructor. More...
 

Protected Attributes

const SAnchorm_psAnchor
 
CVector3 m_cOldPosition
 
CQuaternion m_cOldOrientation
 
Real m_fPosFactor
 
Real m_fOrientFactor
 
- Protected Attributes inherited from argos::CBatteryDischargeModel
CBatteryEquippedEntitym_pcBattery
 

Detailed Description

A battery discharge model based only on motion.

In this model, the charge is calculated as follows:

new charge = old charge - pos_factor * (delta position) - orient_factor * (delta orientation)

Definition at line 185 of file battery_equipped_entity.h.

Constructor & Destructor Documentation

◆ CBatteryDischargeModelMotion()

argos::CBatteryDischargeModelMotion::CBatteryDischargeModelMotion ( )
inline

Definition at line 189 of file battery_equipped_entity.h.

Member Function Documentation

◆ Init()

void argos::CBatteryDischargeModelMotion::Init ( TConfigurationNode t_tree)
virtual

Initializes the resource.

Parameters
t_treethe base of the XML configuration tree to parse
Exceptions
CARGoSExceptionif an error occurs

Reimplemented from argos::CBatteryDischargeModel.

Definition at line 159 of file battery_equipped_entity.cpp.

◆ operator()()

void argos::CBatteryDischargeModelMotion::operator() ( )
virtual

Implements argos::CBatteryDischargeModel.

Definition at line 191 of file battery_equipped_entity.cpp.

◆ SetBattery()

void argos::CBatteryDischargeModelMotion::SetBattery ( CBatteryEquippedEntity pc_battery)
virtual

Reimplemented from argos::CBatteryDischargeModel.

Definition at line 167 of file battery_equipped_entity.cpp.

◆ SetOrientFactor()

void argos::CBatteryDischargeModelMotion::SetOrientFactor ( Real  f_factor)
inline

Definition at line 200 of file battery_equipped_entity.h.

◆ SetPosFactor()

void argos::CBatteryDischargeModelMotion::SetPosFactor ( Real  f_factor)
inline

Definition at line 196 of file battery_equipped_entity.h.

Member Data Documentation

◆ m_cOldOrientation

CQuaternion argos::CBatteryDischargeModelMotion::m_cOldOrientation
protected

Definition at line 212 of file battery_equipped_entity.h.

◆ m_cOldPosition

CVector3 argos::CBatteryDischargeModelMotion::m_cOldPosition
protected

Definition at line 211 of file battery_equipped_entity.h.

◆ m_fOrientFactor

Real argos::CBatteryDischargeModelMotion::m_fOrientFactor
protected

Definition at line 214 of file battery_equipped_entity.h.

◆ m_fPosFactor

Real argos::CBatteryDischargeModelMotion::m_fPosFactor
protected

Definition at line 213 of file battery_equipped_entity.h.

◆ m_psAnchor

const SAnchor* argos::CBatteryDischargeModelMotion::m_psAnchor
protected

Definition at line 210 of file battery_equipped_entity.h.