ANYdrive SDK
The SDK for interfacing ANYdrive.
anydrive_ethercat::AnydriveManagerEthercat Class Reference

#include <AnydriveManagerEthercat.hpp>

Inheritance diagram for anydrive_ethercat::AnydriveManagerEthercat:
Inheritance graph

Public Member Functions

 AnydriveManagerEthercat (const bool standalone, const bool installSignalHandler, const double timeStep)
 
virtual ~AnydriveManagerEthercat ()=default
 
anydrive::setup::SetupPtr createSetup () const override
 
- Public Member Functions inherited from anydrive::AnydriveManager
virtual bool startup ()
 
virtual bool update ()
 
virtual void updateCommunicationManagerReadMessages ()
 
virtual void updateProcessReadings ()
 
virtual void updateStageCommands ()
 
virtual void updateSendStagedCommands ()
 
virtual void updateCommunicationManagerWriteMessages ()
 
virtual void shutdown ()
 
bool isRunning () const
 
bool shutdownRequested () const
 
bool setGoalStatesEnum (const fsm::StateEnum goalStateEnum, const bool reachStates=false, const double timeout=5.0, const double checkingFrequency=100.0)
 
void clearGoalStatesEnum ()
 
bool allDevicesAreConnected () const
 
bool allDevicesAreInTheState (const fsm::StateEnum stateEnum) const
 
bool allDevicesAreInTheSameState (fsm::StateEnum &stateEnum) const
 
bool allDevicesAreInTheMode (const mode::ModeEnum modeEnum) const
 
bool allDevicesAreInTheSameMode (mode::ModeEnum &modeEnum) const
 
bool noDeviceIsInErrorState () const
 
bool noDeviceIsInFatalState () const
 
bool allDevicesAreWithinJointPositionLimitsSdk () const
 
bool allDevicesAreWithinJointPositionLimitsSoft () const
 
bool allDevicesAreWithinJointPositionLimitsHard () const
 
bool eraseFlashStorage ()
 
bool resetFlashStorageSections (const uint8_t flashStorageSections)
 
bool calibrate (const std::string &deviceName, const calibration::CalibrationModeEnum calibrationModeEnum, const bool gearAndJointEncoderHomingAbsolute=true, const double gearAndJointEncoderHomingNewJointPosition=0.0)
 
bool resetCustomCalibrationsToFactory (const calibration::CalibrationState calibrationState)
 
bool writeFactoryCalibration ()
 
bool setMaxCurrent (const double maxCurrent)
 
bool setMaxMotorVelocity (const double maxMotorVelocity)
 
bool setMaxJointTorque (const double maxJointTorque)
 
bool setCurrentIntegratorSaturation (const double saturation)
 
bool setJointTorqueIntegratorSaturation (const double saturation)
 
bool setDirection (const int16_t direction)
 
bool setJointPositionLimitsSdk (const common::Limits &limits)
 
bool setJointPositionLimitsSoft (const common::Limits &limits)
 
bool setJointPositionLimitsHard (const common::Limits &limits)
 
bool setControlGains (const mode::ModeEnum mode, const mode::PidGainsF &pidGains)
 
bool setErrorStateBehavior (const uint16_t errorStateBehavior)
 
bool writeConfiguration ()
 
void sendControlwords (const uint16_t controlwordId)
 
void stageDisables ()
 
void stageFreezes ()
 
void stageZeroJointTorques ()
 
void stageCommands (const std::vector< Command > &commands)
 
bool achieveJointPositionConfiguration (const std::string &configurationName)
 
bool achieveJointPositionConfigurationIsActive ()
 
void abortAchieveJointPositionConfiguration ()
 
std::vector< ReadingExtendedgetReadings () const
 
void getReadings (std::vector< ReadingExtended > &readings) const
 
void printInfo () const
 
 AnydriveManager (const bool standalone, const bool installSignalHandler, const double timeStep)
 
virtual ~AnydriveManager ()
 
void setTimeStep (const double timeStep)
 
double getTimeStep () const
 
void setCommunicationManager (const communication::CommunicationManagerBasePtr &communicationManager)
 
const communication::CommunicationManagerBasePtrgetCommunicationManager () const
 
JointPositionConfigurationManagergetJointPositionConfigurationManager ()
 
const JointPositionConfigurationManagergetJointPositionConfigurationManager () const
 
bool loadSetup (const std::string &setupFile="")
 
bool loadSetup (const setup::SetupPtr &setup)
 
virtual bool addAnydrive (const AnydrivePtr &anydrive)
 
bool anydriveExists (const std::string &name) const
 
AnydrivePtr getAnydrive (const std::string &name) const
 
Anydrives getAnydrives () const
 
unsigned int getNumberOfAnydrives () const
 
void addReadingCb (const ReadingCb &readingCb, const int priority=0)
 
void addErrorCb (const ErrorCb &errorCb, const int priority=0)
 
void addErrorRecoveredCb (const ErrorRecoveredCb &errorRecoveredCb, const int priority=0)
 
void addFatalCb (const FatalCb &fatalCb, const int priority=0)
 
void addFatalRecoveredCb (const FatalRecoveredCb &fatalRecoveredCb, const int priority=0)
 
void addDeviceDisconnectedCb (const DeviceDisconnectedCb &deviceDisconnectedCb, const int priority=0)
 
void addDeviceReconnectedCb (const DeviceReconnectedCb &deviceReconnectedCb, const int priority=0)
 

Additional Inherited Members

- Public Types inherited from anydrive::AnydriveManager
using Anydrives = std::vector< AnydrivePtr >
 ANYdrives container. More...
 
- Static Public Member Functions inherited from anydrive::AnydriveManager
static void SetProcessPriority (const int priority)
 
- Protected Member Functions inherited from anydrive::AnydriveManager
virtual AnydrivePtr createAnydrive () const
 
bool updateWorkerCb (const any_worker::WorkerEvent &event)
 
void requestShutdown ()
 
void handleSignal (const int signum)
 
- Protected Attributes inherited from anydrive::AnydriveManager
bool standalone_ = true
 
bool installSignalHandler_ = true
 
std::shared_ptr< any_worker::Worker > updateWorker_
 Update worker. More...
 
double timeStep_ = 0.0
 Time step at which the update() function is called. More...
 
std::recursive_mutex isRunningMutex_
 Mutex instead of atomic_bool to block during starting up and shutting down procedures. More...
 
bool isRunning_ = false
 Flag indicating whether the manager is running. True between startup() and shutdown() calls. More...
 
std::atomic< bool > shutdownRequested_
 Flag indicating whether a shutdown has been requested. More...
 
communication::CommunicationManagerBasePtr communicationManager_
 Abstract communication manager. More...
 
Anydrives anydrives_
 List of ANYdrives. More...
 
calibration::routine::CalibrationBasePtr runningCalibration_
 Calibration which is currently running. More...
 
JointPositionConfigurationManager jointPositionConfigurationManager_
 Manager for commanding multiple ANYdrives to a given joint position configuration. More...
 

Constructor & Destructor Documentation

◆ AnydriveManagerEthercat()

anydrive_ethercat::AnydriveManagerEthercat::AnydriveManagerEthercat ( const bool  standalone,
const bool  installSignalHandler,
const double  timeStep 
)

Constructor.

Parameters
standaloneIf true, this class will start its own worker.
installSignalHandlerIf true, this class will install its own signal handler.
timeStepTime step for standalone mode.

◆ ~AnydriveManagerEthercat()

virtual anydrive_ethercat::AnydriveManagerEthercat::~AnydriveManagerEthercat ( )
virtualdefault

Destructor.

Member Function Documentation

◆ createSetup()

anydrive::setup::SetupPtr anydrive_ethercat::AnydriveManagerEthercat::createSetup ( ) const
overridevirtual

Create a new default setup.

Returns
New default setup.

Reimplemented from anydrive::AnydriveManager.


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