Go to the documentation of this file.
6 #include <rokubimini_msgs/FirmwareUpdateEthercat.h>
7 #include <rokubimini_msgs/ResetWrench.h>
336 rokubimini_msgs::FirmwareUpdateEthercat::Response& response);
349 rokubimini_msgs::ResetWrench::Response& response);
426 template <
typename Value>
442 bool sendSdoReadGeneric(
const std::string& indexString,
const std::string& subindexString,
443 const std::string& valueTypeString, std::string& valueString);
458 template <
typename Value>
475 bool sendSdoWriteGeneric(
const std::string& indexString,
const std::string& subindexString,
476 const std::string& valueTypeString,
const std::string& valueString);
bool setAngularRateRange(const unsigned int range) override
Sets an angular rate range to the device.
ros::ServiceServer firmwareUpdateService_
The service for firmware updates.
bool sendSdoRead(const uint16_t index, const uint8_t subindex, const bool completeAccess, Value &value)
void shutdownWithCommunication() override
Shuts down a Rokubimini Ethercat device before communication has been closed.
void signalShutdown()
Signals shutdown for the ROS node. It's used if a firmware update was successful.
bool setForceTorqueOffset(const Eigen::Matrix< double, 6, 1 > &forceTorqueOffset) override
Sets a force torque offset to the device.
void preSetupConfiguration() override
Pre-setup configuration hook.
Eigen::Matrix< double, 6, Eigen::Dynamic > resetServiceWrenchSamples_
The wrench samples used by the "reset service" callback for calculating the mean wrench offset.
bool setAngularRateFilter(const unsigned int filter) override
Sets an angular rate filter to the device.
void postSetupConfiguration() override
Post-setup configuration hook.
bool sendSdoReadGeneric(const std::string &indexString, const std::string &subindexString, const std::string &valueTypeString, std::string &valueString)
Sends a generic reading SDO to the Ethercat device.
std::atomic< uint32_t > wrenchMessageCount_
The counter that is used for the computation of the mean of the wrench measurements....
bool waitForState(const uint16_t state)
Wait for an EtherCAT state machine state to be reached.
bool getForceTorqueSamplingRate(int &samplingRate) override
Gets the force torque sampling rate of the device.
void publishRosMessages() override
Publishes ROS messages with data from the rokubimini device.
bool getSerialNumber(unsigned int &samplingRate) override
Gets the serial number of the device.
void publishDataFlagsDiagnostics(const ros::TimerEvent &event)
Publishes the Data Flags Diagnostics to the "/diagnostics" topic.
bool saveConfigParameter() override
Saves the current configuration to the device.
RokubiminiEthercat(const std::string &name, NodeHandlePtr nh)
bool setForceTorqueFilter(const configuration::ForceTorqueFilter &filter) override
Sets a force torque filter to the device.
RosPublisherPtr temperaturePublisher_
The sensor_msgs::Temperature publisher.
bool setRunMode()
Sets the device in run mode.
bool sendSdoWrite(const uint16_t index, const uint8_t subindex, const bool completeAccess, const Value value)
void updateConnectionStatus(diagnostic_updater::DiagnosticStatusWrapper &stat)
Shows the Device Status of the rokubimini.
bool firmwareUpdateCallback(rokubimini_msgs::FirmwareUpdateEthercat::Request &request, rokubimini_msgs::FirmwareUpdateEthercat::Response &response)
The callback for the firmware update ROS service.
bool setConfigMode()
Sets the device in config mode.
RosPublisherPtr readingPublisher_
The rokubimini_msgs::Reading publisher.
bool setSensorCalibration(const calibration::SensorCalibration &sensorCalibration) override
Sets a sensor calibration to the device.
unsigned __int64 uint64_t
bool setSensorConfiguration(const configuration::SensorConfiguration &sensorConfiguration) override
Sets a sensor configuration to the device.
const static uint32_t TOTAL_NUMBER_OF_WRENCH_MESSAGES
bool setAccelerationFilter(const unsigned int filter) override
Sets an acceleration filter to the device.
void updateProcessReading() override
Updates the RokubiminiEthercat object with new measurements.
void setState(const uint16_t state)
Sets the desired EtherCAT state machine state of the device in the bus.
std::recursive_mutex meanWrenchOffsetMutex_
The mutex for accessing the mean of the wrench measurements. Used for the "reset service" callback.
bool resetWrenchCallback(rokubimini_msgs::ResetWrench::Request &request, rokubimini_msgs::ResetWrench::Response &response)
The callback for the reset wrench ROS service.
void setSlavePointer(const RokubiminiEthercatSlavePtr &slavePtr)
Sets a pointer to the implementation.
RokubiminiEthercat()=default
Default constructor.
void publishRosDiagnostics() override
Publish ROS diagnostics related to the operation of rokubimini.
std::shared_ptr< ros::Publisher > RosPublisherPtr
RosPublisherPtr imuPublisher_
The sensor_msgs::Imu publisher.
void publishConnectionStatusDiagnostics()
Publishes the Connection Status Diagnostics to the "/diagnostics" topic.
ros::ServiceServer resetWrenchService_
The service for resetting the sensor wrench measurements.
std::atomic< bool > computeMeanWrenchFlag_
The flag for enabling the computation of the mean of the wrench measurements. Used withing the "reset...
std::shared_ptr< RokubiminiEthercatSlave > RokubiminiEthercatSlavePtr
RosPublisherPtr wrenchPublisher_
The sensor_msgs::Wrench publisher.
bool deviceIsMissing() const override
Checks if the device is missing.
void createRosPublishers() override
Adds ROS publishers related to the device.
void createRosServices() override
Adds ROS services related to the device.
RokubiminiEthercatSlavePtr slavePtr_
The pointer to implementation.
bool sendSdoWriteGeneric(const std::string &indexString, const std::string &subindexString, const std::string &valueTypeString, const std::string &valueString)
Sends a generic write SDO to the Ethercat device.
The Rokubimini Ethercat class.
void setRunsAsync(bool runsAsync)
~RokubiminiEthercat() override=default
void createRosDiagnostics() override
Adds ROS diagnostics related to the operation of rokubimini.
std::shared_ptr< ros::NodeHandle > NodeHandlePtr
bool setAccelerationRange(const unsigned int range) override
Sets an acceleration range to the device.