|
@ -25,21 +25,18 @@ |
|
|
#include <string>
|
|
|
#include <string>
|
|
|
#include <iostream>
|
|
|
#include <iostream>
|
|
|
#include "SocketObject.h"
|
|
|
#include "SocketObject.h"
|
|
|
|
|
|
#include "Trajectroy.h"
|
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* This function returns the help information text to the client |
|
|
* This function returns the help information text to the client |
|
|
* for the getPositionJoints function. |
|
|
* for the getPositionJoints function. |
|
|
* |
|
|
* |
|
|
* @param client connection to client which will receive the response |
|
|
* @param client connection to client which will receive the response |
|
|
* @param arg unused but has to be there for matching the signature |
|
|
|
|
|
* |
|
|
* |
|
|
* @see getPositionJoints |
|
|
* @see getPositionJoints |
|
|
*/ |
|
|
*/ |
|
|
void getPositionJointsHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void getPositionJointsHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
@ -56,15 +53,11 @@ void getPositionJointsHelp(SocketObject& client, std::string& arg) |
|
|
* for the getPositionHomRowWise function. |
|
|
* for the getPositionHomRowWise function. |
|
|
* |
|
|
* |
|
|
* @param client connection to client which will receive the response |
|
|
* @param client connection to client which will receive the response |
|
|
* @param arg unused but has to be there for matching the signature |
|
|
|
|
|
* |
|
|
* |
|
|
* @see getPositionHomRowWise |
|
|
* @see getPositionHomRowWise |
|
|
*/ |
|
|
*/ |
|
|
void getPositionHomRowWiseHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void getPositionHomRowWiseHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
@ -91,15 +84,11 @@ void getPositionHomRowWiseHelp(SocketObject& client, std::string& arg) |
|
|
* for the getForceTorqueTcp function. |
|
|
* for the getForceTorqueTcp function. |
|
|
* |
|
|
* |
|
|
* @param client connection to client which will receive the response |
|
|
* @param client connection to client which will receive the response |
|
|
* @param arg unused but has to be there for matching the signature |
|
|
|
|
|
* |
|
|
* |
|
|
* @see getForceTorqueTcp |
|
|
* @see getForceTorqueTcp |
|
|
*/ |
|
|
*/ |
|
|
void getForceTorqueTcpHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void getForceTorqueTcpHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
@ -119,15 +108,11 @@ void getForceTorqueTcpHelp(SocketObject& client, std::string& arg) |
|
|
* for the movePTPJoints function. |
|
|
* for the movePTPJoints function. |
|
|
* |
|
|
* |
|
|
* @param client connection to client which will receive the response |
|
|
* @param client connection to client which will receive the response |
|
|
* @param arg unused but has to be there for matching the signature |
|
|
|
|
|
* |
|
|
* |
|
|
* @see movePTPJoints |
|
|
* @see movePTPJoints |
|
|
*/ |
|
|
*/ |
|
|
void movePTPJointsHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void movePTPJointsHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
@ -151,18 +136,17 @@ void movePTPJointsHelp(SocketObject& client, std::string& arg) |
|
|
* for the moveHomRowWiseStatus function. |
|
|
* for the moveHomRowWiseStatus function. |
|
|
* |
|
|
* |
|
|
* @param client connection to client which will receive the response |
|
|
* @param client connection to client which will receive the response |
|
|
* @param arg unused but has to be there for matching the signature |
|
|
|
|
|
* |
|
|
* |
|
|
* @see moveHomRowWiseStatus |
|
|
* @see moveHomRowWiseStatus |
|
|
*/ |
|
|
*/ |
|
|
void moveHomRowWiseStatusHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void moveHomRowWiseStatusHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
|
|
|
|
// add the help text to the buffer
|
|
|
|
|
|
out += "\n"; |
|
|
|
|
|
|
|
|
// send message to client
|
|
|
// send message to client
|
|
|
client.Send(out); |
|
|
client.Send(out); |
|
|
} |
|
|
} |
|
@ -172,18 +156,21 @@ void moveHomRowWiseStatusHelp(SocketObject& client, std::string& arg) |
|
|
* for the setSpeed function. |
|
|
* for the setSpeed function. |
|
|
* |
|
|
* |
|
|
* @param client connection to client which will receive the response |
|
|
* @param client connection to client which will receive the response |
|
|
* @param arg unused but has to be there for matching the signature |
|
|
|
|
|
* |
|
|
* |
|
|
* @see setSpeed |
|
|
* @see setSpeed |
|
|
*/ |
|
|
*/ |
|
|
void setSpeedHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void setSpeedHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
|
|
|
|
// add the help text to the buffer
|
|
|
|
|
|
out += "The velocity percentage of the robot.\n"; |
|
|
|
|
|
out += "The percentage value has to be positive and \n"; |
|
|
|
|
|
out += "within the interval of \"(0 100]\". If the new \n"; |
|
|
|
|
|
out += "value is a valid one the return string will be \"true\"\n"; |
|
|
|
|
|
out += "otherwise \"false\"\n"; |
|
|
|
|
|
|
|
|
// send message to client
|
|
|
// send message to client
|
|
|
client.Send(out); |
|
|
client.Send(out); |
|
|
} |
|
|
} |
|
@ -193,17 +180,20 @@ void setSpeedHelp(SocketObject& client, std::string& arg) |
|
|
* for the setAccel function. |
|
|
* for the setAccel function. |
|
|
* |
|
|
* |
|
|
* @param client connection to client which will receive the response |
|
|
* @param client connection to client which will receive the response |
|
|
* @param arg unused but has to be there for matching the signature |
|
|
|
|
|
* |
|
|
* |
|
|
* @see setAccel |
|
|
* @see setAccel |
|
|
*/ |
|
|
*/ |
|
|
void setAccelHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void setAccelHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
|
|
|
|
// add the help text to the buffer
|
|
|
|
|
|
out += "The acceleration percentage of the robot.\n"; |
|
|
|
|
|
out += "The percentage value has to be positive and \n"; |
|
|
|
|
|
out += "within the interval of \"(0 100]\". If the new \n"; |
|
|
|
|
|
out += "value is a valid one the return string will be \"true\"\n"; |
|
|
|
|
|
out += "otherwise \"false\"\n"; |
|
|
|
|
|
|
|
|
// send message to client
|
|
|
// send message to client
|
|
|
client.Send(out); |
|
|
client.Send(out); |
|
@ -214,18 +204,21 @@ void setAccelHelp(SocketObject& client, std::string& arg) |
|
|
* for the startPotFieldMode function. |
|
|
* for the startPotFieldMode function. |
|
|
* |
|
|
* |
|
|
* @param client connection to client which will receive the response |
|
|
* @param client connection to client which will receive the response |
|
|
* @param arg unused but has to be there for matching the signature |
|
|
|
|
|
* |
|
|
* |
|
|
* @see startPotFieldMode |
|
|
* @see startPotFieldMode |
|
|
*/ |
|
|
*/ |
|
|
void startPotFieldModeHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void startPotFieldModeHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
|
|
|
|
// add the help text to the buffer
|
|
|
|
|
|
out += "This command starts the PotFieldMode and deactivate the TrajectoryType\n"; |
|
|
|
|
|
out += "The PotFieldMode is a mode with no trajectory planing\n"; |
|
|
|
|
|
out += "The entered joint movements are directly executed by \n"; |
|
|
|
|
|
out += "the robot. The Robot itself might stop and block motors\n"; |
|
|
|
|
|
out += "if the Acceleration and Velocity is to high\n"; |
|
|
|
|
|
|
|
|
// send message to client
|
|
|
// send message to client
|
|
|
client.Send(out); |
|
|
client.Send(out); |
|
|
} |
|
|
} |
|
@ -239,14 +232,18 @@ void startPotFieldModeHelp(SocketObject& client, std::string& arg) |
|
|
* |
|
|
* |
|
|
* @see stopPotFieldMode |
|
|
* @see stopPotFieldMode |
|
|
*/ |
|
|
*/ |
|
|
void stopPotFieldModeHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void stopPotFieldModeHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
|
|
|
|
// add the help text to the buffer
|
|
|
|
|
|
out += "This command stops the PotFieldMode and activates the TrajectoryType again\n"; |
|
|
|
|
|
out += "The PotFieldMode is a mode with no trajectory planing\n"; |
|
|
|
|
|
out += "The entered joint movements are directly executed by \n"; |
|
|
|
|
|
out += "the robot. The Robot itself might stop and block motors\n"; |
|
|
|
|
|
out += "if the Acceleration and Velocity is to high\n"; |
|
|
|
|
|
|
|
|
// send message to client
|
|
|
// send message to client
|
|
|
client.Send(out); |
|
|
client.Send(out); |
|
|
} |
|
|
} |
|
@ -260,14 +257,15 @@ void stopPotFieldModeHelp(SocketObject& client, std::string& arg) |
|
|
* |
|
|
* |
|
|
* @see quit |
|
|
* @see quit |
|
|
*/ |
|
|
*/ |
|
|
void quitHelp(SocketObject& client , std::string& arg) |
|
|
|
|
|
|
|
|
void quitHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
|
|
|
|
// add the help text to the buffer
|
|
|
|
|
|
out += "This command stops the communication so an other user might\n"; |
|
|
|
|
|
out += "be able to connect.\n"; |
|
|
|
|
|
|
|
|
// send message to client
|
|
|
// send message to client
|
|
|
client.Send(out); |
|
|
client.Send(out); |
|
|
} |
|
|
} |
|
@ -281,14 +279,23 @@ void quitHelp(SocketObject& client , std::string& arg) |
|
|
* |
|
|
* |
|
|
* @see quit |
|
|
* @see quit |
|
|
*/ |
|
|
*/ |
|
|
void setTrajectoryTypeHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void setTrajectoryTypeHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
|
|
|
|
// add the help text to the buffer
|
|
|
|
|
|
out += "This command sets the type of the Trajectory for all kind of\n"; |
|
|
|
|
|
out += "movements.\n"; |
|
|
|
|
|
out += "The possible Trajectory types are:\n"; |
|
|
|
|
|
|
|
|
|
|
|
initTrajectoryType(); |
|
|
|
|
|
int items = __TrajectoryCount; |
|
|
|
|
|
for (int i = 0 ; i < items ; ++i) |
|
|
|
|
|
{ |
|
|
|
|
|
out += "\t " + trajectoryTypeStr[i].str + "\n"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// send message to client
|
|
|
// send message to client
|
|
|
client.Send(out); |
|
|
client.Send(out); |
|
|
} |
|
|
} |
|
@ -302,11 +309,8 @@ void setTrajectoryTypeHelp(SocketObject& client, std::string& arg) |
|
|
* |
|
|
* |
|
|
* @see getTrajectoryType |
|
|
* @see getTrajectoryType |
|
|
*/ |
|
|
*/ |
|
|
void getTrajectoryTypeHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void getTrajectoryTypeHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
@ -323,14 +327,15 @@ void getTrajectoryTypeHelp(SocketObject& client, std::string& arg) |
|
|
* |
|
|
* |
|
|
* @see isKukaLwr |
|
|
* @see isKukaLwr |
|
|
*/ |
|
|
*/ |
|
|
void isKukaLwrHelp(SocketObject& client, std::string& arg) |
|
|
|
|
|
|
|
|
void isKukaLwrHelp(SocketObject& client) |
|
|
{ |
|
|
{ |
|
|
// unused
|
|
|
|
|
|
(void) arg; |
|
|
|
|
|
|
|
|
|
|
|
// set up the string buffers
|
|
|
// set up the string buffers
|
|
|
std::string out = ""; |
|
|
std::string out = ""; |
|
|
|
|
|
|
|
|
|
|
|
// assemble the help text for the client
|
|
|
|
|
|
out += "Returns \"true if the server is handling with a Kuka LWR Robot\n"; |
|
|
|
|
|
out += "\"false\" otherwise \n"; |
|
|
|
|
|
|
|
|
// send message to client
|
|
|
// send message to client
|
|
|
client.Send(out); |
|
|
client.Send(out); |
|
|
} |
|
|
} |