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

Verified that the use of a char buffer + string concatenation is actually faster than a stringstram

This commit is contained in:
Thomas Timm Andersen
2015-09-15 11:56:28 +02:00
parent 4d5c7101ba
commit b5a687a54a
2 changed files with 2 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ void UrDriver::addTraj(std::vector<double> inp_timestamps,
timestamps.push_back(inp_timestamps[inp_timestamps.size() - 1]);
positions.push_back(inp_positions[inp_positions.size() - 1]);
/* This is actually faster than using a stringstream :-o */
for (unsigned int i = 1; i < timestamps.size(); i++) {
char buf[128];
sprintf(buf,