mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 10:00:48 +02:00
Merge branch 'master' of https://github.com/ThomasTimm/ur_modern_driver
This commit is contained in:
@@ -98,9 +98,16 @@ void UrRealtimeCommunication::addCommandToQueue(std::string inp) {
|
||||
void UrRealtimeCommunication::setSpeed(double q0, double q1, double q2,
|
||||
double q3, double q4, double q5, double acc) {
|
||||
char cmd[1024];
|
||||
if( robot_state_->getVersion() >= 3.1 ) {
|
||||
sprintf(cmd,
|
||||
"speedj([%1.5f, %1.5f, %1.5f, %1.5f, %1.5f, %1.5f], %f)\n",
|
||||
q0, q1, q2, q3, q4, q5, acc);
|
||||
}
|
||||
else {
|
||||
sprintf(cmd,
|
||||
"speedj([%1.5f, %1.5f, %1.5f, %1.5f, %1.5f, %1.5f], %f, 0.02)\n",
|
||||
q0, q1, q2, q3, q4, q5, acc);
|
||||
}
|
||||
addCommandToQueue((std::string) (cmd));
|
||||
if (q0 != 0. or q1 != 0. or q2 != 0. or q3 != 0. or q4 != 0. or q5 != 0.) {
|
||||
//If a joint speed is set, make sure we stop it again after some time if the user doesn't
|
||||
|
||||
Reference in New Issue
Block a user