222 if (barPosition.
barPosition > (this->maxTravelDistance + this->barSpacingOffset) || barPosition.
barPosition < this->barSpacingOffset) {
223 std::stringstream errorMessageStream;
225 throw std::out_of_range(errorMessageStream.str());
228 quantity<si::length> setpoint;;
244 LOG(
error) <<
"Gripper " <<
"over temperature";
247 LOG(
warning) <<
"Gripper " <<
"pre warning over temperature";
250 LOG(
error) <<
"Gripper " <<
"short to ground A";
253 LOG(
error) <<
"Gripper " <<
"short to ground B";
264 if ( !(errosFlags & STAND_STILL) && (errosFlags & STALL_GUARD_STATUS) ) {
265 LOG(
info) <<
"Gripper " <<
"motor stall";
272 std::stringstream errorMessageStream;
273 errorMessageStream <<
"Joint " << this->
jointNumber <<
": ";
274 std::string errorMessage;
275 errorMessage = errorMessageStream.str();
286 LOG(
error) << errorMessage <<
"Parameter name: " << mailboxMsg.
parameterName <<
" has a wrong type!";
294 LOG(
error) << errorMessage <<
"Parameter name: " << mailboxMsg.
parameterName <<
" Configuration EEPROM locked";
311 mailboxMsgBuffer = mailboxMsg;
313 unsigned int retry = 0;
355 unsigned int retry = 0;
virtual void getData(GripperSensedVelocity &barVelocity) const
unsigned int maxEncoderValue
quantity< si::length > barPosition
YouBotGripperBar(const unsigned int barNo, const unsigned int jointNo, const std::string &configFilePath="../config/")
quantity< si::length > value
void parseMailboxStatusFlags(const YouBotSlaveMailboxMsg &mailboxMsg) const
The encoder value when the gripper has reached it's maximum bar spacing position. ...
quantity< si::length > barSpacingOffset
unsigned int mailboxMsgRetries
virtual void setMailboxMsgBuffer(const YouBotSlaveMailboxMsg &msgBuffer, const unsigned int jointNumber)=0
bool setValueToMotorContoller(const YouBotSlaveMailboxMsg &mailboxMsg) const
Actual position of one gripper bar.
mailboxInputBuffer stctInput
virtual void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message) const =0
The encoder setpoint for one bar.
virtual void getConfigurationParameter(MaxEncoderValue ¶meter) const
virtual std::string getName() const =0
virtual void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message)=0
mailboxOutputBuffer stctOutput
The maximum bar spacing distance of the gripper.
quantity< si::length > value
virtual void setData(const GripperBarEncoderSetpoint &encoderSetpoint)
Joint parameter exception.
EtherCAT mailbox message of the youBot slaves.
virtual void setConfigurationParameter(const MaxEncoderValue ¶meter)
virtual ParameterType getType() const =0
void parseGripperErrorFlags(const unsigned int &errosFlags)
The sensed bar velocity for a one DOF gripper.
Represents a bar spacing offset. It could be useful if the gripper can not be totally closed...
#define SLEEP_MILLISEC(millisec)
quantity< si::length > maxTravelDistance
virtual ~YouBotGripperBar()
bool retrieveValueFromMotorContoller(YouBotSlaveMailboxMsg &message) const
std::string parameterName
abstract youBot gripper parameter
The name for a gripper bar or finger.
void getParameter(int ¶meter) const
The bar position for a one gripper bar.
quantity< si::length > barPosition
static EthercatMasterInterface & getInstance(const std::string configFile="youbot-ethercat.cfg", const std::string configFilePath="../config/", const bool ethercatMasterWithThread=true)
unsigned int timeTillNextMailboxUpdate
The sensed bar position for a one gripper bar.
EthercatMasterInterface * ethercatMaster
virtual bool getMailboxMsgBuffer(YouBotSlaveMailboxMsg &mailboxMsg, const unsigned int jointNumber)=0