31 static std::vector<int> x,y,z,u,v,w;
32 static const int xArr[], yArr[], zArr[], uArr[], vArr[], wArr[];
38 const double PI = 3.14159265358979323846;
40 int main(
int argc,
char *argv[]) {
42 std::cout <<
"---------------------------------\n";
43 std::cout <<
"usage for socket connection: socketcontrol CONFIGFILE IP_ADDR\n";
44 std::cout <<
"---------------------------------\n";
47 std::cout <<
"--------------------------\n";
48 std::cout <<
"SOCKETCONTROL DEMO STARTED\n";
49 std::cout <<
"--------------------------\n";
50 std::unique_ptr<CCdlSocket>
device;
51 std::unique_ptr<CCplSerialCRC>
protocol;
55 std::cout <<
"-------------------------------------------\n";
56 std::cout <<
"success: port " << port <<
" open\n";
57 std::cout <<
"-------------------------------------------\n";
59 std::cout <<
"-------------------------------------------\n";
60 std::cout <<
"success: protocol class instantiated\n";
61 std::cout <<
"-------------------------------------------\n";
62 protocol->init(device.get());
63 std::cout <<
"-------------------------------------------\n";
64 std::cout <<
"success: communication with Katana initialized\n";
65 std::cout <<
"-------------------------------------------\n";
67 katana->create(argv[1], protocol.get());
69 std::cout <<
"ERROR: " << e.
message() << std::endl;
72 std::cout <<
"-------------------------------------------\n";
73 std::cout <<
"success: katana initialized\n";
74 std::cout <<
"-------------------------------------------\n";
77 for (
int i = 0; i< 6; i++){
85 katana->setMaximumLinearVelocity(60);
90 std::cout <<
"-------------------------------------------\n";
91 std::cout <<
"An exception occurred while communicating with the Katana.\n";
92 std::cout <<
"-------------------------------------------\n";
static std::unique_ptr< CCdlSocket > device
static std::unique_ptr< CCplSerialCRC > protocol
std::string message() const
int main(int argc, char *argv[])
std::unique_ptr< CLMBase > katana
Implement the Serial-Zero protocol.
Encapsulates the socket communication device.
structure for the currently active axis
std::vector< int > encoders