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

Big code dump

This commit is contained in:
Simon Rasmussen
2017-04-17 13:03:54 +02:00
parent b4bb424058
commit 46f4e493cf
24 changed files with 989 additions and 257 deletions

View File

@@ -9,6 +9,10 @@ bool URCommander::write(std::string& s)
return res > 0 && static_cast<size_t>(res) == len;
}
bool URCommander::uploadProg(std::string &s)
{
return write(s);
}
bool URCommander::speedj(std::array<double, 6> &speeds, double acceleration)
{
@@ -52,11 +56,17 @@ bool URCommander::setToolVoltage(uint8_t voltage)
}
bool URCommander::setFlag(bool value)
bool URCommander::setFlag(uint8_t pin, bool value)
{
std::ostringstream out;
out << "set_flag(" << (int)pin << "," << (value ? "True" : "False") << ")\n";
std::string s(out.str());
return write(s);
}
bool URCommander::setPayload(double value)
{
std::ostringstream out;
out << "set_payload(" << std::fixed << std::setprecision(4) << value << ")\n";
std::string s(out.str());
return write(s);
}