From e4bc40fc09988cb49151fc9469719d23fd20dbd4 Mon Sep 17 00:00:00 2001 From: Simon Rasmussen Date: Wed, 1 Mar 2017 12:40:55 +0100 Subject: [PATCH] Fixed minor parsing issues with RTState --- include/ur_modern_driver/ur/rt_state.h | 8 ++++---- src/ur/rt_state.cpp | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/ur_modern_driver/ur/rt_state.h b/include/ur_modern_driver/ur/rt_state.h index 5574293..ea2dd5e 100644 --- a/include/ur_modern_driver/ur/rt_state.h +++ b/include/ur_modern_driver/ur/rt_state.h @@ -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; diff --git a/src/ur/rt_state.cpp b/src/ur/rt_state.cpp index fe405af..2264835 100644 --- a/src/ur/rt_state.cpp +++ b/src/ur/rt_state.cpp @@ -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);