mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 18:10:47 +02:00
Changed uint to unsigned int for better cross-platform performance
This commit is contained in:
@@ -17,11 +17,13 @@
|
|||||||
#include "ur_realtime_communication.h"
|
#include "ur_realtime_communication.h"
|
||||||
|
|
||||||
class UrDriver {
|
class UrDriver {
|
||||||
|
private:
|
||||||
|
double maximum_time_step_;
|
||||||
public:
|
public:
|
||||||
UrRealtimeCommunication* rt_interface_;
|
UrRealtimeCommunication* rt_interface_;
|
||||||
|
|
||||||
UrDriver(std::condition_variable& msg_cond, std::string host,
|
UrDriver(std::condition_variable& msg_cond, std::string host,
|
||||||
uint safety_count_max = 12);
|
unsigned int safety_count_max = 12);
|
||||||
void start();
|
void start();
|
||||||
void halt();
|
void halt();
|
||||||
void setSpeed(double q0, double q1, double q2, double q3, double q4,
|
void setSpeed(double q0, double q1, double q2, double q3, double q4,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
class UrRealtimeCommunication {
|
class UrRealtimeCommunication {
|
||||||
private:
|
private:
|
||||||
const double SAMPLETIME_;
|
const double SAMPLETIME_;
|
||||||
uint safety_count_max_;
|
unsigned int safety_count_max_;
|
||||||
int sockfd_;
|
int sockfd_;
|
||||||
struct sockaddr_in serv_addr_;
|
struct sockaddr_in serv_addr_;
|
||||||
struct hostent *server_;
|
struct hostent *server_;
|
||||||
@@ -41,7 +41,7 @@ private:
|
|||||||
int flag_;
|
int flag_;
|
||||||
std::recursive_mutex command_string_lock_;
|
std::recursive_mutex command_string_lock_;
|
||||||
std::string command_;
|
std::string command_;
|
||||||
uint safety_count_;
|
unsigned int safety_count_;
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
RobotStateRT* robot_state_;
|
RobotStateRT* robot_state_;
|
||||||
|
|
||||||
UrRealtimeCommunication(std::condition_variable& msg_cond, std::string host,
|
UrRealtimeCommunication(std::condition_variable& msg_cond, std::string host,
|
||||||
uint safety_count_max = 12);
|
unsigned int safety_count_max = 12);
|
||||||
void start();
|
void start();
|
||||||
void halt();
|
void halt();
|
||||||
void setSpeed(double q0, double q1, double q2, double q3, double q4,
|
void setSpeed(double q0, double q1, double q2, double q3, double q4,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "ur_modern_driver/ur_driver.h"
|
#include "ur_modern_driver/ur_driver.h"
|
||||||
|
|
||||||
UrDriver::UrDriver(std::condition_variable& msg_cond, std::string host,
|
UrDriver::UrDriver(std::condition_variable& msg_cond, std::string host,
|
||||||
uint safety_count_max) {
|
unsigned int safety_count_max) {
|
||||||
rt_interface_ = new UrRealtimeCommunication(msg_cond, host,
|
rt_interface_ = new UrRealtimeCommunication(msg_cond, host,
|
||||||
safety_count_max);
|
safety_count_max);
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
UrRealtimeCommunication::UrRealtimeCommunication(
|
UrRealtimeCommunication::UrRealtimeCommunication(
|
||||||
std::condition_variable& msg_cond, std::string host,
|
std::condition_variable& msg_cond, std::string host,
|
||||||
uint safety_count_max) :
|
unsigned int safety_count_max) :
|
||||||
SAMPLETIME_(0.008) {
|
SAMPLETIME_(0.008) {
|
||||||
robot_state_ = new RobotStateRT(msg_cond);
|
robot_state_ = new RobotStateRT(msg_cond);
|
||||||
bzero((char *) &serv_addr_, sizeof(serv_addr_));
|
bzero((char *) &serv_addr_, sizeof(serv_addr_));
|
||||||
|
|||||||
Reference in New Issue
Block a user