5 #include <rokubimini_msgs/FirmwareUpdateSerial.h> 6 #include <rokubimini_msgs/ResetWrench.h> 7 #include <geometry_msgs/Wrench.h> 138 return implPtr_->waitForState(state);
368 rokubimini_msgs::FirmwareUpdateSerial::Response& response);
381 rokubimini_msgs::ResetWrench::Response& response);
bool getSerialNumber(unsigned int &serialNumber) override
Gets the serial number of the device.
void publishRosMessages() override
Publishes ROS messages with data from the rokubimini device.
uint64_t noFrameSyncCounter_
The counter for measuring failed frame synchronizations.
std::atomic< bool > computeMeanWrenchFlag_
The flag for enabling the computation of the mean of the wrench measurements. Used withing the "reset...
RosPublisherPtr temperaturePublisher_
The sensor_msgs::Temperature publisher.
bool setAngularRateRange(const unsigned int range) override
Sets an angular rate range to the device.
bool saveConfigParameter() override
Saves the current configuration to the device.
bool firmwareUpdateCallback(rokubimini_msgs::FirmwareUpdateSerial::Request &request, rokubimini_msgs::FirmwareUpdateSerial::Response &response)
The callback for the firmware update ROS service.
void setState(const uint16_t state)
Sets the state of the device in the bus (unused).
std::shared_ptr< ros::Publisher > RosPublisherPtr
bool setInitMode()
Triggers a software reset of the sensor bringing it to a known state.
void doStartupWithCommunication() override
Starts up a Rokubimini Serial device after communication has been established.
bool setAccelerationFilter(const unsigned int filter) override
Sets an acceleration filter to the device.
bool setHardwareReset()
Triggers a hardware reset of the sensor.
bool loadConfig()
Loads the configuration of the device.
ros::ServiceServer firmwareUpdateService_
The service for firmware updates.
bool printUserConfig()
Prints all the user configurable parameters.
void createRosServices() override
Adds ROS services related to the device.
void setImplPointer(const RokubiminiSerialImplPtr &implPtr)
Sets a pointer to the implementation.
static const uint32_t TOTAL_NUMBER_OF_WRENCH_MESSAGES
The Rokubimini Serial class.
bool waitForState(const uint16_t state)
Wait for a state to be reached (unused).
RosPublisherPtr readingPublisher_
The rokubimini_msgs::Reading publisher.
RokubiminiSerial()=default
Default constructor.
void updateProcessReading() override
Updates the RokubiminiSerial object with new measurements.
bool getForceTorqueSamplingRate(int &samplingRate) override
Gets the force torque sampling rate of the device.
void createRosPublishers() override
Adds ROS publishers related to the device.
bool setForceTorqueFilter(const configuration::ForceTorqueFilter &filter) override
Sets a force torque filter to the device.
bool setSensorConfiguration(const configuration::SensorConfiguration &sensorConfiguration) override
Sets a sensor configuration to the device.
std::atomic< uint32_t > wrenchMessageCount_
The counter that is used for the computation of the mean of the wrench measurements. Used for the "reset service" callback.
bool init()
Initializes communication with a Rokubimini Serial device.
bool setAngularRateFilter(const unsigned int filter) override
Sets an angular rate filter to the device.
std::shared_ptr< RokubiminiSerialImpl > RokubiminiSerialImplPtr
std::recursive_mutex meanWrenchOffsetMutex_
The mutex for accessing the mean of the wrench measurements. Used for the "reset service" callback...
bool setSensorCalibration(const calibration::SensorCalibration &sensorCalibration) override
Sets a sensor calibration to the device.
RosPublisherPtr wrenchPublisher_
The sensor_msgs::Wrench publisher.
ros::ServiceServer resetWrenchService_
The service for resetting the sensor wrench measurements.
bool setAccelerationRange(const unsigned int range) override
Sets an acceleration range to the device.
geometry_msgs::Wrench meanWrenchOffset_
The computed mean wrench offset. 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.
RokubiminiSerialImplPtr implPtr_
The pointer to implementation.
bool deviceIsMissing() const override
Checks if the device is missing.
bool setConfigMode()
Sets the device in config mode.
void shutdownWithCommunication() override
Shuts down a Rokubimini Serial device before communication has been closed.
~RokubiminiSerial() override=default
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.
bool setRunMode()
Sets the device in run mode.