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

Fixed minor parsing issues with RTState

This commit is contained in:
Simon Rasmussen
2017-03-01 12:40:55 +01:00
parent 71ebb4afbf
commit e4bc40fc09
2 changed files with 8 additions and 9 deletions

View File

@@ -16,8 +16,8 @@ public:
class RTShared {
protected:
bool parse_shared1(BinParser& bp);
bool parse_shared2(BinParser& bp);
void parse_shared1(BinParser& bp);
void parse_shared2(BinParser& bp);
public:
double time;
@@ -34,14 +34,14 @@ public:
double tcp_force[6];
//does not contain "_actual" postfix in V11_X but
//does not contain "_actual" postfix in V1_X but
//they're the same fields so share anyway
cartesian_coord_t tool_vector_actual;
cartesian_coord_t tcp_speed_actual;
//gap here depending on version
uint64_t digital_input;
uint64_t digital_inputs;
double motor_temperatures[6];
double controller_time;
double robot_mode;

View File

@@ -1,7 +1,7 @@
#include "ur_modern_driver/ur/rt_state.h"
#include "ur_modern_driver/ur/consumer.h"
bool RTShared::parse_shared1(BinParser& bp)
void RTShared::parse_shared1(BinParser& bp)
{
bp.parse(time);
bp.parse(q_target);
@@ -12,17 +12,15 @@ bool RTShared::parse_shared1(BinParser& bp)
bp.parse(q_actual);
bp.parse(qd_actual);
bp.parse(i_actual);
return true;
}
bool RTShared::parse_shared2(BinParser& bp)
void RTShared::parse_shared2(BinParser& bp)
{
bp.parse(digital_input);
bp.parse(digital_inputs);
bp.parse(motor_temperatures);
bp.parse(controller_time);
bp.consume(sizeof(double)); //Unused "Test value" field
bp.parse(robot_mode);
return true;
}
bool RTState_V1_6__7::parse_with(BinParser& bp)
@@ -33,6 +31,7 @@ bool RTState_V1_6__7::parse_with(BinParser& bp)
parse_shared1(bp);
bp.parse(tool_accelerometer_values);
bp.consume(sizeof(double)*15);
bp.parse(tcp_force);
bp.parse(tool_vector_actual);
bp.parse(tcp_speed_actual);