39 #ifndef DRIVER_SVH_SVH_CONTROLLER_H_INCLUDED 40 #define DRIVER_SVH_SVH_CONTROLLER_H_INCLUDED 93 bool connect(
const std::string &dev_name);
103 void setControllerTarget(
const SVHChannel& channel,
const int32_t &position);
109 void setControllerTargetAllChannels(
const std::vector<int32_t>& positions);
117 void enableChannel(
const SVHChannel& channel);
123 void disableChannel(
const SVHChannel& channel);
126 void requestControllerState();
132 void requestControllerFeedback(
const SVHChannel& channel);
138 void requestPositionSettings(
const SVHChannel& channel);
145 void setPositionSettings(
const SVHChannel& channel,
const SVHPositionSettings& position_settings);
151 void requestCurrentSettings(
const SVHChannel& channel);
158 void setCurrentSettings(
const SVHChannel& channel,
const SVHCurrentSettings& current_settings);
163 void requestEncoderValues();
175 void requestFirmwareInfo();
182 void receivedPacketCallback(
const SVHSerialPacket& packet,
unsigned int packet_count);
203 bool getPositionSettings(
const SVHChannel &channel,
SVHPositionSettings& position_settings);
211 bool getCurrentSettings(
const SVHChannel &channel,
SVHCurrentSettings& current_settings);
223 unsigned int getSentPackageCount();
229 unsigned int getReceivedPackageCount();
234 void resetPackageCounts();
241 bool isEnabled(
const SVHChannel &channel);
244 static const char * m_channel_description[];
247 static const float channel_effort_constants[9];
SVHFirmwareInfo m_firmware_info
Latest firmware info.
std::vector< SVHCurrentSettings > m_current_settings
vector of current controller parameters for each finger
SVHEncoderSettings m_encoder_settings
Currently active encoder settings.
The SVHCurrentSettings save the current controller paramters for a single motor.
#define DRIVER_SVH_IMPORT_EXPORT
unsigned int m_received_package_count
store how many packages where actually received. Updated every time the receivepacket callback is cal...
std::vector< SVHControllerFeedback > m_controller_feedback
ControllerFeedback indicates current position and current per finger.
The SVHFirmwareInfo holds the data of a firmware response from the hardware.
The SVHControllerFeedback saves the feedback of a single motor.
std::vector< SVHPositionSettings > m_position_settings
vector of position controller parameters for each finger
This class controls the the SCHUNK five finger hand.
SVHControllerState m_controller_state
Currently active controllerstate on the HW Controller (indicates if PWM active etc.)
The SVHPositionSettings save the position controller paramters for a single motor.
SVHSerialInterface * m_serial_interface
Serial interface for transmission and reveibing of data packets.
The SVHControllerState indicates the current state of the MeCoVis controller IC which is used in the ...
uint16_t m_enable_mask
Bitmask to tell which fingers are enabled.
The SVHControllerFeedbackAllChannes saves the feedback of a all motors.
Basic communication handler for the SCHUNK five finger hand.
The SVHEncoderSettings hold the settings for the encoder scaling of each channel. ...
SVHChannel
Channel indicates which motor to use in command calls. WARNING: DO NOT CHANGE THE ORDER OF THESE as i...
The SerialPacket holds the (non generated) header and data of one message to the SVH-Hardware.