1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 10:00:48 +02:00

Added minPayload, maxPayload and maxVelocity

This commit is contained in:
Thomas Timm Andersen
2015-09-10 13:43:58 +02:00
parent 1c2b3ad259
commit 017810c30f
3 changed files with 23 additions and 5 deletions

View File

@@ -12,10 +12,11 @@
#include "ur_modern_driver/ur_driver.h"
UrDriver::UrDriver(std::condition_variable& msg_cond, std::string host,
unsigned int safety_count_max) {
unsigned int safety_count_max) :
maximum_time_step_(0.08), maximum_velocity_(10.0), minimum_payload_(
0.0), maximum_payload_(1.0) {
rt_interface_ = new UrRealtimeCommunication(msg_cond, host,
safety_count_max);
maximum_time_step_ = 0.08;
}
@@ -142,10 +143,20 @@ void UrDriver::setAnalogOut(unsigned int n, double f) {
rt_interface_->addCommandToQueue(buf);
}
void UrDriver::setPayloaf(double m){
void UrDriver::setPayload(double m) {
char buf[256];
sprintf(buf, "sec setOut():\n\tset_payload(%1.3f)\nend\n", m);
printf("%s", buf);
rt_interface_->addCommandToQueue(buf);
}
void UrDriver::setMaxVel(double vel) {
maximum_velocity_ = vel;
}
void UrDriver::setMinPayload(double m) {
minimum_payload_ = m;
}
void UrDriver::setMaxPayload(double m) {
maximum_payload_ = m;
}

View File

@@ -163,7 +163,7 @@ private:
bool setPayload(ur_msgs::SetPayloadRequest& req,
ur_msgs::SetPayloadResponse& resp) {
robot_.setPayloaf(req.payload);
robot_.setPayload(req.payload);
resp.success = true;
return true;
}