40 int main(
int argc,
const char* argv[])
42 std::string serial_device_name =
"/dev/ttyUSB0";
45 if (finger_manager.
connect(serial_device_name))
49 std::cout <<
"connected" << std::endl;
53 std::this_thread::sleep_for(std::chrono::seconds(2));
55 std::cout <<
"Pinky is enabled: " << finger_manager.
isEnabled(test_channel) << std::endl;
56 std::cout <<
"Pinky is homed: " << finger_manager.
isHomed(test_channel) << std::endl;
58 std::cout <<
"Enabling Pinky: " << finger_manager.
enableChannel(test_channel) << std::endl;
61 std::this_thread::sleep_for(std::chrono::seconds(2));
63 std::cout <<
"Pinky is enabled: " << finger_manager.
isEnabled(test_channel) << std::endl;
64 std::cout <<
"Pinky is homed: " << finger_manager.
isHomed(test_channel) << std::endl;
67 std::this_thread::sleep_for(std::chrono::seconds(10));
69 std::cout <<
"after sleep" << std::endl;
bool connect(const std::string &dev_name="/dev/ttyUSB0", const unsigned int &retry_count=3)
Open connection to SCHUNK five finger hand. Wait until expected return packages are received...
bool resetChannel(const SVHChannel &channel)
reset function for channel
bool isEnabled(const SVHChannel &channel)
returns true, if current channel has been enabled
bool isHomed(const SVHChannel &channel)
returns true, if current channel has been resetted
void disconnect()
disconnect SCHUNK five finger hand
bool enableChannel(const SVHChannel &channel)
enable controller of channel
int main(int argc, const char *argv[])