From d5d184cc0bc6de0082ef7b002e3c9e48c7b9a753 Mon Sep 17 00:00:00 2001 From: JeanNshuti <16186@ecam.be> Date: Tue, 27 Feb 2018 21:37:26 +0100 Subject: [PATCH 01/11] first commit. I2C implemented. Team colour detection and servo control --- .../BallSeparationLib/BallSeparationLib.cpp | 112 ++++++++++++++++++ arduino/BallSeparationLib/BallSeparationLib.h | 15 +++ arduino/BallSeparationLib/library.properties | 9 ++ arduino/Ball_sorting/Ball_sorting.ino | 103 ++++++++++++++++ 4 files changed, 239 insertions(+) create mode 100644 arduino/BallSeparationLib/BallSeparationLib.cpp create mode 100644 arduino/BallSeparationLib/BallSeparationLib.h create mode 100644 arduino/BallSeparationLib/library.properties create mode 100644 arduino/Ball_sorting/Ball_sorting.ino diff --git a/arduino/BallSeparationLib/BallSeparationLib.cpp b/arduino/BallSeparationLib/BallSeparationLib.cpp new file mode 100644 index 0000000..98dd245 --- /dev/null +++ b/arduino/BallSeparationLib/BallSeparationLib.cpp @@ -0,0 +1,112 @@ +/**************************************************************************/ +/*! + @file BallSeparationLib.cpp + @author Ecambotics + @license opensource + + Abstraction for lower level instructions. + + v1.0 - First release +*/ +/**************************************************************************/ +#include +#include "BallSeparationLib.h" + +// Create cs object and Initialise with specific values +// (int time = 50ms, gain = 4x) +Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_50MS, TCS34725_GAIN_4X); + +//Servo definitions +Servo servo; +int servoPin = 9; +int servoAngle = 0; // servo position in degrees + +/**************************************************************************/ +/*! + @brief Starts up CS. Returns 1 if successfully completed, 0 for any + malfunction +*/ +/**************************************************************************/ +int csStartUpRoutine(void) +{ + int result = 0; + if (tcs.begin()) { + result = 1; + return result; + } else { + return result; + //while (1); // halt! + } +} + +/**************************************************************************/ +/*! + @brief +*/ +/**************************************************************************/ +const char* csCheckTeamColor(void) +{ + //Variables to hold RGB values of colour detected + uint16_t clear, red, green, blue; + + //Lower and upper ranges for green and orange + uint16_t upperrangeG[3] = {100, 153, 71}; + uint16_t lowerrangeG[3] = {50, 104, 52}; + uint16_t upperrangeO[3] = {216,75,44}; + uint16_t lowerrangeO[3] = {155, 60, 32}; + float r, g, b; + const char* teamColour; + + tcs.setInterrupt(false); // turn on LED + delay(60); // takes 50ms to read + tcs.getRawData(&red, &green, &blue, &clear); + tcs.setInterrupt(true); // turn off LED + + // Figure out some basic hex code for visualization + uint32_t sum = clear; + r = red; + r /= sum; + g = green; + g /= sum; + b = blue; + b /= sum; + r *= 256; g *= 256; b *= 256; + Serial.print("\t"); + + + Serial.print((int)r, HEX); Serial.print((int)g, HEX); Serial.print((int)b, HEX); + Serial.println(); + Serial.print((int)r ); Serial.print(" "); Serial.print((int)g);Serial.print(" "); Serial.println((int)b ); + + if((r < upperrangeG[0] && g < upperrangeG[1] && b < upperrangeG[2]) || (r > lowerrangeG[0] && g > lowerrangeG[1] && b > lowerrangeG[2])){ + delay(100); + teamColour = "Green"; + //Serial.print("Green"); + } + if((r < upperrangeO[0] && g < upperrangeO[1] && b < upperrangeO[2]) || (r > lowerrangeO[0] && g > lowerrangeO[1] && b > lowerrangeO[2])){ + delay(100); + teamColour= "Orange"; + //Serial.print("Orange"); + } + + return teamColour; +} + +void servoStart(void) +{ + servo.attach(servoPin); +} + +void servoComputePos(int position) +{ + if(position == 1){ + //Clean ball collection + servoAngle = 90; + servo.write(servoAngle); + } + if(position == 2){ + //Dirty ball collection + servoAngle = 0; + servo.write(servoAngle); + } +} \ No newline at end of file diff --git a/arduino/BallSeparationLib/BallSeparationLib.h b/arduino/BallSeparationLib/BallSeparationLib.h new file mode 100644 index 0000000..6f40ac7 --- /dev/null +++ b/arduino/BallSeparationLib/BallSeparationLib.h @@ -0,0 +1,15 @@ + /**********************************************************/ + /*! + Ball separating library used to hide lower level instruc- + tions from the main file. + */ + /**********************************************************/ + +#include +#include + +//Functions +int csStartUpRoutine(void); +const char* csCheckTeamColor(void); +void servoComputePos(int position); +void servoStart(void); \ No newline at end of file diff --git a/arduino/BallSeparationLib/library.properties b/arduino/BallSeparationLib/library.properties new file mode 100644 index 0000000..9413bc1 --- /dev/null +++ b/arduino/BallSeparationLib/library.properties @@ -0,0 +1,9 @@ +name=Ball Separation Library v1 +version=1 +author=ECAMbotics +maintainer=ECAM <16186@ecam.be> +sentence=Library based on lower level instructions for the separation of balls in the Minus robot of Eurobot competition. +paragraph=Library based on lower level instructions for the separation of balls in the Minus robot of Eurobot competition.. +category=Device Control +url=https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library +architectures=* \ No newline at end of file diff --git a/arduino/Ball_sorting/Ball_sorting.ino b/arduino/Ball_sorting/Ball_sorting.ino new file mode 100644 index 0000000..4ecdc07 --- /dev/null +++ b/arduino/Ball_sorting/Ball_sorting.ino @@ -0,0 +1,103 @@ +#include +//#include +#include +#include + +const char I2C_ADDRESS = 0x60; + +//Servo definitions +int cmd_ServoPos = 0; // position requested by ROS + +//Electromagnet global definitions + + +//Gun global definitions + +void setup() { + Serial.begin(9600); + servoStart(); + + Wire.begin(I2C_ADDRESS); // join i2c bus + Wire.onReceive(receiveEvent); // register callback for when we receive data +} + +void loop() { + delay(100); +} + +void receiveEvent(int numBytes) { + const char* teamColour = ""; + + if (Wire.available() > 2) { + unsigned char reg = Wire.read(); + + switch (reg) { + // Configuration. Detect team color and send answer + // to master (ROS board) + case 0x00: + Serial.println("Initialising color sensor"); + if(csStartUpRoutine()){ + Serial.println("Found sensor"); + teamColour = csCheckTeamColor(); + Serial.println(teamColour); + //Send I2c message of success and team colour to ROS + }else{ + Serial.println("No TCS34725 found ... check your connections"); + //Send I2c message of failure to ROS + } + break; + + // Set ball valve in position 1 or position 2 for clean/dirty + // balls collection + case 0x01: + //Expecting 2 bytes (int) of data for position info + if (Wire.available() >= 2) { + unsigned char b0 = Wire.read(); + unsigned char b1 = Wire.read(); + cmd_ServoPos = bytesToInt(b0,b1); + servoComputePos(cmd_ServoPos); + + /*if(cmd_ServoPos == 1){ + //Clean ball collection + servoAngle = 90; + servo.write(servoAngle); + } + if(cmd_ServoPos == 2){ + //Dirty ball collection + servoAngle = 0; + servo.write(servoAngle); + } */ + } + break; + + // Launch stepper motor + case 0x02: + if (Wire.available() >= 4) { + } + break; + + // Release electromagnet for dirty balls trap + case 0x03: + if (Wire.available() >= 4) { + } + break; + + // Initialise and set up Gun + case 0x04: + if (Wire.available() >= 4) { + } + break; + + // Start shooting routine + case 0x05: + if (Wire.available() >= 4) { + } + break; + + default: + Serial.println("Unexcpected register access over I2C"); + break; + } + } + + } From 9d0269c88314bd6b5531ead898366124f0f24479 Mon Sep 17 00:00:00 2001 From: JeanNshuti <16186@ecam.be> Date: Tue, 27 Feb 2018 22:47:44 +0100 Subject: [PATCH 02/11] refactoring. Moved servo functions to ballseparationlib --- arduino/Ball_sorting/Ball_sorting.ino | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/arduino/Ball_sorting/Ball_sorting.ino b/arduino/Ball_sorting/Ball_sorting.ino index 4ecdc07..f0ddace 100644 --- a/arduino/Ball_sorting/Ball_sorting.ino +++ b/arduino/Ball_sorting/Ball_sorting.ino @@ -1,5 +1,4 @@ #include -//#include #include #include @@ -56,17 +55,6 @@ void receiveEvent(int numBytes) { unsigned char b1 = Wire.read(); cmd_ServoPos = bytesToInt(b0,b1); servoComputePos(cmd_ServoPos); - - /*if(cmd_ServoPos == 1){ - //Clean ball collection - servoAngle = 90; - servo.write(servoAngle); - } - if(cmd_ServoPos == 2){ - //Dirty ball collection - servoAngle = 0; - servo.write(servoAngle); - } */ } break; From 5040c23e2eab572310a4c5b94bbe77ff88c1b69c Mon Sep 17 00:00:00 2001 From: JeanNshuti <16186@ecam.be> Date: Wed, 28 Feb 2018 16:36:20 +0100 Subject: [PATCH 03/11] Adding Readme doc --- arduino/Ball_sorting/README.md | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 arduino/Ball_sorting/README.md diff --git a/arduino/Ball_sorting/README.md b/arduino/Ball_sorting/README.md new file mode 100644 index 0000000..9685a6c --- /dev/null +++ b/arduino/Ball_sorting/README.md @@ -0,0 +1,42 @@ +# Ball_sorting + +## Main Code + +This code currently implements I2C communication on an arduino board +allowing for messages from a master controller to pilot the Adafruit_TCS34725 +colour sensor for colour detection and to position a servo motor depending on +data sent over bus. + +## BallSeparationLib + +`BallSeparationLib` is an Arduino library containing high level functions +used to hide lower level instructions from main and thus ease readability. +Currently, it contains functions to identify the team's colour for the robot +and direct control over the position of a servo motor. + +### Dependencies +`BallSeparationLib` uses the following libraries: + +**Servo.h** Already installed in Arduino IDE + +**ecamlib.h** Cross reference installation guide/readme for ecamlib + +**Adafruit_TCS34725.h** Needs to be dowloaded and installed as described here: + https://learn.adafruit.com/adafruit-color-sensors/arduino-code + +### Install + +Cross-reference installation guide of **ecamlib.h**, `BallSeparationLib` can be +installed in the same way either by **Zip**, **Copy**, or **SymLink**. + + +### Usage +When the library is installed in the Arduino IDE, you should be +able to use it by selecting `Sketch > Include Library > BallSeparationLib` +You will probably need to scroll to the end of the list. + +It will add an include in the source file for you: + +```cpp +#include +``` \ No newline at end of file From b6167ab9de4be89d11e2409be0edcc9a03b362bf Mon Sep 17 00:00:00 2001 From: JeanNshuti <16186@ecam.be> Date: Wed, 28 Feb 2018 20:43:58 +0100 Subject: [PATCH 04/11] Fixed colour detection function. Detection now loops until orange or green is detected. --- .../BallSeparationLib/BallSeparationLib.cpp | 64 ++++++++++--------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/arduino/BallSeparationLib/BallSeparationLib.cpp b/arduino/BallSeparationLib/BallSeparationLib.cpp index 98dd245..00bf4d1 100644 --- a/arduino/BallSeparationLib/BallSeparationLib.cpp +++ b/arduino/BallSeparationLib/BallSeparationLib.cpp @@ -55,40 +55,42 @@ const char* csCheckTeamColor(void) uint16_t upperrangeO[3] = {216,75,44}; uint16_t lowerrangeO[3] = {155, 60, 32}; float r, g, b; - const char* teamColour; + const char* teamColour = ""; + while(teamColour == ""){ + Serial.println("Waiting for team colour..."); + tcs.setInterrupt(false); // turn on LED + delay(60); // takes 50ms to read + tcs.getRawData(&red, &green, &blue, &clear); + tcs.setInterrupt(true); // turn off LED - tcs.setInterrupt(false); // turn on LED - delay(60); // takes 50ms to read - tcs.getRawData(&red, &green, &blue, &clear); - tcs.setInterrupt(true); // turn off LED + // Figure out some basic hex code for visualization + uint32_t sum = clear; + r = red; + r /= sum; + g = green; + g /= sum; + b = blue; + b /= sum; + r *= 256; g *= 256; b *= 256; + Serial.print("\t"); + - // Figure out some basic hex code for visualization - uint32_t sum = clear; - r = red; - r /= sum; - g = green; - g /= sum; - b = blue; - b /= sum; - r *= 256; g *= 256; b *= 256; - Serial.print("\t"); - + Serial.print((int)r, HEX); Serial.print((int)g, HEX); Serial.print((int)b, HEX); + Serial.println(); + Serial.print((int)r ); Serial.print(" "); Serial.print((int)g);Serial.print(" "); Serial.println((int)b ); - Serial.print((int)r, HEX); Serial.print((int)g, HEX); Serial.print((int)b, HEX); - Serial.println(); - Serial.print((int)r ); Serial.print(" "); Serial.print((int)g);Serial.print(" "); Serial.println((int)b ); - - if((r < upperrangeG[0] && g < upperrangeG[1] && b < upperrangeG[2]) || (r > lowerrangeG[0] && g > lowerrangeG[1] && b > lowerrangeG[2])){ - delay(100); - teamColour = "Green"; - //Serial.print("Green"); - } - if((r < upperrangeO[0] && g < upperrangeO[1] && b < upperrangeO[2]) || (r > lowerrangeO[0] && g > lowerrangeO[1] && b > lowerrangeO[2])){ - delay(100); - teamColour= "Orange"; - //Serial.print("Orange"); - } - + if((r < upperrangeG[0] && g < upperrangeG[1] && b < upperrangeG[2]) || (r > lowerrangeG[0] && g > lowerrangeG[1] && b > lowerrangeG[2])){ + delay(100); + teamColour = "Green"; + //Serial.print("Green"); + } + if((r < upperrangeO[0] && g < upperrangeO[1] && b < upperrangeO[2]) || (r > lowerrangeO[0] && g > lowerrangeO[1] && b > lowerrangeO[2])){ + delay(100); + teamColour= "Orange"; + //Serial.print("Orange"); + } + + } return teamColour; } From 5498cdd3084c640ae8824ceab4bb212942d13b15 Mon Sep 17 00:00:00 2001 From: JeanNSHUTI <16186@ecam.be> Date: Fri, 9 Mar 2018 00:32:06 +0100 Subject: [PATCH 05/11] Added Dynamixel AX-12 control (used instead of arduino servo) for ball separation --- .../BallSeparationLib/BallSeparationLib.cpp | 26 +++++++++++++++++ arduino/BallSeparationLib/BallSeparationLib.h | 9 +++++- arduino/Ball_sorting/Ball_sorting.ino | 28 ++++++++----------- arduino/Ball_sorting/README.md | 4 ++- 4 files changed, 49 insertions(+), 18 deletions(-) diff --git a/arduino/BallSeparationLib/BallSeparationLib.cpp b/arduino/BallSeparationLib/BallSeparationLib.cpp index 00bf4d1..09d0d4b 100644 --- a/arduino/BallSeparationLib/BallSeparationLib.cpp +++ b/arduino/BallSeparationLib/BallSeparationLib.cpp @@ -12,6 +12,15 @@ #include #include "BallSeparationLib.h" +//Dynamixel AX-12A definitions +#define DirectionPin (10u) +#define BaudRate (1000000ul) +#define ID (8u) + +int clean_ball_position = 180; +int dirty_ball_position = 0; +int initial_position = 90; + // Create cs object and Initialise with specific values // (int time = 50ms, gain = 4x) Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_50MS, TCS34725_GAIN_4X); @@ -111,4 +120,21 @@ void servoComputePos(int position) servoAngle = 0; servo.write(servoAngle); } +} + +void ax12Start(int speed) +{ + ax12a.begin(BaudRate, DirectionPin, &Serial); + ax12a.setEndless(ID, OFF); + //move into initial position + ax12a.moveSpeed(ID, initial_position, speed); +} + +void ax12ComputePos(int position, int speed) +{ + if(position == 1){ + ax12a.moveSpeed(ID, clean_ball_position, speed); + } else{ + ax12a.moveSpeed(ID, dirty_ball_position, speed); + } } \ No newline at end of file diff --git a/arduino/BallSeparationLib/BallSeparationLib.h b/arduino/BallSeparationLib/BallSeparationLib.h index 6f40ac7..1c01758 100644 --- a/arduino/BallSeparationLib/BallSeparationLib.h +++ b/arduino/BallSeparationLib/BallSeparationLib.h @@ -7,9 +7,16 @@ #include #include +#include + +#define DirectionPin (10u) +#define BaudRate (1000000ul) +#define ID (8u) //Functions int csStartUpRoutine(void); const char* csCheckTeamColor(void); void servoComputePos(int position); -void servoStart(void); \ No newline at end of file +void servoStart(void); +void ax12Start(int speed); +void ax12ComputePos(int position, int speed); \ No newline at end of file diff --git a/arduino/Ball_sorting/Ball_sorting.ino b/arduino/Ball_sorting/Ball_sorting.ino index f0ddace..a02f660 100644 --- a/arduino/Ball_sorting/Ball_sorting.ino +++ b/arduino/Ball_sorting/Ball_sorting.ino @@ -6,6 +6,7 @@ const char I2C_ADDRESS = 0x60; //Servo definitions int cmd_ServoPos = 0; // position requested by ROS +int servo_speed = 500; //speed for ax-12a movement //Electromagnet global definitions @@ -14,7 +15,7 @@ int cmd_ServoPos = 0; // position requested by ROS void setup() { Serial.begin(9600); - servoStart(); + ax12Start(servo_speed); //setup and intialise dynamixel ax-12a in initial position Wire.begin(I2C_ADDRESS); // join i2c bus Wire.onReceive(receiveEvent); // register callback for when we receive data @@ -31,10 +32,11 @@ void receiveEvent(int numBytes) { unsigned char reg = Wire.read(); switch (reg) { - // Configuration. Detect team color and send answer - // to master (ROS board) + // Configuration. Detect team color wit colour sensor and send + // answer to master (ROS board). Unused in March version of + // robot case 0x00: - Serial.println("Initialising color sensor"); + /*Serial.println("Initialising color sensor"); if(csStartUpRoutine()){ Serial.println("Found sensor"); teamColour = csCheckTeamColor(); @@ -43,24 +45,19 @@ void receiveEvent(int numBytes) { }else{ Serial.println("No TCS34725 found ... check your connections"); //Send I2c message of failure to ROS - } + } */ break; - // Set ball valve in position 1 or position 2 for clean/dirty - // balls collection + // Receive team colour from ROS and set ball + // valve in position 1 (Clean) or position 2 (Dirty) + // for clean/dirty balls collection. case 0x01: //Expecting 2 bytes (int) of data for position info if (Wire.available() >= 2) { unsigned char b0 = Wire.read(); unsigned char b1 = Wire.read(); cmd_ServoPos = bytesToInt(b0,b1); - servoComputePos(cmd_ServoPos); - } - break; - - // Launch stepper motor - case 0x02: - if (Wire.available() >= 4) { + ax12ComputePos(cmd_ServoPos, servo_speed); } break; @@ -86,6 +83,5 @@ void receiveEvent(int numBytes) { Serial.println("Unexcpected register access over I2C"); break; } - } - + } } diff --git a/arduino/Ball_sorting/README.md b/arduino/Ball_sorting/README.md index 9685a6c..a4844c0 100644 --- a/arduino/Ball_sorting/README.md +++ b/arduino/Ball_sorting/README.md @@ -21,8 +21,10 @@ and direct control over the position of a servo motor. **ecamlib.h** Cross reference installation guide/readme for ecamlib -**Adafruit_TCS34725.h** Needs to be dowloaded and installed as described here: +**Adafruit_TCS34725.h** Colour sensor. Needs to be dowloaded and installed as described here: https://learn.adafruit.com/adafruit-color-sensors/arduino-code + +**AX12A.h** Dynamixel AX-12A library. Can be downloaded and installed here: https://github.com/ThingType/AX-12A-servo-library ### Install From feed15502659d390f4cb3f7267b5ee873d8bae64 Mon Sep 17 00:00:00 2001 From: JeanNSHUTI <16186@ecam.be> Date: Fri, 9 Mar 2018 00:35:56 +0100 Subject: [PATCH 06/11] Added Dynamixel AX-12 control (used instead of arduino servo) for ball separation --- arduino/Ball_sorting/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/arduino/Ball_sorting/README.md b/arduino/Ball_sorting/README.md index a4844c0..42c538a 100644 --- a/arduino/Ball_sorting/README.md +++ b/arduino/Ball_sorting/README.md @@ -15,7 +15,6 @@ Currently, it contains functions to identify the team's colour for the robot and direct control over the position of a servo motor. ### Dependencies -`BallSeparationLib` uses the following libraries: **Servo.h** Already installed in Arduino IDE From dcd8a2373b98aaea353904cb8c4cdf14d7a31ed4 Mon Sep 17 00:00:00 2001 From: JeanNSHUTI <16186@ecam.be> Date: Fri, 16 Mar 2018 18:18:37 +0100 Subject: [PATCH 07/11] ReadMe --- arduino/Ball_sorting/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino/Ball_sorting/README.md b/arduino/Ball_sorting/README.md index 42c538a..4ecbf6e 100644 --- a/arduino/Ball_sorting/README.md +++ b/arduino/Ball_sorting/README.md @@ -28,7 +28,7 @@ and direct control over the position of a servo motor. ### Install Cross-reference installation guide of **ecamlib.h**, `BallSeparationLib` can be -installed in the same way either by **Zip**, **Copy**, or **SymLink**. +installed in the same way either by **Zip**, **Copy**, or **SymLink** (recommended). ### Usage From 8b9dab2d03105c70446e3e87081a6e6b3d16fcd8 Mon Sep 17 00:00:00 2001 From: JeanNSHUTI <16186@ecam.be> Date: Fri, 16 Mar 2018 20:49:38 +0100 Subject: [PATCH 08/11] Ros serial communication with arduino implemented. tested --- .../BallSeparationLib/BallSeparationLib.cpp | 50 ++++++++--- arduino/BallSeparationLib/BallSeparationLib.h | 4 +- arduino/Ball_sorting/Ball_sorting.ino | 87 ------------------- arduino/Ball_sorting/README.md | 43 --------- .../ball_sorting_bee_ctrl.ino | 77 ++++++++++++++++ 5 files changed, 119 insertions(+), 142 deletions(-) delete mode 100644 arduino/Ball_sorting/Ball_sorting.ino delete mode 100644 arduino/Ball_sorting/README.md create mode 100644 ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino diff --git a/arduino/BallSeparationLib/BallSeparationLib.cpp b/arduino/BallSeparationLib/BallSeparationLib.cpp index 09d0d4b..29b0b77 100644 --- a/arduino/BallSeparationLib/BallSeparationLib.cpp +++ b/arduino/BallSeparationLib/BallSeparationLib.cpp @@ -15,11 +15,14 @@ //Dynamixel AX-12A definitions #define DirectionPin (10u) #define BaudRate (1000000ul) -#define ID (8u) +#define ID1 (7u) +#define ID2 (1u) + +const int clean_ball_position = 180; +const int dirty_ball_position = 0; +const int initial_pos_servo1 = 90; +const int initial_pos_servo2 = 0; -int clean_ball_position = 180; -int dirty_ball_position = 0; -int initial_position = 90; // Create cs object and Initialise with specific values // (int time = 50ms, gain = 4x) @@ -125,16 +128,41 @@ void servoComputePos(int position) void ax12Start(int speed) { ax12a.begin(BaudRate, DirectionPin, &Serial); - ax12a.setEndless(ID, OFF); + //Remove endless rotation + ax12a.setEndless(ID1, OFF); + ax12a.setEndless(ID2, OFF); //move into initial position - ax12a.moveSpeed(ID, initial_position, speed); + //ax12a.moveSpeed(ID1, initial_pos_servo1, speed); + //ax12a.moveSpeed(ID2, initial_pos_servo2, speed); } -void ax12ComputePos(int position, int speed) +void ax12ComputePos(unsigned char id, byte position, int speed) { - if(position == 1){ - ax12a.moveSpeed(ID, clean_ball_position, speed); - } else{ - ax12a.moveSpeed(ID, dirty_ball_position, speed); + if(id == ID1){ + if(position == 0x01){ + ax12a.moveSpeed(ID1, clean_ball_position, speed); + } else if(position == 0x02){ + ax12a.moveSpeed(ID1, dirty_ball_position, speed); + } } + if(id == ID2){ + ax12a.moveSpeed(ID2, position, speed); + } +} + +void ax12Blink(void) +{ + int counter; + ax12a.ledStatus(ID2, ON); + delay(10000); + ax12a.ledStatus(ID2, OFF); + delay(10000); + ax12a.ledStatus(ID1, ON); + delay(10000); + ax12a.ledStatus(ID1, OFF); + delay(10000); +} + +void ax12Movedebug(unsigned char id, int position, int speed){ + ax12a.moveSpeed(id, position, speed); } \ No newline at end of file diff --git a/arduino/BallSeparationLib/BallSeparationLib.h b/arduino/BallSeparationLib/BallSeparationLib.h index 1c01758..2c70558 100644 --- a/arduino/BallSeparationLib/BallSeparationLib.h +++ b/arduino/BallSeparationLib/BallSeparationLib.h @@ -19,4 +19,6 @@ const char* csCheckTeamColor(void); void servoComputePos(int position); void servoStart(void); void ax12Start(int speed); -void ax12ComputePos(int position, int speed); \ No newline at end of file +void ax12ComputePos(unsigned char id, byte position, int speed); +void ax12Blink(void); +void ax12Movedebug(unsigned char id, int position, int speed); \ No newline at end of file diff --git a/arduino/Ball_sorting/Ball_sorting.ino b/arduino/Ball_sorting/Ball_sorting.ino deleted file mode 100644 index a02f660..0000000 --- a/arduino/Ball_sorting/Ball_sorting.ino +++ /dev/null @@ -1,87 +0,0 @@ -#include -#include -#include - -const char I2C_ADDRESS = 0x60; - -//Servo definitions -int cmd_ServoPos = 0; // position requested by ROS -int servo_speed = 500; //speed for ax-12a movement - -//Electromagnet global definitions - - -//Gun global definitions - -void setup() { - Serial.begin(9600); - ax12Start(servo_speed); //setup and intialise dynamixel ax-12a in initial position - - Wire.begin(I2C_ADDRESS); // join i2c bus - Wire.onReceive(receiveEvent); // register callback for when we receive data -} - -void loop() { - delay(100); -} - -void receiveEvent(int numBytes) { - const char* teamColour = ""; - - if (Wire.available() > 2) { - unsigned char reg = Wire.read(); - - switch (reg) { - // Configuration. Detect team color wit colour sensor and send - // answer to master (ROS board). Unused in March version of - // robot - case 0x00: - /*Serial.println("Initialising color sensor"); - if(csStartUpRoutine()){ - Serial.println("Found sensor"); - teamColour = csCheckTeamColor(); - Serial.println(teamColour); - //Send I2c message of success and team colour to ROS - }else{ - Serial.println("No TCS34725 found ... check your connections"); - //Send I2c message of failure to ROS - } */ - break; - - // Receive team colour from ROS and set ball - // valve in position 1 (Clean) or position 2 (Dirty) - // for clean/dirty balls collection. - case 0x01: - //Expecting 2 bytes (int) of data for position info - if (Wire.available() >= 2) { - unsigned char b0 = Wire.read(); - unsigned char b1 = Wire.read(); - cmd_ServoPos = bytesToInt(b0,b1); - ax12ComputePos(cmd_ServoPos, servo_speed); - } - break; - - // Release electromagnet for dirty balls trap - case 0x03: - if (Wire.available() >= 4) { - } - break; - - // Initialise and set up Gun - case 0x04: - if (Wire.available() >= 4) { - } - break; - - // Start shooting routine - case 0x05: - if (Wire.available() >= 4) { - } - break; - - default: - Serial.println("Unexcpected register access over I2C"); - break; - } - } - } diff --git a/arduino/Ball_sorting/README.md b/arduino/Ball_sorting/README.md deleted file mode 100644 index 4ecbf6e..0000000 --- a/arduino/Ball_sorting/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Ball_sorting - -## Main Code - -This code currently implements I2C communication on an arduino board -allowing for messages from a master controller to pilot the Adafruit_TCS34725 -colour sensor for colour detection and to position a servo motor depending on -data sent over bus. - -## BallSeparationLib - -`BallSeparationLib` is an Arduino library containing high level functions -used to hide lower level instructions from main and thus ease readability. -Currently, it contains functions to identify the team's colour for the robot -and direct control over the position of a servo motor. - -### Dependencies - -**Servo.h** Already installed in Arduino IDE - -**ecamlib.h** Cross reference installation guide/readme for ecamlib - -**Adafruit_TCS34725.h** Colour sensor. Needs to be dowloaded and installed as described here: - https://learn.adafruit.com/adafruit-color-sensors/arduino-code - -**AX12A.h** Dynamixel AX-12A library. Can be downloaded and installed here: https://github.com/ThingType/AX-12A-servo-library - -### Install - -Cross-reference installation guide of **ecamlib.h**, `BallSeparationLib` can be -installed in the same way either by **Zip**, **Copy**, or **SymLink** (recommended). - - -### Usage -When the library is installed in the Arduino IDE, you should be -able to use it by selecting `Sketch > Include Library > BallSeparationLib` -You will probably need to scroll to the end of the list. - -It will add an include in the source file for you: - -```cpp -#include -``` \ No newline at end of file diff --git a/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino b/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino new file mode 100644 index 0000000..df205fe --- /dev/null +++ b/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino @@ -0,0 +1,77 @@ +#include +#include +#include + +#define ID1 (7u) +#define ID2 (1u) + +//Dynamixel AX-12A definitions +const int servo_speed = 500; //speed for ax-12a movement + +// Bool variable decides whether to push bee +// or return to initial position. False = initial position +// True = push bee position +bool pushbee = false; +int pushbee_pos = 180; // push position for bee +int initialpos = 500; + +//Start ROS handle. +ros::NodeHandle nh; + +//std_msgs::Float32 str_msg; +void moveBee( const std_msgs::Bool & position_msg){ + pushbee = position_msg.data; + if(pushbee){ + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(300); // wait for a second + ax12Movedebug(ID2, 300, servo_speed); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(300); // wait for a second + ax12Movedebug(ID1, 250, servo_speed); + } + else { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + ax12Movedebug(ID2, 50, servo_speed); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(300); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(300); // wait for a second + ax12Movedebug(ID1, 450, servo_speed); + } +} +ros::Subscriber bee_ctrl("bee_control", &moveBee); + +void setup() { + pinMode(LED_BUILTIN, OUTPUT); + nh.initNode(); + nh.subscribe(bee_ctrl); + ax12Start(servo_speed); +} + + +//the loop contains is empty. +void loop() { + nh.spinOnce(); +} From 5cf65d2e227464376bbf312564e94cd148b94221 Mon Sep 17 00:00:00 2001 From: JeanNSHUTI <16186@ecam.be> Date: Fri, 16 Mar 2018 21:02:37 +0100 Subject: [PATCH 09/11] Ros serial communication with arduino implemented. tested --- .../ball_sorting_bee_ctrl.ino | 44 +++++++++++ .../ball_sorting_bee_ctrl.ino | 77 ------------------- 2 files changed, 44 insertions(+), 77 deletions(-) create mode 100644 arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino delete mode 100644 ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino diff --git a/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino b/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino new file mode 100644 index 0000000..318f9d9 --- /dev/null +++ b/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino @@ -0,0 +1,44 @@ +#include +#include +#include + +#define ID1 (7u) +#define ID2 (1u) + +//Dynamixel AX-12A definitions +const int servo_speed = 500; //speed for ax-12a movement + +// Bool variable decides whether to push bee +// or return to initial position. False = initial position +// True = push bee position +bool pushbee = false; +int pushbee_pos = 180; // initial/push position for bee still needs to be calibrated +int initialpos = 500; + +//Start ROS handle. +ros::NodeHandle nh; + +//std_msgs::Float32 str_msg; +void moveBee( const std_msgs::Bool & position_msg){ + pushbee = position_msg.data; + if(pushbee){ + ax12Movedebug(ID2, pushbee_pos, servo_speed); + } + else { + ax12Movedebug(ID2, initialpos, servo_speed); + } +} +ros::Subscriber bee_ctrl("bee_control", &moveBee); + +void setup() { + pinMode(LED_BUILTIN, OUTPUT); + nh.initNode(); + nh.subscribe(bee_ctrl); + ax12Start(servo_speed); +} + + +//the loop contains is empty. +void loop() { + nh.spinOnce(); +} diff --git a/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino b/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino deleted file mode 100644 index df205fe..0000000 --- a/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include - -#define ID1 (7u) -#define ID2 (1u) - -//Dynamixel AX-12A definitions -const int servo_speed = 500; //speed for ax-12a movement - -// Bool variable decides whether to push bee -// or return to initial position. False = initial position -// True = push bee position -bool pushbee = false; -int pushbee_pos = 180; // push position for bee -int initialpos = 500; - -//Start ROS handle. -ros::NodeHandle nh; - -//std_msgs::Float32 str_msg; -void moveBee( const std_msgs::Bool & position_msg){ - pushbee = position_msg.data; - if(pushbee){ - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(300); // wait for a second - ax12Movedebug(ID2, 300, servo_speed); - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(300); // wait for a second - ax12Movedebug(ID1, 250, servo_speed); - } - else { - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - ax12Movedebug(ID2, 50, servo_speed); - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(300); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(300); // wait for a second - ax12Movedebug(ID1, 450, servo_speed); - } -} -ros::Subscriber bee_ctrl("bee_control", &moveBee); - -void setup() { - pinMode(LED_BUILTIN, OUTPUT); - nh.initNode(); - nh.subscribe(bee_ctrl); - ax12Start(servo_speed); -} - - -//the loop contains is empty. -void loop() { - nh.spinOnce(); -} From 024355e735210aa967fd6ad676ecdb1f9c5bc01f Mon Sep 17 00:00:00 2001 From: JeanNSHUTI <16186@ecam.be> Date: Thu, 22 Mar 2018 14:56:06 +0100 Subject: [PATCH 10/11] Ros com. Changed baudrate to 57600. Working --- .../BallSeparationLib/BallSeparationLib.cpp | 10 +-- arduino/BallSeparationLib/BallSeparationLib.h | 7 +- .../ball_sorting_bee_ctrl.ino | 64 +++++++++++++++++-- 3 files changed, 67 insertions(+), 14 deletions(-) diff --git a/arduino/BallSeparationLib/BallSeparationLib.cpp b/arduino/BallSeparationLib/BallSeparationLib.cpp index 29b0b77..0a10982 100644 --- a/arduino/BallSeparationLib/BallSeparationLib.cpp +++ b/arduino/BallSeparationLib/BallSeparationLib.cpp @@ -14,13 +14,13 @@ //Dynamixel AX-12A definitions #define DirectionPin (10u) -#define BaudRate (1000000ul) +#define BaudRate (57600ul) #define ID1 (7u) #define ID2 (1u) const int clean_ball_position = 180; const int dirty_ball_position = 0; -const int initial_pos_servo1 = 90; +const int initial_pos_servo1 = 512; const int initial_pos_servo2 = 0; @@ -132,8 +132,8 @@ void ax12Start(int speed) ax12a.setEndless(ID1, OFF); ax12a.setEndless(ID2, OFF); //move into initial position - //ax12a.moveSpeed(ID1, initial_pos_servo1, speed); - //ax12a.moveSpeed(ID2, initial_pos_servo2, speed); + ax12a.moveSpeed(ID1, initial_pos_servo1, speed); + ax12a.moveSpeed(ID2, initial_pos_servo2, speed); } void ax12ComputePos(unsigned char id, byte position, int speed) @@ -163,6 +163,6 @@ void ax12Blink(void) delay(10000); } -void ax12Movedebug(unsigned char id, int position, int speed){ +void ax12Move(unsigned char id, int position, int speed){ ax12a.moveSpeed(id, position, speed); } \ No newline at end of file diff --git a/arduino/BallSeparationLib/BallSeparationLib.h b/arduino/BallSeparationLib/BallSeparationLib.h index 2c70558..9b55d90 100644 --- a/arduino/BallSeparationLib/BallSeparationLib.h +++ b/arduino/BallSeparationLib/BallSeparationLib.h @@ -9,9 +9,8 @@ #include #include -#define DirectionPin (10u) -#define BaudRate (1000000ul) -#define ID (8u) +//#define DirectionPin (10u) +//#define BaudRate (1000000ul) //Functions int csStartUpRoutine(void); @@ -21,4 +20,4 @@ void servoStart(void); void ax12Start(int speed); void ax12ComputePos(unsigned char id, byte position, int speed); void ax12Blink(void); -void ax12Movedebug(unsigned char id, int position, int speed); \ No newline at end of file +void ax12Move(unsigned char id, int position, int speed); \ No newline at end of file diff --git a/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino b/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino index 318f9d9..6b27c85 100644 --- a/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino +++ b/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino @@ -1,12 +1,23 @@ #include #include +#include +#include #include #define ID1 (7u) #define ID2 (1u) +const int CLEAN = 1; +const int DIRTY = 2; +const int BLOCK = 3; -//Dynamixel AX-12A definitions +//Dynamixel AX-12A definitions and global variables +//for control of valve used to separate/purify balls/water. +//@param valve_pos is controlled by ROS board. +int valve_pos; const int servo_speed = 500; //speed for ax-12a movement +const int clean_ball_position = 718; //still needs to be calibrated +const int dirty_ball_position = 312; +const int block_position = 512; // Bool variable decides whether to push bee // or return to initial position. False = initial position @@ -15,25 +26,67 @@ bool pushbee = false; int pushbee_pos = 180; // initial/push position for bee still needs to be calibrated int initialpos = 500; +//Gun declarations. @param dutycycle (0-255) is controlled +//by ROS board. +int dutycycle = 0; +//const int off = 0; +const int i1 = 5; +const int i2 = 4; +const int ena_pwm = 9; //PWM pin at 490Hz + + //Start ROS handle. ros::NodeHandle nh; -//std_msgs::Float32 str_msg; void moveBee( const std_msgs::Bool & position_msg){ pushbee = position_msg.data; if(pushbee){ - ax12Movedebug(ID2, pushbee_pos, servo_speed); + ax12Move(ID2, pushbee_pos, servo_speed); } else { - ax12Movedebug(ID2, initialpos, servo_speed); + ax12Move(ID2, initialpos, servo_speed); + } +} + +//std_msgs::String pos_msg; +void moveValve(const std_msgs::Int8 & pos_msg){ + valve_pos = pos_msg.data; + if(valve_pos == CLEAN){ + ax12Move(ID1, clean_ball_position, servo_speed); + } + else if (valve_pos == DIRTY){ + ax12Move(ID1, dirty_ball_position, servo_speed); } + else if(valve_pos == BLOCK){ + ax12Move(ID1, block_position, servo_speed); + } +} + +void shootGun( const std_msgs::Int16 & dutycycle_msg){ + dutycycle = dutycycle_msg.data; + + //direction + digitalWrite(i1, HIGH); + digitalWrite(i2, LOW); + + //Drive + analogWrite(ena_pwm, dutycycle); + //delay(100); + //analogWrite(pwm, off); } + ros::Subscriber bee_ctrl("bee_control", &moveBee); +ros::Subscriber ballseparator_ctrl("water_purification", &moveValve); +ros::Subscriber gun_ctrl("gun_control", &shootGun); void setup() { - pinMode(LED_BUILTIN, OUTPUT); + pinMode(ena_pwm , OUTPUT); + pinMode(i1, OUTPUT); + pinMode(i2, OUTPUT); nh.initNode(); nh.subscribe(bee_ctrl); + nh.subscribe(ballseparator_ctrl); + nh.subscribe(gun_ctrl); ax12Start(servo_speed); } @@ -41,4 +94,5 @@ void setup() { //the loop contains is empty. void loop() { nh.spinOnce(); + delay(50); } From c6f560da912a1243fbfed90a64ea1b027d9b0a0d Mon Sep 17 00:00:00 2001 From: JeanNSHUTI <16186@ecam.be> Date: Fri, 23 Mar 2018 21:08:40 +0100 Subject: [PATCH 11/11] Ultrasound sensors added. Purifier shake implemented. --- .../BallSeparationLib/BallSeparationLib.cpp | 168 --------- arduino/BallSeparationLib/BallSeparationLib.h | 23 -- arduino/BallSeparationLib/library.properties | 9 - .../ball_sorting_bee_ctrl.ino | 269 ++++++++++++--- arduino/ros_lib/actionlib_msgs/GoalID.h | 79 ----- arduino/ros_lib/actionlib_msgs/GoalStatus.h | 78 ----- .../ros_lib/actionlib_msgs/GoalStatusArray.h | 70 ---- .../FollowJointTrajectoryAction.h | 56 --- .../FollowJointTrajectoryActionFeedback.h | 56 --- .../FollowJointTrajectoryActionGoal.h | 56 --- .../FollowJointTrajectoryActionResult.h | 56 --- .../FollowJointTrajectoryFeedback.h | 97 ------ .../control_msgs/FollowJointTrajectoryGoal.h | 119 ------- .../FollowJointTrajectoryResult.h | 85 ----- arduino/ros_lib/control_msgs/GripperCommand.h | 48 --- .../control_msgs/GripperCommandAction.h | 56 --- .../GripperCommandActionFeedback.h | 56 --- .../control_msgs/GripperCommandActionGoal.h | 56 --- .../control_msgs/GripperCommandActionResult.h | 56 --- .../control_msgs/GripperCommandFeedback.h | 84 ----- .../ros_lib/control_msgs/GripperCommandGoal.h | 44 --- .../control_msgs/GripperCommandResult.h | 84 ----- .../control_msgs/JointControllerState.h | 112 ------ arduino/ros_lib/control_msgs/JointTolerance.h | 70 ---- .../control_msgs/JointTrajectoryAction.h | 56 --- .../JointTrajectoryActionFeedback.h | 56 --- .../control_msgs/JointTrajectoryActionGoal.h | 56 --- .../JointTrajectoryActionResult.h | 56 --- .../JointTrajectoryControllerState.h | 97 ------ .../control_msgs/JointTrajectoryFeedback.h | 38 --- .../control_msgs/JointTrajectoryGoal.h | 44 --- .../control_msgs/JointTrajectoryResult.h | 38 --- arduino/ros_lib/control_msgs/PidState.h | 123 ------- .../ros_lib/control_msgs/PointHeadAction.h | 56 --- .../control_msgs/PointHeadActionFeedback.h | 56 --- .../control_msgs/PointHeadActionGoal.h | 56 --- .../control_msgs/PointHeadActionResult.h | 56 --- .../ros_lib/control_msgs/PointHeadFeedback.h | 43 --- arduino/ros_lib/control_msgs/PointHeadGoal.h | 96 ------ .../ros_lib/control_msgs/PointHeadResult.h | 38 --- .../control_msgs/QueryCalibrationState.h | 88 ----- .../control_msgs/QueryTrajectoryState.h | 206 ----------- .../control_msgs/SingleJointPositionAction.h | 56 --- .../SingleJointPositionActionFeedback.h | 56 --- .../SingleJointPositionActionGoal.h | 56 --- .../SingleJointPositionActionResult.h | 56 --- .../SingleJointPositionFeedback.h | 59 ---- .../control_msgs/SingleJointPositionGoal.h | 72 ---- .../control_msgs/SingleJointPositionResult.h | 38 --- .../ros_lib/diagnostic_msgs/AddDiagnostics.h | 122 ------- .../ros_lib/diagnostic_msgs/DiagnosticArray.h | 70 ---- .../diagnostic_msgs/DiagnosticStatus.h | 137 -------- arduino/ros_lib/diagnostic_msgs/KeyValue.h | 72 ---- arduino/ros_lib/diagnostic_msgs/SelfTest.h | 131 ------- arduino/ros_lib/gazebo_msgs/ApplyBodyWrench.h | 199 ----------- .../ros_lib/gazebo_msgs/ApplyJointEffort.h | 175 ---------- arduino/ros_lib/gazebo_msgs/BodyRequest.h | 87 ----- arduino/ros_lib/gazebo_msgs/ContactState.h | 196 ----------- arduino/ros_lib/gazebo_msgs/ContactsState.h | 70 ---- arduino/ros_lib/gazebo_msgs/DeleteLight.h | 122 ------- arduino/ros_lib/gazebo_msgs/DeleteModel.h | 122 ------- .../ros_lib/gazebo_msgs/GetJointProperties.h | 210 ------------ .../ros_lib/gazebo_msgs/GetLightProperties.h | 143 -------- .../ros_lib/gazebo_msgs/GetLinkProperties.h | 181 ---------- arduino/ros_lib/gazebo_msgs/GetLinkState.h | 145 -------- .../ros_lib/gazebo_msgs/GetModelProperties.h | 322 ------------------ arduino/ros_lib/gazebo_msgs/GetModelState.h | 157 --------- .../gazebo_msgs/GetPhysicsProperties.h | 145 -------- .../ros_lib/gazebo_msgs/GetWorldProperties.h | 165 --------- arduino/ros_lib/gazebo_msgs/JointRequest.h | 87 ----- arduino/ros_lib/gazebo_msgs/LinkState.h | 84 ----- arduino/ros_lib/gazebo_msgs/LinkStates.h | 127 ------- arduino/ros_lib/gazebo_msgs/ModelState.h | 84 ----- arduino/ros_lib/gazebo_msgs/ModelStates.h | 127 ------- .../ros_lib/gazebo_msgs/ODEJointProperties.h | 288 ---------------- arduino/ros_lib/gazebo_msgs/ODEPhysics.h | 125 ------- .../ros_lib/gazebo_msgs/SetJointProperties.h | 128 ------- .../ros_lib/gazebo_msgs/SetJointTrajectory.h | 170 --------- .../ros_lib/gazebo_msgs/SetLightProperties.h | 143 -------- .../ros_lib/gazebo_msgs/SetLinkProperties.h | 181 ---------- arduino/ros_lib/gazebo_msgs/SetLinkState.h | 111 ------ .../gazebo_msgs/SetModelConfiguration.h | 201 ----------- arduino/ros_lib/gazebo_msgs/SetModelState.h | 111 ------ .../gazebo_msgs/SetPhysicsProperties.h | 127 ------- arduino/ros_lib/gazebo_msgs/SpawnModel.h | 179 ---------- arduino/ros_lib/gazebo_msgs/WorldState.h | 159 --------- arduino/ros_lib/geometry_msgs/Accel.h | 49 --- arduino/ros_lib/geometry_msgs/AccelStamped.h | 50 --- .../geometry_msgs/AccelWithCovariance.h | 52 --- .../AccelWithCovarianceStamped.h | 50 --- arduino/ros_lib/geometry_msgs/Inertia.h | 79 ----- .../ros_lib/geometry_msgs/InertiaStamped.h | 50 --- arduino/ros_lib/geometry_msgs/Point.h | 53 --- arduino/ros_lib/geometry_msgs/Point32.h | 110 ------ arduino/ros_lib/geometry_msgs/PointStamped.h | 50 --- arduino/ros_lib/geometry_msgs/Polygon.h | 64 ---- .../ros_lib/geometry_msgs/PolygonStamped.h | 50 --- arduino/ros_lib/geometry_msgs/Pose.h | 50 --- arduino/ros_lib/geometry_msgs/Pose2D.h | 53 --- arduino/ros_lib/geometry_msgs/PoseArray.h | 70 ---- arduino/ros_lib/geometry_msgs/PoseStamped.h | 50 --- .../geometry_msgs/PoseWithCovariance.h | 52 --- .../geometry_msgs/PoseWithCovarianceStamped.h | 50 --- arduino/ros_lib/geometry_msgs/Quaternion.h | 58 ---- .../ros_lib/geometry_msgs/QuaternionStamped.h | 50 --- arduino/ros_lib/geometry_msgs/Transform.h | 50 --- .../ros_lib/geometry_msgs/TransformStamped.h | 67 ---- arduino/ros_lib/geometry_msgs/Twist.h | 49 --- arduino/ros_lib/geometry_msgs/TwistStamped.h | 50 --- .../geometry_msgs/TwistWithCovariance.h | 52 --- .../TwistWithCovarianceStamped.h | 50 --- arduino/ros_lib/geometry_msgs/Vector3.h | 53 --- .../ros_lib/geometry_msgs/Vector3Stamped.h | 50 --- arduino/ros_lib/geometry_msgs/Wrench.h | 49 --- arduino/ros_lib/geometry_msgs/WrenchStamped.h | 50 --- arduino/ros_lib/map_msgs/GetMapROI.h | 96 ------ arduino/ros_lib/map_msgs/GetPointMap.h | 76 ----- arduino/ros_lib/map_msgs/GetPointMapROI.h | 111 ------ .../ros_lib/map_msgs/OccupancyGridUpdate.h | 156 --------- arduino/ros_lib/map_msgs/PointCloud2Update.h | 65 ---- arduino/ros_lib/map_msgs/ProjectedMap.h | 54 --- arduino/ros_lib/map_msgs/ProjectedMapInfo.h | 85 ----- arduino/ros_lib/map_msgs/ProjectedMapsInfo.h | 96 ------ arduino/ros_lib/map_msgs/SaveMap.h | 76 ----- arduino/ros_lib/map_msgs/SetMapProjections.h | 96 ------ arduino/ros_lib/nav_msgs/GetMap.h | 76 ----- arduino/ros_lib/nav_msgs/GetMapAction.h | 56 --- .../ros_lib/nav_msgs/GetMapActionFeedback.h | 56 --- arduino/ros_lib/nav_msgs/GetMapActionGoal.h | 56 --- arduino/ros_lib/nav_msgs/GetMapActionResult.h | 56 --- arduino/ros_lib/nav_msgs/GetMapFeedback.h | 38 --- arduino/ros_lib/nav_msgs/GetMapGoal.h | 38 --- arduino/ros_lib/nav_msgs/GetMapResult.h | 44 --- arduino/ros_lib/nav_msgs/GetPlan.h | 111 ------ arduino/ros_lib/nav_msgs/GridCells.h | 118 ------- arduino/ros_lib/nav_msgs/MapMetaData.h | 118 ------- arduino/ros_lib/nav_msgs/OccupancyGrid.h | 88 ----- arduino/ros_lib/nav_msgs/Odometry.h | 73 ---- arduino/ros_lib/nav_msgs/Path.h | 70 ---- arduino/ros_lib/nav_msgs/SetMap.h | 100 ------ arduino/ros_lib/pcl_msgs/ModelCoefficients.h | 88 ----- arduino/ros_lib/pcl_msgs/PointIndices.h | 88 ----- arduino/ros_lib/pcl_msgs/PolygonMesh.h | 76 ----- arduino/ros_lib/pcl_msgs/Vertices.h | 71 ---- 144 files changed, 225 insertions(+), 12659 deletions(-) delete mode 100644 arduino/BallSeparationLib/BallSeparationLib.cpp delete mode 100644 arduino/BallSeparationLib/BallSeparationLib.h delete mode 100644 arduino/BallSeparationLib/library.properties delete mode 100644 arduino/ros_lib/actionlib_msgs/GoalID.h delete mode 100644 arduino/ros_lib/actionlib_msgs/GoalStatus.h delete mode 100644 arduino/ros_lib/actionlib_msgs/GoalStatusArray.h delete mode 100644 arduino/ros_lib/control_msgs/FollowJointTrajectoryAction.h delete mode 100644 arduino/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h delete mode 100644 arduino/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h delete mode 100644 arduino/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/FollowJointTrajectoryGoal.h delete mode 100644 arduino/ros_lib/control_msgs/FollowJointTrajectoryResult.h delete mode 100644 arduino/ros_lib/control_msgs/GripperCommand.h delete mode 100644 arduino/ros_lib/control_msgs/GripperCommandAction.h delete mode 100644 arduino/ros_lib/control_msgs/GripperCommandActionFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/GripperCommandActionGoal.h delete mode 100644 arduino/ros_lib/control_msgs/GripperCommandActionResult.h delete mode 100644 arduino/ros_lib/control_msgs/GripperCommandFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/GripperCommandGoal.h delete mode 100644 arduino/ros_lib/control_msgs/GripperCommandResult.h delete mode 100644 arduino/ros_lib/control_msgs/JointControllerState.h delete mode 100644 arduino/ros_lib/control_msgs/JointTolerance.h delete mode 100644 arduino/ros_lib/control_msgs/JointTrajectoryAction.h delete mode 100644 arduino/ros_lib/control_msgs/JointTrajectoryActionFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/JointTrajectoryActionGoal.h delete mode 100644 arduino/ros_lib/control_msgs/JointTrajectoryActionResult.h delete mode 100644 arduino/ros_lib/control_msgs/JointTrajectoryControllerState.h delete mode 100644 arduino/ros_lib/control_msgs/JointTrajectoryFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/JointTrajectoryGoal.h delete mode 100644 arduino/ros_lib/control_msgs/JointTrajectoryResult.h delete mode 100644 arduino/ros_lib/control_msgs/PidState.h delete mode 100644 arduino/ros_lib/control_msgs/PointHeadAction.h delete mode 100644 arduino/ros_lib/control_msgs/PointHeadActionFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/PointHeadActionGoal.h delete mode 100644 arduino/ros_lib/control_msgs/PointHeadActionResult.h delete mode 100644 arduino/ros_lib/control_msgs/PointHeadFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/PointHeadGoal.h delete mode 100644 arduino/ros_lib/control_msgs/PointHeadResult.h delete mode 100644 arduino/ros_lib/control_msgs/QueryCalibrationState.h delete mode 100644 arduino/ros_lib/control_msgs/QueryTrajectoryState.h delete mode 100644 arduino/ros_lib/control_msgs/SingleJointPositionAction.h delete mode 100644 arduino/ros_lib/control_msgs/SingleJointPositionActionFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/SingleJointPositionActionGoal.h delete mode 100644 arduino/ros_lib/control_msgs/SingleJointPositionActionResult.h delete mode 100644 arduino/ros_lib/control_msgs/SingleJointPositionFeedback.h delete mode 100644 arduino/ros_lib/control_msgs/SingleJointPositionGoal.h delete mode 100644 arduino/ros_lib/control_msgs/SingleJointPositionResult.h delete mode 100644 arduino/ros_lib/diagnostic_msgs/AddDiagnostics.h delete mode 100644 arduino/ros_lib/diagnostic_msgs/DiagnosticArray.h delete mode 100644 arduino/ros_lib/diagnostic_msgs/DiagnosticStatus.h delete mode 100644 arduino/ros_lib/diagnostic_msgs/KeyValue.h delete mode 100644 arduino/ros_lib/diagnostic_msgs/SelfTest.h delete mode 100644 arduino/ros_lib/gazebo_msgs/ApplyBodyWrench.h delete mode 100644 arduino/ros_lib/gazebo_msgs/ApplyJointEffort.h delete mode 100644 arduino/ros_lib/gazebo_msgs/BodyRequest.h delete mode 100644 arduino/ros_lib/gazebo_msgs/ContactState.h delete mode 100644 arduino/ros_lib/gazebo_msgs/ContactsState.h delete mode 100644 arduino/ros_lib/gazebo_msgs/DeleteLight.h delete mode 100644 arduino/ros_lib/gazebo_msgs/DeleteModel.h delete mode 100644 arduino/ros_lib/gazebo_msgs/GetJointProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/GetLightProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/GetLinkProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/GetLinkState.h delete mode 100644 arduino/ros_lib/gazebo_msgs/GetModelProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/GetModelState.h delete mode 100644 arduino/ros_lib/gazebo_msgs/GetPhysicsProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/GetWorldProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/JointRequest.h delete mode 100644 arduino/ros_lib/gazebo_msgs/LinkState.h delete mode 100644 arduino/ros_lib/gazebo_msgs/LinkStates.h delete mode 100644 arduino/ros_lib/gazebo_msgs/ModelState.h delete mode 100644 arduino/ros_lib/gazebo_msgs/ModelStates.h delete mode 100644 arduino/ros_lib/gazebo_msgs/ODEJointProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/ODEPhysics.h delete mode 100644 arduino/ros_lib/gazebo_msgs/SetJointProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/SetJointTrajectory.h delete mode 100644 arduino/ros_lib/gazebo_msgs/SetLightProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/SetLinkProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/SetLinkState.h delete mode 100644 arduino/ros_lib/gazebo_msgs/SetModelConfiguration.h delete mode 100644 arduino/ros_lib/gazebo_msgs/SetModelState.h delete mode 100644 arduino/ros_lib/gazebo_msgs/SetPhysicsProperties.h delete mode 100644 arduino/ros_lib/gazebo_msgs/SpawnModel.h delete mode 100644 arduino/ros_lib/gazebo_msgs/WorldState.h delete mode 100644 arduino/ros_lib/geometry_msgs/Accel.h delete mode 100644 arduino/ros_lib/geometry_msgs/AccelStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/AccelWithCovariance.h delete mode 100644 arduino/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/Inertia.h delete mode 100644 arduino/ros_lib/geometry_msgs/InertiaStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/Point.h delete mode 100644 arduino/ros_lib/geometry_msgs/Point32.h delete mode 100644 arduino/ros_lib/geometry_msgs/PointStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/Polygon.h delete mode 100644 arduino/ros_lib/geometry_msgs/PolygonStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/Pose.h delete mode 100644 arduino/ros_lib/geometry_msgs/Pose2D.h delete mode 100644 arduino/ros_lib/geometry_msgs/PoseArray.h delete mode 100644 arduino/ros_lib/geometry_msgs/PoseStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/PoseWithCovariance.h delete mode 100644 arduino/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/Quaternion.h delete mode 100644 arduino/ros_lib/geometry_msgs/QuaternionStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/Transform.h delete mode 100644 arduino/ros_lib/geometry_msgs/TransformStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/Twist.h delete mode 100644 arduino/ros_lib/geometry_msgs/TwistStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/TwistWithCovariance.h delete mode 100644 arduino/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/Vector3.h delete mode 100644 arduino/ros_lib/geometry_msgs/Vector3Stamped.h delete mode 100644 arduino/ros_lib/geometry_msgs/Wrench.h delete mode 100644 arduino/ros_lib/geometry_msgs/WrenchStamped.h delete mode 100644 arduino/ros_lib/map_msgs/GetMapROI.h delete mode 100644 arduino/ros_lib/map_msgs/GetPointMap.h delete mode 100644 arduino/ros_lib/map_msgs/GetPointMapROI.h delete mode 100644 arduino/ros_lib/map_msgs/OccupancyGridUpdate.h delete mode 100644 arduino/ros_lib/map_msgs/PointCloud2Update.h delete mode 100644 arduino/ros_lib/map_msgs/ProjectedMap.h delete mode 100644 arduino/ros_lib/map_msgs/ProjectedMapInfo.h delete mode 100644 arduino/ros_lib/map_msgs/ProjectedMapsInfo.h delete mode 100644 arduino/ros_lib/map_msgs/SaveMap.h delete mode 100644 arduino/ros_lib/map_msgs/SetMapProjections.h delete mode 100644 arduino/ros_lib/nav_msgs/GetMap.h delete mode 100644 arduino/ros_lib/nav_msgs/GetMapAction.h delete mode 100644 arduino/ros_lib/nav_msgs/GetMapActionFeedback.h delete mode 100644 arduino/ros_lib/nav_msgs/GetMapActionGoal.h delete mode 100644 arduino/ros_lib/nav_msgs/GetMapActionResult.h delete mode 100644 arduino/ros_lib/nav_msgs/GetMapFeedback.h delete mode 100644 arduino/ros_lib/nav_msgs/GetMapGoal.h delete mode 100644 arduino/ros_lib/nav_msgs/GetMapResult.h delete mode 100644 arduino/ros_lib/nav_msgs/GetPlan.h delete mode 100644 arduino/ros_lib/nav_msgs/GridCells.h delete mode 100644 arduino/ros_lib/nav_msgs/MapMetaData.h delete mode 100644 arduino/ros_lib/nav_msgs/OccupancyGrid.h delete mode 100644 arduino/ros_lib/nav_msgs/Odometry.h delete mode 100644 arduino/ros_lib/nav_msgs/Path.h delete mode 100644 arduino/ros_lib/nav_msgs/SetMap.h delete mode 100644 arduino/ros_lib/pcl_msgs/ModelCoefficients.h delete mode 100644 arduino/ros_lib/pcl_msgs/PointIndices.h delete mode 100644 arduino/ros_lib/pcl_msgs/PolygonMesh.h delete mode 100644 arduino/ros_lib/pcl_msgs/Vertices.h diff --git a/arduino/BallSeparationLib/BallSeparationLib.cpp b/arduino/BallSeparationLib/BallSeparationLib.cpp deleted file mode 100644 index 0a10982..0000000 --- a/arduino/BallSeparationLib/BallSeparationLib.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/**************************************************************************/ -/*! - @file BallSeparationLib.cpp - @author Ecambotics - @license opensource - - Abstraction for lower level instructions. - - v1.0 - First release -*/ -/**************************************************************************/ -#include -#include "BallSeparationLib.h" - -//Dynamixel AX-12A definitions -#define DirectionPin (10u) -#define BaudRate (57600ul) -#define ID1 (7u) -#define ID2 (1u) - -const int clean_ball_position = 180; -const int dirty_ball_position = 0; -const int initial_pos_servo1 = 512; -const int initial_pos_servo2 = 0; - - -// Create cs object and Initialise with specific values -// (int time = 50ms, gain = 4x) -Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_50MS, TCS34725_GAIN_4X); - -//Servo definitions -Servo servo; -int servoPin = 9; -int servoAngle = 0; // servo position in degrees - -/**************************************************************************/ -/*! - @brief Starts up CS. Returns 1 if successfully completed, 0 for any - malfunction -*/ -/**************************************************************************/ -int csStartUpRoutine(void) -{ - int result = 0; - if (tcs.begin()) { - result = 1; - return result; - } else { - return result; - //while (1); // halt! - } -} - -/**************************************************************************/ -/*! - @brief -*/ -/**************************************************************************/ -const char* csCheckTeamColor(void) -{ - //Variables to hold RGB values of colour detected - uint16_t clear, red, green, blue; - - //Lower and upper ranges for green and orange - uint16_t upperrangeG[3] = {100, 153, 71}; - uint16_t lowerrangeG[3] = {50, 104, 52}; - uint16_t upperrangeO[3] = {216,75,44}; - uint16_t lowerrangeO[3] = {155, 60, 32}; - float r, g, b; - const char* teamColour = ""; - while(teamColour == ""){ - Serial.println("Waiting for team colour..."); - tcs.setInterrupt(false); // turn on LED - delay(60); // takes 50ms to read - tcs.getRawData(&red, &green, &blue, &clear); - tcs.setInterrupt(true); // turn off LED - - // Figure out some basic hex code for visualization - uint32_t sum = clear; - r = red; - r /= sum; - g = green; - g /= sum; - b = blue; - b /= sum; - r *= 256; g *= 256; b *= 256; - Serial.print("\t"); - - - Serial.print((int)r, HEX); Serial.print((int)g, HEX); Serial.print((int)b, HEX); - Serial.println(); - Serial.print((int)r ); Serial.print(" "); Serial.print((int)g);Serial.print(" "); Serial.println((int)b ); - - if((r < upperrangeG[0] && g < upperrangeG[1] && b < upperrangeG[2]) || (r > lowerrangeG[0] && g > lowerrangeG[1] && b > lowerrangeG[2])){ - delay(100); - teamColour = "Green"; - //Serial.print("Green"); - } - if((r < upperrangeO[0] && g < upperrangeO[1] && b < upperrangeO[2]) || (r > lowerrangeO[0] && g > lowerrangeO[1] && b > lowerrangeO[2])){ - delay(100); - teamColour= "Orange"; - //Serial.print("Orange"); - } - - } - return teamColour; -} - -void servoStart(void) -{ - servo.attach(servoPin); -} - -void servoComputePos(int position) -{ - if(position == 1){ - //Clean ball collection - servoAngle = 90; - servo.write(servoAngle); - } - if(position == 2){ - //Dirty ball collection - servoAngle = 0; - servo.write(servoAngle); - } -} - -void ax12Start(int speed) -{ - ax12a.begin(BaudRate, DirectionPin, &Serial); - //Remove endless rotation - ax12a.setEndless(ID1, OFF); - ax12a.setEndless(ID2, OFF); - //move into initial position - ax12a.moveSpeed(ID1, initial_pos_servo1, speed); - ax12a.moveSpeed(ID2, initial_pos_servo2, speed); -} - -void ax12ComputePos(unsigned char id, byte position, int speed) -{ - if(id == ID1){ - if(position == 0x01){ - ax12a.moveSpeed(ID1, clean_ball_position, speed); - } else if(position == 0x02){ - ax12a.moveSpeed(ID1, dirty_ball_position, speed); - } - } - if(id == ID2){ - ax12a.moveSpeed(ID2, position, speed); - } -} - -void ax12Blink(void) -{ - int counter; - ax12a.ledStatus(ID2, ON); - delay(10000); - ax12a.ledStatus(ID2, OFF); - delay(10000); - ax12a.ledStatus(ID1, ON); - delay(10000); - ax12a.ledStatus(ID1, OFF); - delay(10000); -} - -void ax12Move(unsigned char id, int position, int speed){ - ax12a.moveSpeed(id, position, speed); -} \ No newline at end of file diff --git a/arduino/BallSeparationLib/BallSeparationLib.h b/arduino/BallSeparationLib/BallSeparationLib.h deleted file mode 100644 index 9b55d90..0000000 --- a/arduino/BallSeparationLib/BallSeparationLib.h +++ /dev/null @@ -1,23 +0,0 @@ - /**********************************************************/ - /*! - Ball separating library used to hide lower level instruc- - tions from the main file. - */ - /**********************************************************/ - -#include -#include -#include - -//#define DirectionPin (10u) -//#define BaudRate (1000000ul) - -//Functions -int csStartUpRoutine(void); -const char* csCheckTeamColor(void); -void servoComputePos(int position); -void servoStart(void); -void ax12Start(int speed); -void ax12ComputePos(unsigned char id, byte position, int speed); -void ax12Blink(void); -void ax12Move(unsigned char id, int position, int speed); \ No newline at end of file diff --git a/arduino/BallSeparationLib/library.properties b/arduino/BallSeparationLib/library.properties deleted file mode 100644 index 9413bc1..0000000 --- a/arduino/BallSeparationLib/library.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=Ball Separation Library v1 -version=1 -author=ECAMbotics -maintainer=ECAM <16186@ecam.be> -sentence=Library based on lower level instructions for the separation of balls in the Minus robot of Eurobot competition. -paragraph=Library based on lower level instructions for the separation of balls in the Minus robot of Eurobot competition.. -category=Device Control -url=https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library -architectures=* \ No newline at end of file diff --git a/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino b/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino index 6b27c85..9c32882 100644 --- a/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino +++ b/arduino/ball_sorting_bee_ctrl/ball_sorting_bee_ctrl.ino @@ -1,98 +1,279 @@ #include #include -#include #include -#include +#include +#include +#include -#define ID1 (7u) -#define ID2 (1u) -const int CLEAN = 1; -const int DIRTY = 2; -const int BLOCK = 3; +//Ax-12A IDs and baudrate +#define DirectionPin (10u) +#define BaudRate (57600ul) +#define ID1 (7u) //water purification +#define ID2 (1u) //bee + +//Ultrason pin definitions +#define TRIGGER_PINB 2 // us1/back +#define ECHO_PINB 3 // us1/back +#define TRIGGER_PINF 6 // us2/front +#define ECHO_PINF 7 // us2/front +#define TRIGGER_PINL 8 // us3/left +#define ECHO_PINL 10 // us3/left +#define TRIGGER_PINR 11 // us4/right +#define ECHO_PINR 12 // us4/right +#define MAX_DISTANCE 300 // Maximum distance we want to ping + +//Gun pin definitions +#define i1 5 +#define i2 4 +#define ena_pwm 9 //PWM pin at 490Hz + +//Water purification definitions +#define clean_ball_position 90 +#define dirty_ball_position 916 + +//water purification declarations +int servo_speed = 500; //speed for ax-12a movement //Dynamixel AX-12A definitions and global variables //for control of valve used to separate/purify balls/water. //@param valve_pos is controlled by ROS board. +int initial_pos_purifier = 512; +int initial_pos_bee = 552; int valve_pos; -const int servo_speed = 500; //speed for ax-12a movement -const int clean_ball_position = 718; //still needs to be calibrated -const int dirty_ball_position = 312; -const int block_position = 512; - -// Bool variable decides whether to push bee -// or return to initial position. False = initial position -// True = push bee position -bool pushbee = false; -int pushbee_pos = 180; // initial/push position for bee still needs to be calibrated -int initialpos = 500; - -//Gun declarations. @param dutycycle (0-255) is controlled -//by ROS board. -int dutycycle = 0; -//const int off = 0; -const int i1 = 5; -const int i2 = 4; -const int ena_pwm = 9; //PWM pin at 490Hz +//Ultrasound declarations +char frameid[] = "/base_link"; +long duration; +float tmp; +long range_time; + + +NewPing sonarB(TRIGGER_PINB, ECHO_PINB, MAX_DISTANCE); // back us +NewPing sonarF(TRIGGER_PINF, ECHO_PINF, MAX_DISTANCE); // front us +NewPing sonarL(TRIGGER_PINL, ECHO_PINL, MAX_DISTANCE); // left us +NewPing sonarR(TRIGGER_PINR, ECHO_PINR, MAX_DISTANCE); // right us //Start ROS handle. ros::NodeHandle nh; void moveBee( const std_msgs::Bool & position_msg){ + + // Bool variable decides whether to push bee + // or return to initial position. False = initial position + // True = push bee position + bool pushbee = false; + int pushbee_pos = 30; // initial/push position for bee still needs to be calibrated + pushbee = position_msg.data; if(pushbee){ - ax12Move(ID2, pushbee_pos, servo_speed); + //ax12Move(ID2, pushbee_pos, servo_speed); + ax12a.moveSpeed(ID2, pushbee_pos, servo_speed); } else { - ax12Move(ID2, initialpos, servo_speed); + //ax12Move(ID2, initialpos, servo_speed); + ax12a.moveSpeed(ID2, initial_pos_bee, servo_speed); } } -//std_msgs::String pos_msg; -void moveValve(const std_msgs::Int8 & pos_msg){ +void moveValve(const std_msgs::Int16 & pos_msg){ + valve_pos = pos_msg.data; - if(valve_pos == CLEAN){ - ax12Move(ID1, clean_ball_position, servo_speed); + if(valve_pos == 1){ + ax12a.moveSpeed(ID1, clean_ball_position, servo_speed); + // "Shake"/rotate purifier between goal position and + // 10 degrees to assure all balls enter +// while(counter <= 4){ +// clean_ball_position = clean_ball_position + 20; +// delay(1000); +// ax12a.moveSpeed(ID1, clean_ball_position, servo_speed); +// clean_ball_position = clean_ball_position - 20; +// delay(1000); +// ax12a.moveSpeed(ID1, clean_ball_position, servo_speed); +// counter++; +// } } - else if (valve_pos == DIRTY){ - ax12Move(ID1, dirty_ball_position, servo_speed); + else if (valve_pos == 2){ + ax12a.moveSpeed(ID1, dirty_ball_position, servo_speed); } - else if(valve_pos == BLOCK){ - ax12Move(ID1, block_position, servo_speed); + else if(valve_pos == 3){ + ax12a.moveSpeed(ID1, initial_pos_purifier, servo_speed); } } void shootGun( const std_msgs::Int16 & dutycycle_msg){ + //Gun declarations. @param dutycycle (0-255) is controlled + //by ROS board. + int dutycycle = 0; dutycycle = dutycycle_msg.data; //direction - digitalWrite(i1, HIGH); - digitalWrite(i2, LOW); + digitalWrite(i1, LOW); + digitalWrite(i2, HIGH); //Drive analogWrite(ena_pwm, dutycycle); - //delay(100); - //analogWrite(pwm, off); } +// Function that pings ultrasound sensors. +// Publish the adc value every 50 milliseconds +// since it takes that long for the sensor to stabilize +void checkSensors(void); +void shake(void); + ros::Subscriber bee_ctrl("bee_control", &moveBee); -ros::Subscriber ballseparator_ctrl("water_purification", &moveValve); +ros::Subscriber ballseparator_ctrl("water_purification", &moveValve); ros::Subscriber gun_ctrl("gun_control", &shootGun); +sensor_msgs::Range range_msg_rear; +sensor_msgs::Range range_msg_front; +sensor_msgs::Range range_msg_left; +sensor_msgs::Range range_msg_right; +ros::Publisher pub_range1("ultrasound_rear", &range_msg_rear); +ros::Publisher pub_range2("ultrasound_front", &range_msg_front); +ros::Publisher pub_range3("ultrasound_left", &range_msg_left); +ros::Publisher pub_range4("ultrasound_right", &range_msg_right); + + void setup() { + pinMode(ena_pwm , OUTPUT); pinMode(i1, OUTPUT); pinMode(i2, OUTPUT); + + //Start-up + ax12a.begin(BaudRate, DirectionPin, &Serial); + //Remove endless rotation + ax12a.setEndless(ID1, OFF); + ax12a.setEndless(ID2, OFF); + //move into initial position + ax12a.moveSpeed(ID1, initial_pos_purifier, servo_speed); + ax12a.moveSpeed(ID2, initial_pos_bee, servo_speed); +// delay(3000); +// ax12a.moveSpeed(ID2, 30, servo_speed); //Calibrated push bee pos old /new position needs to be calibrated +// delay(3000); +// ax12a.moveSpeed(ID1, 916, servo_speed); //Calibrated dirty pos +// delay(3000); +// ax12a.moveSpeed(ID1, 90, servo_speed); //Calibrated clean pos + nh.initNode(); + nh.subscribe(bee_ctrl); nh.subscribe(ballseparator_ctrl); nh.subscribe(gun_ctrl); - ax12Start(servo_speed); -} + + nh.advertise(pub_range1); + nh.advertise(pub_range2); + nh.advertise(pub_range3); + nh.advertise(pub_range4); + range_msg_rear.radiation_type = sensor_msgs::Range::ULTRASOUND; + range_msg_rear.header.frame_id = "ultrasound_rear"; + range_msg_rear.field_of_view = 0.3665; // fake + range_msg_rear.min_range = 0.0; + range_msg_rear.max_range = MAX_DISTANCE; + + range_msg_front.radiation_type = sensor_msgs::Range::ULTRASOUND; + range_msg_front.header.frame_id = "ultrasound_front"; + range_msg_front.field_of_view = 0.3665; // fake + range_msg_front.min_range = 0.0; + range_msg_front.max_range = MAX_DISTANCE; + + range_msg_left.radiation_type = sensor_msgs::Range::ULTRASOUND; + range_msg_left.header.frame_id = "ultrasound_left"; + range_msg_left.field_of_view = 0.3665; // fake + range_msg_left.min_range = 0.0; + range_msg_left.max_range = MAX_DISTANCE; + + range_msg_right.radiation_type = sensor_msgs::Range::ULTRASOUND; + range_msg_right.header.frame_id = "ultrasound_right"; + range_msg_right.field_of_view = 0.3665; // fake + range_msg_right.min_range = 0.0; + range_msg_right.max_range = MAX_DISTANCE; +} //the loop contains is empty. void loop() { + checkSensors(); nh.spinOnce(); - delay(50); + //delay(50); + shake(); +} + + +// Function that pings ultrasound sensors. +// Publish the adc value every 50 milliseconds +// since it takes that long for the sensor to stabilize +void checkSensors(void) +{ + if ( millis() >= range_time ){ + tmp=sonarL.ping_cm(); + range_msg_rear.range = tmp/100; + range_msg_rear.header.stamp = nh.now(); + pub_range1.publish(&range_msg_rear); + + tmp=sonarR.ping_cm(); + range_msg_front.range = tmp/100; + range_msg_front.header.stamp = nh.now(); + pub_range2.publish(&range_msg_front); + + tmp=sonarB.ping_cm(); + range_msg_left.range = tmp/100; + range_msg_left.header.stamp = nh.now(); + pub_range3.publish(&range_msg_left); + + tmp=sonarF.ping_cm(); + range_msg_right.range = tmp/100; + range_msg_right.header.stamp = nh.now(); + pub_range4.publish(&range_msg_right); + + range_time = millis() + 50; + } +} + +//Move purifier to and fro in order to make +//sure all balls enter compartment +void shake(void) +{ + int dir = 0; + + if (valve_pos == 1){ + if (dir == 0){ + if (ax12a.readPosition(ID1) != clean_ball_position + 200){ + ax12a.moveSpeed(ID1, clean_ball_position + 200, servo_speed); + } + else { + dir = 1; + } + + } + else if (dir == 1){ + if (ax12a.readPosition(ID1) != clean_ball_position){ + ax12a.moveSpeed(ID1, clean_ball_position - 200, servo_speed); + } + else { + dir = 0; + } + } + + } + if (valve_pos == 2){ + if (dir == 0){ + if (ax12a.readPosition(ID1) != dirty_ball_position + 200){ + ax12a.moveSpeed(ID1, dirty_ball_position - 200, servo_speed); + } + else { + dir = 1; + } + + } + else if (dir == 1){ + if (ax12a.readPosition(ID1) != dirty_ball_position){ + ax12a.moveSpeed(ID1, dirty_ball_position + 200, servo_speed); + } + else { + dir = 0; + } + } + + } } diff --git a/arduino/ros_lib/actionlib_msgs/GoalID.h b/arduino/ros_lib/actionlib_msgs/GoalID.h deleted file mode 100644 index 24391a3..0000000 --- a/arduino/ros_lib/actionlib_msgs/GoalID.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef _ROS_actionlib_msgs_GoalID_h -#define _ROS_actionlib_msgs_GoalID_h - -#include -#include -#include -#include "ros/msg.h" -#include "ros/time.h" - -namespace actionlib_msgs -{ - - class GoalID : public ros::Msg - { - public: - typedef ros::Time _stamp_type; - _stamp_type stamp; - typedef const char* _id_type; - _id_type id; - - GoalID(): - stamp(), - id("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->stamp.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->stamp.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->stamp.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->stamp.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->stamp.sec); - *(outbuffer + offset + 0) = (this->stamp.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->stamp.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->stamp.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->stamp.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->stamp.nsec); - uint32_t length_id = strlen(this->id); - varToArr(outbuffer + offset, length_id); - offset += 4; - memcpy(outbuffer + offset, this->id, length_id); - offset += length_id; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - this->stamp.sec = ((uint32_t) (*(inbuffer + offset))); - this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->stamp.sec); - this->stamp.nsec = ((uint32_t) (*(inbuffer + offset))); - this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->stamp.nsec); - uint32_t length_id; - arrToVar(length_id, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_id; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_id-1]=0; - this->id = (char *)(inbuffer + offset-1); - offset += length_id; - return offset; - } - - const char * getType(){ return "actionlib_msgs/GoalID"; }; - const char * getMD5(){ return "302881f31927c1df708a2dbab0e80ee8"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/actionlib_msgs/GoalStatus.h b/arduino/ros_lib/actionlib_msgs/GoalStatus.h deleted file mode 100644 index 349524c..0000000 --- a/arduino/ros_lib/actionlib_msgs/GoalStatus.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _ROS_actionlib_msgs_GoalStatus_h -#define _ROS_actionlib_msgs_GoalStatus_h - -#include -#include -#include -#include "ros/msg.h" -#include "actionlib_msgs/GoalID.h" - -namespace actionlib_msgs -{ - - class GoalStatus : public ros::Msg - { - public: - typedef actionlib_msgs::GoalID _goal_id_type; - _goal_id_type goal_id; - typedef uint8_t _status_type; - _status_type status; - typedef const char* _text_type; - _text_type text; - enum { PENDING = 0 }; - enum { ACTIVE = 1 }; - enum { PREEMPTED = 2 }; - enum { SUCCEEDED = 3 }; - enum { ABORTED = 4 }; - enum { REJECTED = 5 }; - enum { PREEMPTING = 6 }; - enum { RECALLING = 7 }; - enum { RECALLED = 8 }; - enum { LOST = 9 }; - - GoalStatus(): - goal_id(), - status(0), - text("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->goal_id.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; - offset += sizeof(this->status); - uint32_t length_text = strlen(this->text); - varToArr(outbuffer + offset, length_text); - offset += 4; - memcpy(outbuffer + offset, this->text, length_text); - offset += length_text; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->goal_id.deserialize(inbuffer + offset); - this->status = ((uint8_t) (*(inbuffer + offset))); - offset += sizeof(this->status); - uint32_t length_text; - arrToVar(length_text, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_text; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_text-1]=0; - this->text = (char *)(inbuffer + offset-1); - offset += length_text; - return offset; - } - - const char * getType(){ return "actionlib_msgs/GoalStatus"; }; - const char * getMD5(){ return "d388f9b87b3c471f784434d671988d4a"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/actionlib_msgs/GoalStatusArray.h b/arduino/ros_lib/actionlib_msgs/GoalStatusArray.h deleted file mode 100644 index 9e39b5f..0000000 --- a/arduino/ros_lib/actionlib_msgs/GoalStatusArray.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _ROS_actionlib_msgs_GoalStatusArray_h -#define _ROS_actionlib_msgs_GoalStatusArray_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" - -namespace actionlib_msgs -{ - - class GoalStatusArray : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t status_list_length; - typedef actionlib_msgs::GoalStatus _status_list_type; - _status_list_type st_status_list; - _status_list_type * status_list; - - GoalStatusArray(): - header(), - status_list_length(0), status_list(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->status_list_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->status_list_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->status_list_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->status_list_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->status_list_length); - for( uint32_t i = 0; i < status_list_length; i++){ - offset += this->status_list[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t status_list_lengthT = ((uint32_t) (*(inbuffer + offset))); - status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->status_list_length); - if(status_list_lengthT > status_list_length) - this->status_list = (actionlib_msgs::GoalStatus*)realloc(this->status_list, status_list_lengthT * sizeof(actionlib_msgs::GoalStatus)); - status_list_length = status_list_lengthT; - for( uint32_t i = 0; i < status_list_length; i++){ - offset += this->st_status_list.deserialize(inbuffer + offset); - memcpy( &(this->status_list[i]), &(this->st_status_list), sizeof(actionlib_msgs::GoalStatus)); - } - return offset; - } - - const char * getType(){ return "actionlib_msgs/GoalStatusArray"; }; - const char * getMD5(){ return "8b2b82f13216d0a8ea88bd3af735e619"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/FollowJointTrajectoryAction.h b/arduino/ros_lib/control_msgs/FollowJointTrajectoryAction.h deleted file mode 100644 index ec67771..0000000 --- a/arduino/ros_lib/control_msgs/FollowJointTrajectoryAction.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_FollowJointTrajectoryAction_h -#define _ROS_control_msgs_FollowJointTrajectoryAction_h - -#include -#include -#include -#include "ros/msg.h" -#include "control_msgs/FollowJointTrajectoryActionGoal.h" -#include "control_msgs/FollowJointTrajectoryActionResult.h" -#include "control_msgs/FollowJointTrajectoryActionFeedback.h" - -namespace control_msgs -{ - - class FollowJointTrajectoryAction : public ros::Msg - { - public: - typedef control_msgs::FollowJointTrajectoryActionGoal _action_goal_type; - _action_goal_type action_goal; - typedef control_msgs::FollowJointTrajectoryActionResult _action_result_type; - _action_result_type action_result; - typedef control_msgs::FollowJointTrajectoryActionFeedback _action_feedback_type; - _action_feedback_type action_feedback; - - FollowJointTrajectoryAction(): - action_goal(), - action_result(), - action_feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->action_goal.serialize(outbuffer + offset); - offset += this->action_result.serialize(outbuffer + offset); - offset += this->action_feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->action_goal.deserialize(inbuffer + offset); - offset += this->action_result.deserialize(inbuffer + offset); - offset += this->action_feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/FollowJointTrajectoryAction"; }; - const char * getMD5(){ return "bc4f9b743838566551c0390c65f1a248"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h b/arduino/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h deleted file mode 100644 index d5d037a..0000000 --- a/arduino/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h -#define _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/FollowJointTrajectoryFeedback.h" - -namespace control_msgs -{ - - class FollowJointTrajectoryActionFeedback : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::FollowJointTrajectoryFeedback _feedback_type; - _feedback_type feedback; - - FollowJointTrajectoryActionFeedback(): - header(), - status(), - feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/FollowJointTrajectoryActionFeedback"; }; - const char * getMD5(){ return "d8920dc4eae9fc107e00999cce4be641"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h b/arduino/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h deleted file mode 100644 index 4aa00c6..0000000 --- a/arduino/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_FollowJointTrajectoryActionGoal_h -#define _ROS_control_msgs_FollowJointTrajectoryActionGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalID.h" -#include "control_msgs/FollowJointTrajectoryGoal.h" - -namespace control_msgs -{ - - class FollowJointTrajectoryActionGoal : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalID _goal_id_type; - _goal_id_type goal_id; - typedef control_msgs::FollowJointTrajectoryGoal _goal_type; - _goal_type goal; - - FollowJointTrajectoryActionGoal(): - header(), - goal_id(), - goal() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->goal_id.serialize(outbuffer + offset); - offset += this->goal.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->goal_id.deserialize(inbuffer + offset); - offset += this->goal.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/FollowJointTrajectoryActionGoal"; }; - const char * getMD5(){ return "cff5c1d533bf2f82dd0138d57f4304bb"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h b/arduino/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h deleted file mode 100644 index aa6b2b3..0000000 --- a/arduino/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_FollowJointTrajectoryActionResult_h -#define _ROS_control_msgs_FollowJointTrajectoryActionResult_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/FollowJointTrajectoryResult.h" - -namespace control_msgs -{ - - class FollowJointTrajectoryActionResult : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::FollowJointTrajectoryResult _result_type; - _result_type result; - - FollowJointTrajectoryActionResult(): - header(), - status(), - result() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->result.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->result.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/FollowJointTrajectoryActionResult"; }; - const char * getMD5(){ return "c4fb3b000dc9da4fd99699380efcc5d9"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h b/arduino/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h deleted file mode 100644 index 6f27ecc..0000000 --- a/arduino/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef _ROS_control_msgs_FollowJointTrajectoryFeedback_h -#define _ROS_control_msgs_FollowJointTrajectoryFeedback_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "trajectory_msgs/JointTrajectoryPoint.h" - -namespace control_msgs -{ - - class FollowJointTrajectoryFeedback : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t joint_names_length; - typedef char* _joint_names_type; - _joint_names_type st_joint_names; - _joint_names_type * joint_names; - typedef trajectory_msgs::JointTrajectoryPoint _desired_type; - _desired_type desired; - typedef trajectory_msgs::JointTrajectoryPoint _actual_type; - _actual_type actual; - typedef trajectory_msgs::JointTrajectoryPoint _error_type; - _error_type error; - - FollowJointTrajectoryFeedback(): - header(), - joint_names_length(0), joint_names(NULL), - desired(), - actual(), - error() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->joint_names_length); - for( uint32_t i = 0; i < joint_names_length; i++){ - uint32_t length_joint_namesi = strlen(this->joint_names[i]); - varToArr(outbuffer + offset, length_joint_namesi); - offset += 4; - memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); - offset += length_joint_namesi; - } - offset += this->desired.serialize(outbuffer + offset); - offset += this->actual.serialize(outbuffer + offset); - offset += this->error.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->joint_names_length); - if(joint_names_lengthT > joint_names_length) - this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); - joint_names_length = joint_names_lengthT; - for( uint32_t i = 0; i < joint_names_length; i++){ - uint32_t length_st_joint_names; - arrToVar(length_st_joint_names, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_joint_names-1]=0; - this->st_joint_names = (char *)(inbuffer + offset-1); - offset += length_st_joint_names; - memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); - } - offset += this->desired.deserialize(inbuffer + offset); - offset += this->actual.deserialize(inbuffer + offset); - offset += this->error.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/FollowJointTrajectoryFeedback"; }; - const char * getMD5(){ return "10817c60c2486ef6b33e97dcd87f4474"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/FollowJointTrajectoryGoal.h b/arduino/ros_lib/control_msgs/FollowJointTrajectoryGoal.h deleted file mode 100644 index 1185615..0000000 --- a/arduino/ros_lib/control_msgs/FollowJointTrajectoryGoal.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef _ROS_control_msgs_FollowJointTrajectoryGoal_h -#define _ROS_control_msgs_FollowJointTrajectoryGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "trajectory_msgs/JointTrajectory.h" -#include "control_msgs/JointTolerance.h" -#include "ros/duration.h" - -namespace control_msgs -{ - - class FollowJointTrajectoryGoal : public ros::Msg - { - public: - typedef trajectory_msgs::JointTrajectory _trajectory_type; - _trajectory_type trajectory; - uint32_t path_tolerance_length; - typedef control_msgs::JointTolerance _path_tolerance_type; - _path_tolerance_type st_path_tolerance; - _path_tolerance_type * path_tolerance; - uint32_t goal_tolerance_length; - typedef control_msgs::JointTolerance _goal_tolerance_type; - _goal_tolerance_type st_goal_tolerance; - _goal_tolerance_type * goal_tolerance; - typedef ros::Duration _goal_time_tolerance_type; - _goal_time_tolerance_type goal_time_tolerance; - - FollowJointTrajectoryGoal(): - trajectory(), - path_tolerance_length(0), path_tolerance(NULL), - goal_tolerance_length(0), goal_tolerance(NULL), - goal_time_tolerance() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->trajectory.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->path_tolerance_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->path_tolerance_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->path_tolerance_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->path_tolerance_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->path_tolerance_length); - for( uint32_t i = 0; i < path_tolerance_length; i++){ - offset += this->path_tolerance[i].serialize(outbuffer + offset); - } - *(outbuffer + offset + 0) = (this->goal_tolerance_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->goal_tolerance_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->goal_tolerance_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->goal_tolerance_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->goal_tolerance_length); - for( uint32_t i = 0; i < goal_tolerance_length; i++){ - offset += this->goal_tolerance[i].serialize(outbuffer + offset); - } - *(outbuffer + offset + 0) = (this->goal_time_tolerance.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->goal_time_tolerance.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->goal_time_tolerance.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->goal_time_tolerance.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->goal_time_tolerance.sec); - *(outbuffer + offset + 0) = (this->goal_time_tolerance.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->goal_time_tolerance.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->goal_time_tolerance.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->goal_time_tolerance.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->goal_time_tolerance.nsec); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->trajectory.deserialize(inbuffer + offset); - uint32_t path_tolerance_lengthT = ((uint32_t) (*(inbuffer + offset))); - path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->path_tolerance_length); - if(path_tolerance_lengthT > path_tolerance_length) - this->path_tolerance = (control_msgs::JointTolerance*)realloc(this->path_tolerance, path_tolerance_lengthT * sizeof(control_msgs::JointTolerance)); - path_tolerance_length = path_tolerance_lengthT; - for( uint32_t i = 0; i < path_tolerance_length; i++){ - offset += this->st_path_tolerance.deserialize(inbuffer + offset); - memcpy( &(this->path_tolerance[i]), &(this->st_path_tolerance), sizeof(control_msgs::JointTolerance)); - } - uint32_t goal_tolerance_lengthT = ((uint32_t) (*(inbuffer + offset))); - goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->goal_tolerance_length); - if(goal_tolerance_lengthT > goal_tolerance_length) - this->goal_tolerance = (control_msgs::JointTolerance*)realloc(this->goal_tolerance, goal_tolerance_lengthT * sizeof(control_msgs::JointTolerance)); - goal_tolerance_length = goal_tolerance_lengthT; - for( uint32_t i = 0; i < goal_tolerance_length; i++){ - offset += this->st_goal_tolerance.deserialize(inbuffer + offset); - memcpy( &(this->goal_tolerance[i]), &(this->st_goal_tolerance), sizeof(control_msgs::JointTolerance)); - } - this->goal_time_tolerance.sec = ((uint32_t) (*(inbuffer + offset))); - this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->goal_time_tolerance.sec); - this->goal_time_tolerance.nsec = ((uint32_t) (*(inbuffer + offset))); - this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->goal_time_tolerance.nsec); - return offset; - } - - const char * getType(){ return "control_msgs/FollowJointTrajectoryGoal"; }; - const char * getMD5(){ return "69636787b6ecbde4d61d711979bc7ecb"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/FollowJointTrajectoryResult.h b/arduino/ros_lib/control_msgs/FollowJointTrajectoryResult.h deleted file mode 100644 index 819f272..0000000 --- a/arduino/ros_lib/control_msgs/FollowJointTrajectoryResult.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef _ROS_control_msgs_FollowJointTrajectoryResult_h -#define _ROS_control_msgs_FollowJointTrajectoryResult_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class FollowJointTrajectoryResult : public ros::Msg - { - public: - typedef int32_t _error_code_type; - _error_code_type error_code; - typedef const char* _error_string_type; - _error_string_type error_string; - enum { SUCCESSFUL = 0 }; - enum { INVALID_GOAL = -1 }; - enum { INVALID_JOINTS = -2 }; - enum { OLD_HEADER_TIMESTAMP = -3 }; - enum { PATH_TOLERANCE_VIOLATED = -4 }; - enum { GOAL_TOLERANCE_VIOLATED = -5 }; - - FollowJointTrajectoryResult(): - error_code(0), - error_string("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - int32_t real; - uint32_t base; - } u_error_code; - u_error_code.real = this->error_code; - *(outbuffer + offset + 0) = (u_error_code.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_error_code.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_error_code.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_error_code.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->error_code); - uint32_t length_error_string = strlen(this->error_string); - varToArr(outbuffer + offset, length_error_string); - offset += 4; - memcpy(outbuffer + offset, this->error_string, length_error_string); - offset += length_error_string; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - int32_t real; - uint32_t base; - } u_error_code; - u_error_code.base = 0; - u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->error_code = u_error_code.real; - offset += sizeof(this->error_code); - uint32_t length_error_string; - arrToVar(length_error_string, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_error_string; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_error_string-1]=0; - this->error_string = (char *)(inbuffer + offset-1); - offset += length_error_string; - return offset; - } - - const char * getType(){ return "control_msgs/FollowJointTrajectoryResult"; }; - const char * getMD5(){ return "493383b18409bfb604b4e26c676401d2"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/GripperCommand.h b/arduino/ros_lib/control_msgs/GripperCommand.h deleted file mode 100644 index a65e307..0000000 --- a/arduino/ros_lib/control_msgs/GripperCommand.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _ROS_control_msgs_GripperCommand_h -#define _ROS_control_msgs_GripperCommand_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class GripperCommand : public ros::Msg - { - public: - typedef float _position_type; - _position_type position; - typedef float _max_effort_type; - _max_effort_type max_effort; - - GripperCommand(): - position(0), - max_effort(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->position); - offset += serializeAvrFloat64(outbuffer + offset, this->max_effort); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->position)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->max_effort)); - return offset; - } - - const char * getType(){ return "control_msgs/GripperCommand"; }; - const char * getMD5(){ return "680acaff79486f017132a7f198d40f08"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/GripperCommandAction.h b/arduino/ros_lib/control_msgs/GripperCommandAction.h deleted file mode 100644 index 68d8356..0000000 --- a/arduino/ros_lib/control_msgs/GripperCommandAction.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_GripperCommandAction_h -#define _ROS_control_msgs_GripperCommandAction_h - -#include -#include -#include -#include "ros/msg.h" -#include "control_msgs/GripperCommandActionGoal.h" -#include "control_msgs/GripperCommandActionResult.h" -#include "control_msgs/GripperCommandActionFeedback.h" - -namespace control_msgs -{ - - class GripperCommandAction : public ros::Msg - { - public: - typedef control_msgs::GripperCommandActionGoal _action_goal_type; - _action_goal_type action_goal; - typedef control_msgs::GripperCommandActionResult _action_result_type; - _action_result_type action_result; - typedef control_msgs::GripperCommandActionFeedback _action_feedback_type; - _action_feedback_type action_feedback; - - GripperCommandAction(): - action_goal(), - action_result(), - action_feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->action_goal.serialize(outbuffer + offset); - offset += this->action_result.serialize(outbuffer + offset); - offset += this->action_feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->action_goal.deserialize(inbuffer + offset); - offset += this->action_result.deserialize(inbuffer + offset); - offset += this->action_feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/GripperCommandAction"; }; - const char * getMD5(){ return "950b2a6ebe831f5d4f4ceaba3d8be01e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/GripperCommandActionFeedback.h b/arduino/ros_lib/control_msgs/GripperCommandActionFeedback.h deleted file mode 100644 index 67f99c9..0000000 --- a/arduino/ros_lib/control_msgs/GripperCommandActionFeedback.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_GripperCommandActionFeedback_h -#define _ROS_control_msgs_GripperCommandActionFeedback_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/GripperCommandFeedback.h" - -namespace control_msgs -{ - - class GripperCommandActionFeedback : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::GripperCommandFeedback _feedback_type; - _feedback_type feedback; - - GripperCommandActionFeedback(): - header(), - status(), - feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/GripperCommandActionFeedback"; }; - const char * getMD5(){ return "653dff30c045f5e6ff3feb3409f4558d"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/GripperCommandActionGoal.h b/arduino/ros_lib/control_msgs/GripperCommandActionGoal.h deleted file mode 100644 index efb19d1..0000000 --- a/arduino/ros_lib/control_msgs/GripperCommandActionGoal.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_GripperCommandActionGoal_h -#define _ROS_control_msgs_GripperCommandActionGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalID.h" -#include "control_msgs/GripperCommandGoal.h" - -namespace control_msgs -{ - - class GripperCommandActionGoal : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalID _goal_id_type; - _goal_id_type goal_id; - typedef control_msgs::GripperCommandGoal _goal_type; - _goal_type goal; - - GripperCommandActionGoal(): - header(), - goal_id(), - goal() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->goal_id.serialize(outbuffer + offset); - offset += this->goal.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->goal_id.deserialize(inbuffer + offset); - offset += this->goal.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/GripperCommandActionGoal"; }; - const char * getMD5(){ return "aa581f648a35ed681db2ec0bf7a82bea"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/GripperCommandActionResult.h b/arduino/ros_lib/control_msgs/GripperCommandActionResult.h deleted file mode 100644 index 704f18d..0000000 --- a/arduino/ros_lib/control_msgs/GripperCommandActionResult.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_GripperCommandActionResult_h -#define _ROS_control_msgs_GripperCommandActionResult_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/GripperCommandResult.h" - -namespace control_msgs -{ - - class GripperCommandActionResult : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::GripperCommandResult _result_type; - _result_type result; - - GripperCommandActionResult(): - header(), - status(), - result() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->result.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->result.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/GripperCommandActionResult"; }; - const char * getMD5(){ return "143702cb2df0f163c5283cedc5efc6b6"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/GripperCommandFeedback.h b/arduino/ros_lib/control_msgs/GripperCommandFeedback.h deleted file mode 100644 index fac2eec..0000000 --- a/arduino/ros_lib/control_msgs/GripperCommandFeedback.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef _ROS_control_msgs_GripperCommandFeedback_h -#define _ROS_control_msgs_GripperCommandFeedback_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class GripperCommandFeedback : public ros::Msg - { - public: - typedef float _position_type; - _position_type position; - typedef float _effort_type; - _effort_type effort; - typedef bool _stalled_type; - _stalled_type stalled; - typedef bool _reached_goal_type; - _reached_goal_type reached_goal; - - GripperCommandFeedback(): - position(0), - effort(0), - stalled(0), - reached_goal(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->position); - offset += serializeAvrFloat64(outbuffer + offset, this->effort); - union { - bool real; - uint8_t base; - } u_stalled; - u_stalled.real = this->stalled; - *(outbuffer + offset + 0) = (u_stalled.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->stalled); - union { - bool real; - uint8_t base; - } u_reached_goal; - u_reached_goal.real = this->reached_goal; - *(outbuffer + offset + 0) = (u_reached_goal.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->reached_goal); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->position)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->effort)); - union { - bool real; - uint8_t base; - } u_stalled; - u_stalled.base = 0; - u_stalled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->stalled = u_stalled.real; - offset += sizeof(this->stalled); - union { - bool real; - uint8_t base; - } u_reached_goal; - u_reached_goal.base = 0; - u_reached_goal.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->reached_goal = u_reached_goal.real; - offset += sizeof(this->reached_goal); - return offset; - } - - const char * getType(){ return "control_msgs/GripperCommandFeedback"; }; - const char * getMD5(){ return "e4cbff56d3562bcf113da5a5adeef91f"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/GripperCommandGoal.h b/arduino/ros_lib/control_msgs/GripperCommandGoal.h deleted file mode 100644 index 544a864..0000000 --- a/arduino/ros_lib/control_msgs/GripperCommandGoal.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _ROS_control_msgs_GripperCommandGoal_h -#define _ROS_control_msgs_GripperCommandGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "control_msgs/GripperCommand.h" - -namespace control_msgs -{ - - class GripperCommandGoal : public ros::Msg - { - public: - typedef control_msgs::GripperCommand _command_type; - _command_type command; - - GripperCommandGoal(): - command() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->command.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->command.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/GripperCommandGoal"; }; - const char * getMD5(){ return "86fd82f4ddc48a4cb6856cfa69217e43"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/GripperCommandResult.h b/arduino/ros_lib/control_msgs/GripperCommandResult.h deleted file mode 100644 index 1fdd252..0000000 --- a/arduino/ros_lib/control_msgs/GripperCommandResult.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef _ROS_control_msgs_GripperCommandResult_h -#define _ROS_control_msgs_GripperCommandResult_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class GripperCommandResult : public ros::Msg - { - public: - typedef float _position_type; - _position_type position; - typedef float _effort_type; - _effort_type effort; - typedef bool _stalled_type; - _stalled_type stalled; - typedef bool _reached_goal_type; - _reached_goal_type reached_goal; - - GripperCommandResult(): - position(0), - effort(0), - stalled(0), - reached_goal(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->position); - offset += serializeAvrFloat64(outbuffer + offset, this->effort); - union { - bool real; - uint8_t base; - } u_stalled; - u_stalled.real = this->stalled; - *(outbuffer + offset + 0) = (u_stalled.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->stalled); - union { - bool real; - uint8_t base; - } u_reached_goal; - u_reached_goal.real = this->reached_goal; - *(outbuffer + offset + 0) = (u_reached_goal.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->reached_goal); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->position)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->effort)); - union { - bool real; - uint8_t base; - } u_stalled; - u_stalled.base = 0; - u_stalled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->stalled = u_stalled.real; - offset += sizeof(this->stalled); - union { - bool real; - uint8_t base; - } u_reached_goal; - u_reached_goal.base = 0; - u_reached_goal.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->reached_goal = u_reached_goal.real; - offset += sizeof(this->reached_goal); - return offset; - } - - const char * getType(){ return "control_msgs/GripperCommandResult"; }; - const char * getMD5(){ return "e4cbff56d3562bcf113da5a5adeef91f"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointControllerState.h b/arduino/ros_lib/control_msgs/JointControllerState.h deleted file mode 100644 index fcf05b9..0000000 --- a/arduino/ros_lib/control_msgs/JointControllerState.h +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef _ROS_control_msgs_JointControllerState_h -#define _ROS_control_msgs_JointControllerState_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" - -namespace control_msgs -{ - - class JointControllerState : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef float _set_point_type; - _set_point_type set_point; - typedef float _process_value_type; - _process_value_type process_value; - typedef float _process_value_dot_type; - _process_value_dot_type process_value_dot; - typedef float _error_type; - _error_type error; - typedef float _time_step_type; - _time_step_type time_step; - typedef float _command_type; - _command_type command; - typedef float _p_type; - _p_type p; - typedef float _i_type; - _i_type i; - typedef float _d_type; - _d_type d; - typedef float _i_clamp_type; - _i_clamp_type i_clamp; - typedef bool _antiwindup_type; - _antiwindup_type antiwindup; - - JointControllerState(): - header(), - set_point(0), - process_value(0), - process_value_dot(0), - error(0), - time_step(0), - command(0), - p(0), - i(0), - d(0), - i_clamp(0), - antiwindup(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += serializeAvrFloat64(outbuffer + offset, this->set_point); - offset += serializeAvrFloat64(outbuffer + offset, this->process_value); - offset += serializeAvrFloat64(outbuffer + offset, this->process_value_dot); - offset += serializeAvrFloat64(outbuffer + offset, this->error); - offset += serializeAvrFloat64(outbuffer + offset, this->time_step); - offset += serializeAvrFloat64(outbuffer + offset, this->command); - offset += serializeAvrFloat64(outbuffer + offset, this->p); - offset += serializeAvrFloat64(outbuffer + offset, this->i); - offset += serializeAvrFloat64(outbuffer + offset, this->d); - offset += serializeAvrFloat64(outbuffer + offset, this->i_clamp); - union { - bool real; - uint8_t base; - } u_antiwindup; - u_antiwindup.real = this->antiwindup; - *(outbuffer + offset + 0) = (u_antiwindup.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->antiwindup); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->set_point)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->process_value)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->process_value_dot)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->error)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->time_step)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->command)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->p)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->i)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->d)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->i_clamp)); - union { - bool real; - uint8_t base; - } u_antiwindup; - u_antiwindup.base = 0; - u_antiwindup.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->antiwindup = u_antiwindup.real; - offset += sizeof(this->antiwindup); - return offset; - } - - const char * getType(){ return "control_msgs/JointControllerState"; }; - const char * getMD5(){ return "987ad85e4756f3aef7f1e5e7fe0595d1"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointTolerance.h b/arduino/ros_lib/control_msgs/JointTolerance.h deleted file mode 100644 index eb7a002..0000000 --- a/arduino/ros_lib/control_msgs/JointTolerance.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _ROS_control_msgs_JointTolerance_h -#define _ROS_control_msgs_JointTolerance_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class JointTolerance : public ros::Msg - { - public: - typedef const char* _name_type; - _name_type name; - typedef float _position_type; - _position_type position; - typedef float _velocity_type; - _velocity_type velocity; - typedef float _acceleration_type; - _acceleration_type acceleration; - - JointTolerance(): - name(""), - position(0), - velocity(0), - acceleration(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_name = strlen(this->name); - varToArr(outbuffer + offset, length_name); - offset += 4; - memcpy(outbuffer + offset, this->name, length_name); - offset += length_name; - offset += serializeAvrFloat64(outbuffer + offset, this->position); - offset += serializeAvrFloat64(outbuffer + offset, this->velocity); - offset += serializeAvrFloat64(outbuffer + offset, this->acceleration); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_name; - arrToVar(length_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_name-1]=0; - this->name = (char *)(inbuffer + offset-1); - offset += length_name; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->position)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->velocity)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->acceleration)); - return offset; - } - - const char * getType(){ return "control_msgs/JointTolerance"; }; - const char * getMD5(){ return "f544fe9c16cf04547e135dd6063ff5be"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointTrajectoryAction.h b/arduino/ros_lib/control_msgs/JointTrajectoryAction.h deleted file mode 100644 index 96bbaa4..0000000 --- a/arduino/ros_lib/control_msgs/JointTrajectoryAction.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_JointTrajectoryAction_h -#define _ROS_control_msgs_JointTrajectoryAction_h - -#include -#include -#include -#include "ros/msg.h" -#include "control_msgs/JointTrajectoryActionGoal.h" -#include "control_msgs/JointTrajectoryActionResult.h" -#include "control_msgs/JointTrajectoryActionFeedback.h" - -namespace control_msgs -{ - - class JointTrajectoryAction : public ros::Msg - { - public: - typedef control_msgs::JointTrajectoryActionGoal _action_goal_type; - _action_goal_type action_goal; - typedef control_msgs::JointTrajectoryActionResult _action_result_type; - _action_result_type action_result; - typedef control_msgs::JointTrajectoryActionFeedback _action_feedback_type; - _action_feedback_type action_feedback; - - JointTrajectoryAction(): - action_goal(), - action_result(), - action_feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->action_goal.serialize(outbuffer + offset); - offset += this->action_result.serialize(outbuffer + offset); - offset += this->action_feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->action_goal.deserialize(inbuffer + offset); - offset += this->action_result.deserialize(inbuffer + offset); - offset += this->action_feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/JointTrajectoryAction"; }; - const char * getMD5(){ return "a04ba3ee8f6a2d0985a6aeaf23d9d7ad"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointTrajectoryActionFeedback.h b/arduino/ros_lib/control_msgs/JointTrajectoryActionFeedback.h deleted file mode 100644 index 8df7fee..0000000 --- a/arduino/ros_lib/control_msgs/JointTrajectoryActionFeedback.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_JointTrajectoryActionFeedback_h -#define _ROS_control_msgs_JointTrajectoryActionFeedback_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/JointTrajectoryFeedback.h" - -namespace control_msgs -{ - - class JointTrajectoryActionFeedback : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::JointTrajectoryFeedback _feedback_type; - _feedback_type feedback; - - JointTrajectoryActionFeedback(): - header(), - status(), - feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/JointTrajectoryActionFeedback"; }; - const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointTrajectoryActionGoal.h b/arduino/ros_lib/control_msgs/JointTrajectoryActionGoal.h deleted file mode 100644 index 8c432bb..0000000 --- a/arduino/ros_lib/control_msgs/JointTrajectoryActionGoal.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_JointTrajectoryActionGoal_h -#define _ROS_control_msgs_JointTrajectoryActionGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalID.h" -#include "control_msgs/JointTrajectoryGoal.h" - -namespace control_msgs -{ - - class JointTrajectoryActionGoal : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalID _goal_id_type; - _goal_id_type goal_id; - typedef control_msgs::JointTrajectoryGoal _goal_type; - _goal_type goal; - - JointTrajectoryActionGoal(): - header(), - goal_id(), - goal() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->goal_id.serialize(outbuffer + offset); - offset += this->goal.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->goal_id.deserialize(inbuffer + offset); - offset += this->goal.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/JointTrajectoryActionGoal"; }; - const char * getMD5(){ return "a99e83ef6185f9fdd7693efe99623a86"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointTrajectoryActionResult.h b/arduino/ros_lib/control_msgs/JointTrajectoryActionResult.h deleted file mode 100644 index 2a11d22..0000000 --- a/arduino/ros_lib/control_msgs/JointTrajectoryActionResult.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_JointTrajectoryActionResult_h -#define _ROS_control_msgs_JointTrajectoryActionResult_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/JointTrajectoryResult.h" - -namespace control_msgs -{ - - class JointTrajectoryActionResult : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::JointTrajectoryResult _result_type; - _result_type result; - - JointTrajectoryActionResult(): - header(), - status(), - result() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->result.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->result.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/JointTrajectoryActionResult"; }; - const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointTrajectoryControllerState.h b/arduino/ros_lib/control_msgs/JointTrajectoryControllerState.h deleted file mode 100644 index 148db3a..0000000 --- a/arduino/ros_lib/control_msgs/JointTrajectoryControllerState.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef _ROS_control_msgs_JointTrajectoryControllerState_h -#define _ROS_control_msgs_JointTrajectoryControllerState_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "trajectory_msgs/JointTrajectoryPoint.h" - -namespace control_msgs -{ - - class JointTrajectoryControllerState : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t joint_names_length; - typedef char* _joint_names_type; - _joint_names_type st_joint_names; - _joint_names_type * joint_names; - typedef trajectory_msgs::JointTrajectoryPoint _desired_type; - _desired_type desired; - typedef trajectory_msgs::JointTrajectoryPoint _actual_type; - _actual_type actual; - typedef trajectory_msgs::JointTrajectoryPoint _error_type; - _error_type error; - - JointTrajectoryControllerState(): - header(), - joint_names_length(0), joint_names(NULL), - desired(), - actual(), - error() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->joint_names_length); - for( uint32_t i = 0; i < joint_names_length; i++){ - uint32_t length_joint_namesi = strlen(this->joint_names[i]); - varToArr(outbuffer + offset, length_joint_namesi); - offset += 4; - memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); - offset += length_joint_namesi; - } - offset += this->desired.serialize(outbuffer + offset); - offset += this->actual.serialize(outbuffer + offset); - offset += this->error.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->joint_names_length); - if(joint_names_lengthT > joint_names_length) - this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); - joint_names_length = joint_names_lengthT; - for( uint32_t i = 0; i < joint_names_length; i++){ - uint32_t length_st_joint_names; - arrToVar(length_st_joint_names, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_joint_names-1]=0; - this->st_joint_names = (char *)(inbuffer + offset-1); - offset += length_st_joint_names; - memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); - } - offset += this->desired.deserialize(inbuffer + offset); - offset += this->actual.deserialize(inbuffer + offset); - offset += this->error.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/JointTrajectoryControllerState"; }; - const char * getMD5(){ return "10817c60c2486ef6b33e97dcd87f4474"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointTrajectoryFeedback.h b/arduino/ros_lib/control_msgs/JointTrajectoryFeedback.h deleted file mode 100644 index 9dfe808..0000000 --- a/arduino/ros_lib/control_msgs/JointTrajectoryFeedback.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _ROS_control_msgs_JointTrajectoryFeedback_h -#define _ROS_control_msgs_JointTrajectoryFeedback_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class JointTrajectoryFeedback : public ros::Msg - { - public: - - JointTrajectoryFeedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return "control_msgs/JointTrajectoryFeedback"; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointTrajectoryGoal.h b/arduino/ros_lib/control_msgs/JointTrajectoryGoal.h deleted file mode 100644 index b699132..0000000 --- a/arduino/ros_lib/control_msgs/JointTrajectoryGoal.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _ROS_control_msgs_JointTrajectoryGoal_h -#define _ROS_control_msgs_JointTrajectoryGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "trajectory_msgs/JointTrajectory.h" - -namespace control_msgs -{ - - class JointTrajectoryGoal : public ros::Msg - { - public: - typedef trajectory_msgs::JointTrajectory _trajectory_type; - _trajectory_type trajectory; - - JointTrajectoryGoal(): - trajectory() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->trajectory.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->trajectory.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/JointTrajectoryGoal"; }; - const char * getMD5(){ return "2a0eff76c870e8595636c2a562ca298e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/JointTrajectoryResult.h b/arduino/ros_lib/control_msgs/JointTrajectoryResult.h deleted file mode 100644 index 623ed9c..0000000 --- a/arduino/ros_lib/control_msgs/JointTrajectoryResult.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _ROS_control_msgs_JointTrajectoryResult_h -#define _ROS_control_msgs_JointTrajectoryResult_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class JointTrajectoryResult : public ros::Msg - { - public: - - JointTrajectoryResult() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return "control_msgs/JointTrajectoryResult"; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/PidState.h b/arduino/ros_lib/control_msgs/PidState.h deleted file mode 100644 index 2da959c..0000000 --- a/arduino/ros_lib/control_msgs/PidState.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef _ROS_control_msgs_PidState_h -#define _ROS_control_msgs_PidState_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "ros/duration.h" - -namespace control_msgs -{ - - class PidState : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef ros::Duration _timestep_type; - _timestep_type timestep; - typedef float _error_type; - _error_type error; - typedef float _error_dot_type; - _error_dot_type error_dot; - typedef float _p_error_type; - _p_error_type p_error; - typedef float _i_error_type; - _i_error_type i_error; - typedef float _d_error_type; - _d_error_type d_error; - typedef float _p_term_type; - _p_term_type p_term; - typedef float _i_term_type; - _i_term_type i_term; - typedef float _d_term_type; - _d_term_type d_term; - typedef float _i_max_type; - _i_max_type i_max; - typedef float _i_min_type; - _i_min_type i_min; - typedef float _output_type; - _output_type output; - - PidState(): - header(), - timestep(), - error(0), - error_dot(0), - p_error(0), - i_error(0), - d_error(0), - p_term(0), - i_term(0), - d_term(0), - i_max(0), - i_min(0), - output(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->timestep.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->timestep.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->timestep.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->timestep.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->timestep.sec); - *(outbuffer + offset + 0) = (this->timestep.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->timestep.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->timestep.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->timestep.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->timestep.nsec); - offset += serializeAvrFloat64(outbuffer + offset, this->error); - offset += serializeAvrFloat64(outbuffer + offset, this->error_dot); - offset += serializeAvrFloat64(outbuffer + offset, this->p_error); - offset += serializeAvrFloat64(outbuffer + offset, this->i_error); - offset += serializeAvrFloat64(outbuffer + offset, this->d_error); - offset += serializeAvrFloat64(outbuffer + offset, this->p_term); - offset += serializeAvrFloat64(outbuffer + offset, this->i_term); - offset += serializeAvrFloat64(outbuffer + offset, this->d_term); - offset += serializeAvrFloat64(outbuffer + offset, this->i_max); - offset += serializeAvrFloat64(outbuffer + offset, this->i_min); - offset += serializeAvrFloat64(outbuffer + offset, this->output); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - this->timestep.sec = ((uint32_t) (*(inbuffer + offset))); - this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->timestep.sec); - this->timestep.nsec = ((uint32_t) (*(inbuffer + offset))); - this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->timestep.nsec); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->error)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->error_dot)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->p_error)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->i_error)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->d_error)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->p_term)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->i_term)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->d_term)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->i_max)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->i_min)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->output)); - return offset; - } - - const char * getType(){ return "control_msgs/PidState"; }; - const char * getMD5(){ return "b138ec00e886c10e73f27e8712252ea6"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/PointHeadAction.h b/arduino/ros_lib/control_msgs/PointHeadAction.h deleted file mode 100644 index 82ee446..0000000 --- a/arduino/ros_lib/control_msgs/PointHeadAction.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_PointHeadAction_h -#define _ROS_control_msgs_PointHeadAction_h - -#include -#include -#include -#include "ros/msg.h" -#include "control_msgs/PointHeadActionGoal.h" -#include "control_msgs/PointHeadActionResult.h" -#include "control_msgs/PointHeadActionFeedback.h" - -namespace control_msgs -{ - - class PointHeadAction : public ros::Msg - { - public: - typedef control_msgs::PointHeadActionGoal _action_goal_type; - _action_goal_type action_goal; - typedef control_msgs::PointHeadActionResult _action_result_type; - _action_result_type action_result; - typedef control_msgs::PointHeadActionFeedback _action_feedback_type; - _action_feedback_type action_feedback; - - PointHeadAction(): - action_goal(), - action_result(), - action_feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->action_goal.serialize(outbuffer + offset); - offset += this->action_result.serialize(outbuffer + offset); - offset += this->action_feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->action_goal.deserialize(inbuffer + offset); - offset += this->action_result.deserialize(inbuffer + offset); - offset += this->action_feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/PointHeadAction"; }; - const char * getMD5(){ return "7252920f1243de1b741f14f214125371"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/PointHeadActionFeedback.h b/arduino/ros_lib/control_msgs/PointHeadActionFeedback.h deleted file mode 100644 index 780656b..0000000 --- a/arduino/ros_lib/control_msgs/PointHeadActionFeedback.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_PointHeadActionFeedback_h -#define _ROS_control_msgs_PointHeadActionFeedback_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/PointHeadFeedback.h" - -namespace control_msgs -{ - - class PointHeadActionFeedback : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::PointHeadFeedback _feedback_type; - _feedback_type feedback; - - PointHeadActionFeedback(): - header(), - status(), - feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/PointHeadActionFeedback"; }; - const char * getMD5(){ return "33c9244957176bbba97dd641119e8460"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/PointHeadActionGoal.h b/arduino/ros_lib/control_msgs/PointHeadActionGoal.h deleted file mode 100644 index 12ae791..0000000 --- a/arduino/ros_lib/control_msgs/PointHeadActionGoal.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_PointHeadActionGoal_h -#define _ROS_control_msgs_PointHeadActionGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalID.h" -#include "control_msgs/PointHeadGoal.h" - -namespace control_msgs -{ - - class PointHeadActionGoal : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalID _goal_id_type; - _goal_id_type goal_id; - typedef control_msgs::PointHeadGoal _goal_type; - _goal_type goal; - - PointHeadActionGoal(): - header(), - goal_id(), - goal() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->goal_id.serialize(outbuffer + offset); - offset += this->goal.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->goal_id.deserialize(inbuffer + offset); - offset += this->goal.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/PointHeadActionGoal"; }; - const char * getMD5(){ return "b53a8323d0ba7b310ba17a2d3a82a6b8"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/PointHeadActionResult.h b/arduino/ros_lib/control_msgs/PointHeadActionResult.h deleted file mode 100644 index 7708fe6..0000000 --- a/arduino/ros_lib/control_msgs/PointHeadActionResult.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_PointHeadActionResult_h -#define _ROS_control_msgs_PointHeadActionResult_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/PointHeadResult.h" - -namespace control_msgs -{ - - class PointHeadActionResult : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::PointHeadResult _result_type; - _result_type result; - - PointHeadActionResult(): - header(), - status(), - result() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->result.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->result.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/PointHeadActionResult"; }; - const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/PointHeadFeedback.h b/arduino/ros_lib/control_msgs/PointHeadFeedback.h deleted file mode 100644 index f90f193..0000000 --- a/arduino/ros_lib/control_msgs/PointHeadFeedback.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _ROS_control_msgs_PointHeadFeedback_h -#define _ROS_control_msgs_PointHeadFeedback_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class PointHeadFeedback : public ros::Msg - { - public: - typedef float _pointing_angle_error_type; - _pointing_angle_error_type pointing_angle_error; - - PointHeadFeedback(): - pointing_angle_error(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->pointing_angle_error); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->pointing_angle_error)); - return offset; - } - - const char * getType(){ return "control_msgs/PointHeadFeedback"; }; - const char * getMD5(){ return "cce80d27fd763682da8805a73316cab4"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/PointHeadGoal.h b/arduino/ros_lib/control_msgs/PointHeadGoal.h deleted file mode 100644 index 852ef7e..0000000 --- a/arduino/ros_lib/control_msgs/PointHeadGoal.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef _ROS_control_msgs_PointHeadGoal_h -#define _ROS_control_msgs_PointHeadGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/PointStamped.h" -#include "geometry_msgs/Vector3.h" -#include "ros/duration.h" - -namespace control_msgs -{ - - class PointHeadGoal : public ros::Msg - { - public: - typedef geometry_msgs::PointStamped _target_type; - _target_type target; - typedef geometry_msgs::Vector3 _pointing_axis_type; - _pointing_axis_type pointing_axis; - typedef const char* _pointing_frame_type; - _pointing_frame_type pointing_frame; - typedef ros::Duration _min_duration_type; - _min_duration_type min_duration; - typedef float _max_velocity_type; - _max_velocity_type max_velocity; - - PointHeadGoal(): - target(), - pointing_axis(), - pointing_frame(""), - min_duration(), - max_velocity(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->target.serialize(outbuffer + offset); - offset += this->pointing_axis.serialize(outbuffer + offset); - uint32_t length_pointing_frame = strlen(this->pointing_frame); - varToArr(outbuffer + offset, length_pointing_frame); - offset += 4; - memcpy(outbuffer + offset, this->pointing_frame, length_pointing_frame); - offset += length_pointing_frame; - *(outbuffer + offset + 0) = (this->min_duration.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->min_duration.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->min_duration.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->min_duration.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->min_duration.sec); - *(outbuffer + offset + 0) = (this->min_duration.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->min_duration.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->min_duration.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->min_duration.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->min_duration.nsec); - offset += serializeAvrFloat64(outbuffer + offset, this->max_velocity); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->target.deserialize(inbuffer + offset); - offset += this->pointing_axis.deserialize(inbuffer + offset); - uint32_t length_pointing_frame; - arrToVar(length_pointing_frame, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_pointing_frame; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_pointing_frame-1]=0; - this->pointing_frame = (char *)(inbuffer + offset-1); - offset += length_pointing_frame; - this->min_duration.sec = ((uint32_t) (*(inbuffer + offset))); - this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->min_duration.sec); - this->min_duration.nsec = ((uint32_t) (*(inbuffer + offset))); - this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->min_duration.nsec); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->max_velocity)); - return offset; - } - - const char * getType(){ return "control_msgs/PointHeadGoal"; }; - const char * getMD5(){ return "8b92b1cd5e06c8a94c917dc3209a4c1d"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/PointHeadResult.h b/arduino/ros_lib/control_msgs/PointHeadResult.h deleted file mode 100644 index 53f789e..0000000 --- a/arduino/ros_lib/control_msgs/PointHeadResult.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _ROS_control_msgs_PointHeadResult_h -#define _ROS_control_msgs_PointHeadResult_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class PointHeadResult : public ros::Msg - { - public: - - PointHeadResult() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return "control_msgs/PointHeadResult"; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/QueryCalibrationState.h b/arduino/ros_lib/control_msgs/QueryCalibrationState.h deleted file mode 100644 index 0fd1a66..0000000 --- a/arduino/ros_lib/control_msgs/QueryCalibrationState.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef _ROS_SERVICE_QueryCalibrationState_h -#define _ROS_SERVICE_QueryCalibrationState_h -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - -static const char QUERYCALIBRATIONSTATE[] = "control_msgs/QueryCalibrationState"; - - class QueryCalibrationStateRequest : public ros::Msg - { - public: - - QueryCalibrationStateRequest() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return QUERYCALIBRATIONSTATE; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class QueryCalibrationStateResponse : public ros::Msg - { - public: - typedef bool _is_calibrated_type; - _is_calibrated_type is_calibrated; - - QueryCalibrationStateResponse(): - is_calibrated(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_is_calibrated; - u_is_calibrated.real = this->is_calibrated; - *(outbuffer + offset + 0) = (u_is_calibrated.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->is_calibrated); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_is_calibrated; - u_is_calibrated.base = 0; - u_is_calibrated.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->is_calibrated = u_is_calibrated.real; - offset += sizeof(this->is_calibrated); - return offset; - } - - const char * getType(){ return QUERYCALIBRATIONSTATE; }; - const char * getMD5(){ return "28af3beedcb84986b8e470dc5470507d"; }; - - }; - - class QueryCalibrationState { - public: - typedef QueryCalibrationStateRequest Request; - typedef QueryCalibrationStateResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/control_msgs/QueryTrajectoryState.h b/arduino/ros_lib/control_msgs/QueryTrajectoryState.h deleted file mode 100644 index aa3e9ed..0000000 --- a/arduino/ros_lib/control_msgs/QueryTrajectoryState.h +++ /dev/null @@ -1,206 +0,0 @@ -#ifndef _ROS_SERVICE_QueryTrajectoryState_h -#define _ROS_SERVICE_QueryTrajectoryState_h -#include -#include -#include -#include "ros/msg.h" -#include "ros/time.h" - -namespace control_msgs -{ - -static const char QUERYTRAJECTORYSTATE[] = "control_msgs/QueryTrajectoryState"; - - class QueryTrajectoryStateRequest : public ros::Msg - { - public: - typedef ros::Time _time_type; - _time_type time; - - QueryTrajectoryStateRequest(): - time() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->time.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->time.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->time.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->time.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->time.sec); - *(outbuffer + offset + 0) = (this->time.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->time.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->time.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->time.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->time.nsec); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - this->time.sec = ((uint32_t) (*(inbuffer + offset))); - this->time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->time.sec); - this->time.nsec = ((uint32_t) (*(inbuffer + offset))); - this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->time.nsec); - return offset; - } - - const char * getType(){ return QUERYTRAJECTORYSTATE; }; - const char * getMD5(){ return "556a4fb76023a469987922359d08a844"; }; - - }; - - class QueryTrajectoryStateResponse : public ros::Msg - { - public: - uint32_t name_length; - typedef char* _name_type; - _name_type st_name; - _name_type * name; - uint32_t position_length; - typedef float _position_type; - _position_type st_position; - _position_type * position; - uint32_t velocity_length; - typedef float _velocity_type; - _velocity_type st_velocity; - _velocity_type * velocity; - uint32_t acceleration_length; - typedef float _acceleration_type; - _acceleration_type st_acceleration; - _acceleration_type * acceleration; - - QueryTrajectoryStateResponse(): - name_length(0), name(NULL), - position_length(0), position(NULL), - velocity_length(0), velocity(NULL), - acceleration_length(0), acceleration(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->name_length); - for( uint32_t i = 0; i < name_length; i++){ - uint32_t length_namei = strlen(this->name[i]); - varToArr(outbuffer + offset, length_namei); - offset += 4; - memcpy(outbuffer + offset, this->name[i], length_namei); - offset += length_namei; - } - *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->position_length); - for( uint32_t i = 0; i < position_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->position[i]); - } - *(outbuffer + offset + 0) = (this->velocity_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->velocity_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->velocity_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->velocity_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->velocity_length); - for( uint32_t i = 0; i < velocity_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->velocity[i]); - } - *(outbuffer + offset + 0) = (this->acceleration_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->acceleration_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->acceleration_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->acceleration_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->acceleration_length); - for( uint32_t i = 0; i < acceleration_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->acceleration[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->name_length); - if(name_lengthT > name_length) - this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); - name_length = name_lengthT; - for( uint32_t i = 0; i < name_length; i++){ - uint32_t length_st_name; - arrToVar(length_st_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_name-1]=0; - this->st_name = (char *)(inbuffer + offset-1); - offset += length_st_name; - memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); - } - uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); - position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->position_length); - if(position_lengthT > position_length) - this->position = (float*)realloc(this->position, position_lengthT * sizeof(float)); - position_length = position_lengthT; - for( uint32_t i = 0; i < position_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_position)); - memcpy( &(this->position[i]), &(this->st_position), sizeof(float)); - } - uint32_t velocity_lengthT = ((uint32_t) (*(inbuffer + offset))); - velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->velocity_length); - if(velocity_lengthT > velocity_length) - this->velocity = (float*)realloc(this->velocity, velocity_lengthT * sizeof(float)); - velocity_length = velocity_lengthT; - for( uint32_t i = 0; i < velocity_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_velocity)); - memcpy( &(this->velocity[i]), &(this->st_velocity), sizeof(float)); - } - uint32_t acceleration_lengthT = ((uint32_t) (*(inbuffer + offset))); - acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->acceleration_length); - if(acceleration_lengthT > acceleration_length) - this->acceleration = (float*)realloc(this->acceleration, acceleration_lengthT * sizeof(float)); - acceleration_length = acceleration_lengthT; - for( uint32_t i = 0; i < acceleration_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_acceleration)); - memcpy( &(this->acceleration[i]), &(this->st_acceleration), sizeof(float)); - } - return offset; - } - - const char * getType(){ return QUERYTRAJECTORYSTATE; }; - const char * getMD5(){ return "1f1a6554ad060f44d013e71868403c1a"; }; - - }; - - class QueryTrajectoryState { - public: - typedef QueryTrajectoryStateRequest Request; - typedef QueryTrajectoryStateResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/control_msgs/SingleJointPositionAction.h b/arduino/ros_lib/control_msgs/SingleJointPositionAction.h deleted file mode 100644 index 3117ee1..0000000 --- a/arduino/ros_lib/control_msgs/SingleJointPositionAction.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_SingleJointPositionAction_h -#define _ROS_control_msgs_SingleJointPositionAction_h - -#include -#include -#include -#include "ros/msg.h" -#include "control_msgs/SingleJointPositionActionGoal.h" -#include "control_msgs/SingleJointPositionActionResult.h" -#include "control_msgs/SingleJointPositionActionFeedback.h" - -namespace control_msgs -{ - - class SingleJointPositionAction : public ros::Msg - { - public: - typedef control_msgs::SingleJointPositionActionGoal _action_goal_type; - _action_goal_type action_goal; - typedef control_msgs::SingleJointPositionActionResult _action_result_type; - _action_result_type action_result; - typedef control_msgs::SingleJointPositionActionFeedback _action_feedback_type; - _action_feedback_type action_feedback; - - SingleJointPositionAction(): - action_goal(), - action_result(), - action_feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->action_goal.serialize(outbuffer + offset); - offset += this->action_result.serialize(outbuffer + offset); - offset += this->action_feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->action_goal.deserialize(inbuffer + offset); - offset += this->action_result.deserialize(inbuffer + offset); - offset += this->action_feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/SingleJointPositionAction"; }; - const char * getMD5(){ return "c4a786b7d53e5d0983decf967a5a779e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/SingleJointPositionActionFeedback.h b/arduino/ros_lib/control_msgs/SingleJointPositionActionFeedback.h deleted file mode 100644 index 82cba63..0000000 --- a/arduino/ros_lib/control_msgs/SingleJointPositionActionFeedback.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_SingleJointPositionActionFeedback_h -#define _ROS_control_msgs_SingleJointPositionActionFeedback_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/SingleJointPositionFeedback.h" - -namespace control_msgs -{ - - class SingleJointPositionActionFeedback : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::SingleJointPositionFeedback _feedback_type; - _feedback_type feedback; - - SingleJointPositionActionFeedback(): - header(), - status(), - feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/SingleJointPositionActionFeedback"; }; - const char * getMD5(){ return "3503b7cf8972f90d245850a5d8796cfa"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/SingleJointPositionActionGoal.h b/arduino/ros_lib/control_msgs/SingleJointPositionActionGoal.h deleted file mode 100644 index 75c7898..0000000 --- a/arduino/ros_lib/control_msgs/SingleJointPositionActionGoal.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_SingleJointPositionActionGoal_h -#define _ROS_control_msgs_SingleJointPositionActionGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalID.h" -#include "control_msgs/SingleJointPositionGoal.h" - -namespace control_msgs -{ - - class SingleJointPositionActionGoal : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalID _goal_id_type; - _goal_id_type goal_id; - typedef control_msgs::SingleJointPositionGoal _goal_type; - _goal_type goal; - - SingleJointPositionActionGoal(): - header(), - goal_id(), - goal() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->goal_id.serialize(outbuffer + offset); - offset += this->goal.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->goal_id.deserialize(inbuffer + offset); - offset += this->goal.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/SingleJointPositionActionGoal"; }; - const char * getMD5(){ return "4b0d3d091471663e17749c1d0db90f61"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/SingleJointPositionActionResult.h b/arduino/ros_lib/control_msgs/SingleJointPositionActionResult.h deleted file mode 100644 index ef99cd8..0000000 --- a/arduino/ros_lib/control_msgs/SingleJointPositionActionResult.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_control_msgs_SingleJointPositionActionResult_h -#define _ROS_control_msgs_SingleJointPositionActionResult_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "control_msgs/SingleJointPositionResult.h" - -namespace control_msgs -{ - - class SingleJointPositionActionResult : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef control_msgs::SingleJointPositionResult _result_type; - _result_type result; - - SingleJointPositionActionResult(): - header(), - status(), - result() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->result.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->result.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "control_msgs/SingleJointPositionActionResult"; }; - const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/SingleJointPositionFeedback.h b/arduino/ros_lib/control_msgs/SingleJointPositionFeedback.h deleted file mode 100644 index 44af4bf..0000000 --- a/arduino/ros_lib/control_msgs/SingleJointPositionFeedback.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef _ROS_control_msgs_SingleJointPositionFeedback_h -#define _ROS_control_msgs_SingleJointPositionFeedback_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" - -namespace control_msgs -{ - - class SingleJointPositionFeedback : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef float _position_type; - _position_type position; - typedef float _velocity_type; - _velocity_type velocity; - typedef float _error_type; - _error_type error; - - SingleJointPositionFeedback(): - header(), - position(0), - velocity(0), - error(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += serializeAvrFloat64(outbuffer + offset, this->position); - offset += serializeAvrFloat64(outbuffer + offset, this->velocity); - offset += serializeAvrFloat64(outbuffer + offset, this->error); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->position)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->velocity)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->error)); - return offset; - } - - const char * getType(){ return "control_msgs/SingleJointPositionFeedback"; }; - const char * getMD5(){ return "8cee65610a3d08e0a1bded82f146f1fd"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/SingleJointPositionGoal.h b/arduino/ros_lib/control_msgs/SingleJointPositionGoal.h deleted file mode 100644 index 4442daf..0000000 --- a/arduino/ros_lib/control_msgs/SingleJointPositionGoal.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _ROS_control_msgs_SingleJointPositionGoal_h -#define _ROS_control_msgs_SingleJointPositionGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "ros/duration.h" - -namespace control_msgs -{ - - class SingleJointPositionGoal : public ros::Msg - { - public: - typedef float _position_type; - _position_type position; - typedef ros::Duration _min_duration_type; - _min_duration_type min_duration; - typedef float _max_velocity_type; - _max_velocity_type max_velocity; - - SingleJointPositionGoal(): - position(0), - min_duration(), - max_velocity(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->position); - *(outbuffer + offset + 0) = (this->min_duration.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->min_duration.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->min_duration.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->min_duration.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->min_duration.sec); - *(outbuffer + offset + 0) = (this->min_duration.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->min_duration.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->min_duration.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->min_duration.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->min_duration.nsec); - offset += serializeAvrFloat64(outbuffer + offset, this->max_velocity); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->position)); - this->min_duration.sec = ((uint32_t) (*(inbuffer + offset))); - this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->min_duration.sec); - this->min_duration.nsec = ((uint32_t) (*(inbuffer + offset))); - this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->min_duration.nsec); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->max_velocity)); - return offset; - } - - const char * getType(){ return "control_msgs/SingleJointPositionGoal"; }; - const char * getMD5(){ return "fbaaa562a23a013fd5053e5f72cbb35c"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/control_msgs/SingleJointPositionResult.h b/arduino/ros_lib/control_msgs/SingleJointPositionResult.h deleted file mode 100644 index 7593425..0000000 --- a/arduino/ros_lib/control_msgs/SingleJointPositionResult.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _ROS_control_msgs_SingleJointPositionResult_h -#define _ROS_control_msgs_SingleJointPositionResult_h - -#include -#include -#include -#include "ros/msg.h" - -namespace control_msgs -{ - - class SingleJointPositionResult : public ros::Msg - { - public: - - SingleJointPositionResult() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return "control_msgs/SingleJointPositionResult"; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/diagnostic_msgs/AddDiagnostics.h b/arduino/ros_lib/diagnostic_msgs/AddDiagnostics.h deleted file mode 100644 index 4180098..0000000 --- a/arduino/ros_lib/diagnostic_msgs/AddDiagnostics.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef _ROS_SERVICE_AddDiagnostics_h -#define _ROS_SERVICE_AddDiagnostics_h -#include -#include -#include -#include "ros/msg.h" - -namespace diagnostic_msgs -{ - -static const char ADDDIAGNOSTICS[] = "diagnostic_msgs/AddDiagnostics"; - - class AddDiagnosticsRequest : public ros::Msg - { - public: - typedef const char* _load_namespace_type; - _load_namespace_type load_namespace; - - AddDiagnosticsRequest(): - load_namespace("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_load_namespace = strlen(this->load_namespace); - varToArr(outbuffer + offset, length_load_namespace); - offset += 4; - memcpy(outbuffer + offset, this->load_namespace, length_load_namespace); - offset += length_load_namespace; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_load_namespace; - arrToVar(length_load_namespace, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_load_namespace; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_load_namespace-1]=0; - this->load_namespace = (char *)(inbuffer + offset-1); - offset += length_load_namespace; - return offset; - } - - const char * getType(){ return ADDDIAGNOSTICS; }; - const char * getMD5(){ return "c26cf6e164288fbc6050d74f838bcdf0"; }; - - }; - - class AddDiagnosticsResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _message_type; - _message_type message; - - AddDiagnosticsResponse(): - success(0), - message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_message = strlen(this->message); - varToArr(outbuffer + offset, length_message); - offset += 4; - memcpy(outbuffer + offset, this->message, length_message); - offset += length_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_message; - arrToVar(length_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_message-1]=0; - this->message = (char *)(inbuffer + offset-1); - offset += length_message; - return offset; - } - - const char * getType(){ return ADDDIAGNOSTICS; }; - const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; - - }; - - class AddDiagnostics { - public: - typedef AddDiagnosticsRequest Request; - typedef AddDiagnosticsResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/diagnostic_msgs/DiagnosticArray.h b/arduino/ros_lib/diagnostic_msgs/DiagnosticArray.h deleted file mode 100644 index 1deb743..0000000 --- a/arduino/ros_lib/diagnostic_msgs/DiagnosticArray.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _ROS_diagnostic_msgs_DiagnosticArray_h -#define _ROS_diagnostic_msgs_DiagnosticArray_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "diagnostic_msgs/DiagnosticStatus.h" - -namespace diagnostic_msgs -{ - - class DiagnosticArray : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t status_length; - typedef diagnostic_msgs::DiagnosticStatus _status_type; - _status_type st_status; - _status_type * status; - - DiagnosticArray(): - header(), - status_length(0), status(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->status_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->status_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->status_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->status_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->status_length); - for( uint32_t i = 0; i < status_length; i++){ - offset += this->status[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t status_lengthT = ((uint32_t) (*(inbuffer + offset))); - status_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - status_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - status_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->status_length); - if(status_lengthT > status_length) - this->status = (diagnostic_msgs::DiagnosticStatus*)realloc(this->status, status_lengthT * sizeof(diagnostic_msgs::DiagnosticStatus)); - status_length = status_lengthT; - for( uint32_t i = 0; i < status_length; i++){ - offset += this->st_status.deserialize(inbuffer + offset); - memcpy( &(this->status[i]), &(this->st_status), sizeof(diagnostic_msgs::DiagnosticStatus)); - } - return offset; - } - - const char * getType(){ return "diagnostic_msgs/DiagnosticArray"; }; - const char * getMD5(){ return "60810da900de1dd6ddd437c3503511da"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/diagnostic_msgs/DiagnosticStatus.h b/arduino/ros_lib/diagnostic_msgs/DiagnosticStatus.h deleted file mode 100644 index 490c163..0000000 --- a/arduino/ros_lib/diagnostic_msgs/DiagnosticStatus.h +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef _ROS_diagnostic_msgs_DiagnosticStatus_h -#define _ROS_diagnostic_msgs_DiagnosticStatus_h - -#include -#include -#include -#include "ros/msg.h" -#include "diagnostic_msgs/KeyValue.h" - -namespace diagnostic_msgs -{ - - class DiagnosticStatus : public ros::Msg - { - public: - typedef int8_t _level_type; - _level_type level; - typedef const char* _name_type; - _name_type name; - typedef const char* _message_type; - _message_type message; - typedef const char* _hardware_id_type; - _hardware_id_type hardware_id; - uint32_t values_length; - typedef diagnostic_msgs::KeyValue _values_type; - _values_type st_values; - _values_type * values; - enum { OK = 0 }; - enum { WARN = 1 }; - enum { ERROR = 2 }; - enum { STALE = 3 }; - - DiagnosticStatus(): - level(0), - name(""), - message(""), - hardware_id(""), - values_length(0), values(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - int8_t real; - uint8_t base; - } u_level; - u_level.real = this->level; - *(outbuffer + offset + 0) = (u_level.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->level); - uint32_t length_name = strlen(this->name); - varToArr(outbuffer + offset, length_name); - offset += 4; - memcpy(outbuffer + offset, this->name, length_name); - offset += length_name; - uint32_t length_message = strlen(this->message); - varToArr(outbuffer + offset, length_message); - offset += 4; - memcpy(outbuffer + offset, this->message, length_message); - offset += length_message; - uint32_t length_hardware_id = strlen(this->hardware_id); - varToArr(outbuffer + offset, length_hardware_id); - offset += 4; - memcpy(outbuffer + offset, this->hardware_id, length_hardware_id); - offset += length_hardware_id; - *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->values_length); - for( uint32_t i = 0; i < values_length; i++){ - offset += this->values[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - int8_t real; - uint8_t base; - } u_level; - u_level.base = 0; - u_level.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->level = u_level.real; - offset += sizeof(this->level); - uint32_t length_name; - arrToVar(length_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_name-1]=0; - this->name = (char *)(inbuffer + offset-1); - offset += length_name; - uint32_t length_message; - arrToVar(length_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_message-1]=0; - this->message = (char *)(inbuffer + offset-1); - offset += length_message; - uint32_t length_hardware_id; - arrToVar(length_hardware_id, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_hardware_id; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_hardware_id-1]=0; - this->hardware_id = (char *)(inbuffer + offset-1); - offset += length_hardware_id; - uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); - values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->values_length); - if(values_lengthT > values_length) - this->values = (diagnostic_msgs::KeyValue*)realloc(this->values, values_lengthT * sizeof(diagnostic_msgs::KeyValue)); - values_length = values_lengthT; - for( uint32_t i = 0; i < values_length; i++){ - offset += this->st_values.deserialize(inbuffer + offset); - memcpy( &(this->values[i]), &(this->st_values), sizeof(diagnostic_msgs::KeyValue)); - } - return offset; - } - - const char * getType(){ return "diagnostic_msgs/DiagnosticStatus"; }; - const char * getMD5(){ return "d0ce08bc6e5ba34c7754f563a9cabaf1"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/diagnostic_msgs/KeyValue.h b/arduino/ros_lib/diagnostic_msgs/KeyValue.h deleted file mode 100644 index e94dd76..0000000 --- a/arduino/ros_lib/diagnostic_msgs/KeyValue.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _ROS_diagnostic_msgs_KeyValue_h -#define _ROS_diagnostic_msgs_KeyValue_h - -#include -#include -#include -#include "ros/msg.h" - -namespace diagnostic_msgs -{ - - class KeyValue : public ros::Msg - { - public: - typedef const char* _key_type; - _key_type key; - typedef const char* _value_type; - _value_type value; - - KeyValue(): - key(""), - value("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_key = strlen(this->key); - varToArr(outbuffer + offset, length_key); - offset += 4; - memcpy(outbuffer + offset, this->key, length_key); - offset += length_key; - uint32_t length_value = strlen(this->value); - varToArr(outbuffer + offset, length_value); - offset += 4; - memcpy(outbuffer + offset, this->value, length_value); - offset += length_value; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_key; - arrToVar(length_key, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_key; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_key-1]=0; - this->key = (char *)(inbuffer + offset-1); - offset += length_key; - uint32_t length_value; - arrToVar(length_value, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_value; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_value-1]=0; - this->value = (char *)(inbuffer + offset-1); - offset += length_value; - return offset; - } - - const char * getType(){ return "diagnostic_msgs/KeyValue"; }; - const char * getMD5(){ return "cf57fdc6617a881a88c16e768132149c"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/diagnostic_msgs/SelfTest.h b/arduino/ros_lib/diagnostic_msgs/SelfTest.h deleted file mode 100644 index 6687c6b..0000000 --- a/arduino/ros_lib/diagnostic_msgs/SelfTest.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef _ROS_SERVICE_SelfTest_h -#define _ROS_SERVICE_SelfTest_h -#include -#include -#include -#include "ros/msg.h" -#include "diagnostic_msgs/DiagnosticStatus.h" - -namespace diagnostic_msgs -{ - -static const char SELFTEST[] = "diagnostic_msgs/SelfTest"; - - class SelfTestRequest : public ros::Msg - { - public: - - SelfTestRequest() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return SELFTEST; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class SelfTestResponse : public ros::Msg - { - public: - typedef const char* _id_type; - _id_type id; - typedef int8_t _passed_type; - _passed_type passed; - uint32_t status_length; - typedef diagnostic_msgs::DiagnosticStatus _status_type; - _status_type st_status; - _status_type * status; - - SelfTestResponse(): - id(""), - passed(0), - status_length(0), status(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_id = strlen(this->id); - varToArr(outbuffer + offset, length_id); - offset += 4; - memcpy(outbuffer + offset, this->id, length_id); - offset += length_id; - union { - int8_t real; - uint8_t base; - } u_passed; - u_passed.real = this->passed; - *(outbuffer + offset + 0) = (u_passed.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->passed); - *(outbuffer + offset + 0) = (this->status_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->status_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->status_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->status_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->status_length); - for( uint32_t i = 0; i < status_length; i++){ - offset += this->status[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_id; - arrToVar(length_id, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_id; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_id-1]=0; - this->id = (char *)(inbuffer + offset-1); - offset += length_id; - union { - int8_t real; - uint8_t base; - } u_passed; - u_passed.base = 0; - u_passed.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->passed = u_passed.real; - offset += sizeof(this->passed); - uint32_t status_lengthT = ((uint32_t) (*(inbuffer + offset))); - status_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - status_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - status_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->status_length); - if(status_lengthT > status_length) - this->status = (diagnostic_msgs::DiagnosticStatus*)realloc(this->status, status_lengthT * sizeof(diagnostic_msgs::DiagnosticStatus)); - status_length = status_lengthT; - for( uint32_t i = 0; i < status_length; i++){ - offset += this->st_status.deserialize(inbuffer + offset); - memcpy( &(this->status[i]), &(this->st_status), sizeof(diagnostic_msgs::DiagnosticStatus)); - } - return offset; - } - - const char * getType(){ return SELFTEST; }; - const char * getMD5(){ return "ac21b1bab7ab17546986536c22eb34e9"; }; - - }; - - class SelfTest { - public: - typedef SelfTestRequest Request; - typedef SelfTestResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/ApplyBodyWrench.h b/arduino/ros_lib/gazebo_msgs/ApplyBodyWrench.h deleted file mode 100644 index e7af6bb..0000000 --- a/arduino/ros_lib/gazebo_msgs/ApplyBodyWrench.h +++ /dev/null @@ -1,199 +0,0 @@ -#ifndef _ROS_SERVICE_ApplyBodyWrench_h -#define _ROS_SERVICE_ApplyBodyWrench_h -#include -#include -#include -#include "ros/msg.h" -#include "ros/duration.h" -#include "geometry_msgs/Wrench.h" -#include "ros/time.h" -#include "geometry_msgs/Point.h" - -namespace gazebo_msgs -{ - -static const char APPLYBODYWRENCH[] = "gazebo_msgs/ApplyBodyWrench"; - - class ApplyBodyWrenchRequest : public ros::Msg - { - public: - typedef const char* _body_name_type; - _body_name_type body_name; - typedef const char* _reference_frame_type; - _reference_frame_type reference_frame; - typedef geometry_msgs::Point _reference_point_type; - _reference_point_type reference_point; - typedef geometry_msgs::Wrench _wrench_type; - _wrench_type wrench; - typedef ros::Time _start_time_type; - _start_time_type start_time; - typedef ros::Duration _duration_type; - _duration_type duration; - - ApplyBodyWrenchRequest(): - body_name(""), - reference_frame(""), - reference_point(), - wrench(), - start_time(), - duration() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_body_name = strlen(this->body_name); - varToArr(outbuffer + offset, length_body_name); - offset += 4; - memcpy(outbuffer + offset, this->body_name, length_body_name); - offset += length_body_name; - uint32_t length_reference_frame = strlen(this->reference_frame); - varToArr(outbuffer + offset, length_reference_frame); - offset += 4; - memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); - offset += length_reference_frame; - offset += this->reference_point.serialize(outbuffer + offset); - offset += this->wrench.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->start_time.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->start_time.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->start_time.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->start_time.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->start_time.sec); - *(outbuffer + offset + 0) = (this->start_time.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->start_time.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->start_time.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->start_time.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->start_time.nsec); - *(outbuffer + offset + 0) = (this->duration.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->duration.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->duration.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->duration.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->duration.sec); - *(outbuffer + offset + 0) = (this->duration.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->duration.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->duration.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->duration.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->duration.nsec); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_body_name; - arrToVar(length_body_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_body_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_body_name-1]=0; - this->body_name = (char *)(inbuffer + offset-1); - offset += length_body_name; - uint32_t length_reference_frame; - arrToVar(length_reference_frame, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_reference_frame-1]=0; - this->reference_frame = (char *)(inbuffer + offset-1); - offset += length_reference_frame; - offset += this->reference_point.deserialize(inbuffer + offset); - offset += this->wrench.deserialize(inbuffer + offset); - this->start_time.sec = ((uint32_t) (*(inbuffer + offset))); - this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->start_time.sec); - this->start_time.nsec = ((uint32_t) (*(inbuffer + offset))); - this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->start_time.nsec); - this->duration.sec = ((uint32_t) (*(inbuffer + offset))); - this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->duration.sec); - this->duration.nsec = ((uint32_t) (*(inbuffer + offset))); - this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->duration.nsec); - return offset; - } - - const char * getType(){ return APPLYBODYWRENCH; }; - const char * getMD5(){ return "e37e6adf97eba5095baa77dffb71e5bd"; }; - - }; - - class ApplyBodyWrenchResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - ApplyBodyWrenchResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return APPLYBODYWRENCH; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class ApplyBodyWrench { - public: - typedef ApplyBodyWrenchRequest Request; - typedef ApplyBodyWrenchResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/ApplyJointEffort.h b/arduino/ros_lib/gazebo_msgs/ApplyJointEffort.h deleted file mode 100644 index 38eb332..0000000 --- a/arduino/ros_lib/gazebo_msgs/ApplyJointEffort.h +++ /dev/null @@ -1,175 +0,0 @@ -#ifndef _ROS_SERVICE_ApplyJointEffort_h -#define _ROS_SERVICE_ApplyJointEffort_h -#include -#include -#include -#include "ros/msg.h" -#include "ros/duration.h" -#include "ros/time.h" - -namespace gazebo_msgs -{ - -static const char APPLYJOINTEFFORT[] = "gazebo_msgs/ApplyJointEffort"; - - class ApplyJointEffortRequest : public ros::Msg - { - public: - typedef const char* _joint_name_type; - _joint_name_type joint_name; - typedef float _effort_type; - _effort_type effort; - typedef ros::Time _start_time_type; - _start_time_type start_time; - typedef ros::Duration _duration_type; - _duration_type duration; - - ApplyJointEffortRequest(): - joint_name(""), - effort(0), - start_time(), - duration() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_joint_name = strlen(this->joint_name); - varToArr(outbuffer + offset, length_joint_name); - offset += 4; - memcpy(outbuffer + offset, this->joint_name, length_joint_name); - offset += length_joint_name; - offset += serializeAvrFloat64(outbuffer + offset, this->effort); - *(outbuffer + offset + 0) = (this->start_time.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->start_time.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->start_time.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->start_time.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->start_time.sec); - *(outbuffer + offset + 0) = (this->start_time.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->start_time.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->start_time.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->start_time.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->start_time.nsec); - *(outbuffer + offset + 0) = (this->duration.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->duration.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->duration.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->duration.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->duration.sec); - *(outbuffer + offset + 0) = (this->duration.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->duration.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->duration.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->duration.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->duration.nsec); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_joint_name; - arrToVar(length_joint_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_joint_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_joint_name-1]=0; - this->joint_name = (char *)(inbuffer + offset-1); - offset += length_joint_name; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->effort)); - this->start_time.sec = ((uint32_t) (*(inbuffer + offset))); - this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->start_time.sec); - this->start_time.nsec = ((uint32_t) (*(inbuffer + offset))); - this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->start_time.nsec); - this->duration.sec = ((uint32_t) (*(inbuffer + offset))); - this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->duration.sec); - this->duration.nsec = ((uint32_t) (*(inbuffer + offset))); - this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->duration.nsec); - return offset; - } - - const char * getType(){ return APPLYJOINTEFFORT; }; - const char * getMD5(){ return "2c3396ab9af67a509ecd2167a8fe41a2"; }; - - }; - - class ApplyJointEffortResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - ApplyJointEffortResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return APPLYJOINTEFFORT; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class ApplyJointEffort { - public: - typedef ApplyJointEffortRequest Request; - typedef ApplyJointEffortResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/BodyRequest.h b/arduino/ros_lib/gazebo_msgs/BodyRequest.h deleted file mode 100644 index bb2106d..0000000 --- a/arduino/ros_lib/gazebo_msgs/BodyRequest.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef _ROS_SERVICE_BodyRequest_h -#define _ROS_SERVICE_BodyRequest_h -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - -static const char BODYREQUEST[] = "gazebo_msgs/BodyRequest"; - - class BodyRequestRequest : public ros::Msg - { - public: - typedef const char* _body_name_type; - _body_name_type body_name; - - BodyRequestRequest(): - body_name("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_body_name = strlen(this->body_name); - varToArr(outbuffer + offset, length_body_name); - offset += 4; - memcpy(outbuffer + offset, this->body_name, length_body_name); - offset += length_body_name; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_body_name; - arrToVar(length_body_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_body_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_body_name-1]=0; - this->body_name = (char *)(inbuffer + offset-1); - offset += length_body_name; - return offset; - } - - const char * getType(){ return BODYREQUEST; }; - const char * getMD5(){ return "5eade9afe7f232d78005bd0cafeab755"; }; - - }; - - class BodyRequestResponse : public ros::Msg - { - public: - - BodyRequestResponse() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return BODYREQUEST; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class BodyRequest { - public: - typedef BodyRequestRequest Request; - typedef BodyRequestResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/ContactState.h b/arduino/ros_lib/gazebo_msgs/ContactState.h deleted file mode 100644 index 300f211..0000000 --- a/arduino/ros_lib/gazebo_msgs/ContactState.h +++ /dev/null @@ -1,196 +0,0 @@ -#ifndef _ROS_gazebo_msgs_ContactState_h -#define _ROS_gazebo_msgs_ContactState_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Wrench.h" -#include "geometry_msgs/Vector3.h" - -namespace gazebo_msgs -{ - - class ContactState : public ros::Msg - { - public: - typedef const char* _info_type; - _info_type info; - typedef const char* _collision1_name_type; - _collision1_name_type collision1_name; - typedef const char* _collision2_name_type; - _collision2_name_type collision2_name; - uint32_t wrenches_length; - typedef geometry_msgs::Wrench _wrenches_type; - _wrenches_type st_wrenches; - _wrenches_type * wrenches; - typedef geometry_msgs::Wrench _total_wrench_type; - _total_wrench_type total_wrench; - uint32_t contact_positions_length; - typedef geometry_msgs::Vector3 _contact_positions_type; - _contact_positions_type st_contact_positions; - _contact_positions_type * contact_positions; - uint32_t contact_normals_length; - typedef geometry_msgs::Vector3 _contact_normals_type; - _contact_normals_type st_contact_normals; - _contact_normals_type * contact_normals; - uint32_t depths_length; - typedef float _depths_type; - _depths_type st_depths; - _depths_type * depths; - - ContactState(): - info(""), - collision1_name(""), - collision2_name(""), - wrenches_length(0), wrenches(NULL), - total_wrench(), - contact_positions_length(0), contact_positions(NULL), - contact_normals_length(0), contact_normals(NULL), - depths_length(0), depths(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_info = strlen(this->info); - varToArr(outbuffer + offset, length_info); - offset += 4; - memcpy(outbuffer + offset, this->info, length_info); - offset += length_info; - uint32_t length_collision1_name = strlen(this->collision1_name); - varToArr(outbuffer + offset, length_collision1_name); - offset += 4; - memcpy(outbuffer + offset, this->collision1_name, length_collision1_name); - offset += length_collision1_name; - uint32_t length_collision2_name = strlen(this->collision2_name); - varToArr(outbuffer + offset, length_collision2_name); - offset += 4; - memcpy(outbuffer + offset, this->collision2_name, length_collision2_name); - offset += length_collision2_name; - *(outbuffer + offset + 0) = (this->wrenches_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->wrenches_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->wrenches_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->wrenches_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->wrenches_length); - for( uint32_t i = 0; i < wrenches_length; i++){ - offset += this->wrenches[i].serialize(outbuffer + offset); - } - offset += this->total_wrench.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->contact_positions_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->contact_positions_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->contact_positions_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->contact_positions_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->contact_positions_length); - for( uint32_t i = 0; i < contact_positions_length; i++){ - offset += this->contact_positions[i].serialize(outbuffer + offset); - } - *(outbuffer + offset + 0) = (this->contact_normals_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->contact_normals_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->contact_normals_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->contact_normals_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->contact_normals_length); - for( uint32_t i = 0; i < contact_normals_length; i++){ - offset += this->contact_normals[i].serialize(outbuffer + offset); - } - *(outbuffer + offset + 0) = (this->depths_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->depths_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->depths_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->depths_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->depths_length); - for( uint32_t i = 0; i < depths_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->depths[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_info; - arrToVar(length_info, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_info; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_info-1]=0; - this->info = (char *)(inbuffer + offset-1); - offset += length_info; - uint32_t length_collision1_name; - arrToVar(length_collision1_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_collision1_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_collision1_name-1]=0; - this->collision1_name = (char *)(inbuffer + offset-1); - offset += length_collision1_name; - uint32_t length_collision2_name; - arrToVar(length_collision2_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_collision2_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_collision2_name-1]=0; - this->collision2_name = (char *)(inbuffer + offset-1); - offset += length_collision2_name; - uint32_t wrenches_lengthT = ((uint32_t) (*(inbuffer + offset))); - wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->wrenches_length); - if(wrenches_lengthT > wrenches_length) - this->wrenches = (geometry_msgs::Wrench*)realloc(this->wrenches, wrenches_lengthT * sizeof(geometry_msgs::Wrench)); - wrenches_length = wrenches_lengthT; - for( uint32_t i = 0; i < wrenches_length; i++){ - offset += this->st_wrenches.deserialize(inbuffer + offset); - memcpy( &(this->wrenches[i]), &(this->st_wrenches), sizeof(geometry_msgs::Wrench)); - } - offset += this->total_wrench.deserialize(inbuffer + offset); - uint32_t contact_positions_lengthT = ((uint32_t) (*(inbuffer + offset))); - contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->contact_positions_length); - if(contact_positions_lengthT > contact_positions_length) - this->contact_positions = (geometry_msgs::Vector3*)realloc(this->contact_positions, contact_positions_lengthT * sizeof(geometry_msgs::Vector3)); - contact_positions_length = contact_positions_lengthT; - for( uint32_t i = 0; i < contact_positions_length; i++){ - offset += this->st_contact_positions.deserialize(inbuffer + offset); - memcpy( &(this->contact_positions[i]), &(this->st_contact_positions), sizeof(geometry_msgs::Vector3)); - } - uint32_t contact_normals_lengthT = ((uint32_t) (*(inbuffer + offset))); - contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->contact_normals_length); - if(contact_normals_lengthT > contact_normals_length) - this->contact_normals = (geometry_msgs::Vector3*)realloc(this->contact_normals, contact_normals_lengthT * sizeof(geometry_msgs::Vector3)); - contact_normals_length = contact_normals_lengthT; - for( uint32_t i = 0; i < contact_normals_length; i++){ - offset += this->st_contact_normals.deserialize(inbuffer + offset); - memcpy( &(this->contact_normals[i]), &(this->st_contact_normals), sizeof(geometry_msgs::Vector3)); - } - uint32_t depths_lengthT = ((uint32_t) (*(inbuffer + offset))); - depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->depths_length); - if(depths_lengthT > depths_length) - this->depths = (float*)realloc(this->depths, depths_lengthT * sizeof(float)); - depths_length = depths_lengthT; - for( uint32_t i = 0; i < depths_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_depths)); - memcpy( &(this->depths[i]), &(this->st_depths), sizeof(float)); - } - return offset; - } - - const char * getType(){ return "gazebo_msgs/ContactState"; }; - const char * getMD5(){ return "48c0ffb054b8c444f870cecea1ee50d9"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/gazebo_msgs/ContactsState.h b/arduino/ros_lib/gazebo_msgs/ContactsState.h deleted file mode 100644 index 9af62c0..0000000 --- a/arduino/ros_lib/gazebo_msgs/ContactsState.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _ROS_gazebo_msgs_ContactsState_h -#define _ROS_gazebo_msgs_ContactsState_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "gazebo_msgs/ContactState.h" - -namespace gazebo_msgs -{ - - class ContactsState : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t states_length; - typedef gazebo_msgs::ContactState _states_type; - _states_type st_states; - _states_type * states; - - ContactsState(): - header(), - states_length(0), states(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->states_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->states_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->states_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->states_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->states_length); - for( uint32_t i = 0; i < states_length; i++){ - offset += this->states[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t states_lengthT = ((uint32_t) (*(inbuffer + offset))); - states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->states_length); - if(states_lengthT > states_length) - this->states = (gazebo_msgs::ContactState*)realloc(this->states, states_lengthT * sizeof(gazebo_msgs::ContactState)); - states_length = states_lengthT; - for( uint32_t i = 0; i < states_length; i++){ - offset += this->st_states.deserialize(inbuffer + offset); - memcpy( &(this->states[i]), &(this->st_states), sizeof(gazebo_msgs::ContactState)); - } - return offset; - } - - const char * getType(){ return "gazebo_msgs/ContactsState"; }; - const char * getMD5(){ return "acbcb1601a8e525bf72509f18e6f668d"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/gazebo_msgs/DeleteLight.h b/arduino/ros_lib/gazebo_msgs/DeleteLight.h deleted file mode 100644 index 54a9c5d..0000000 --- a/arduino/ros_lib/gazebo_msgs/DeleteLight.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef _ROS_SERVICE_DeleteLight_h -#define _ROS_SERVICE_DeleteLight_h -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - -static const char DELETELIGHT[] = "gazebo_msgs/DeleteLight"; - - class DeleteLightRequest : public ros::Msg - { - public: - typedef const char* _light_name_type; - _light_name_type light_name; - - DeleteLightRequest(): - light_name("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_light_name = strlen(this->light_name); - varToArr(outbuffer + offset, length_light_name); - offset += 4; - memcpy(outbuffer + offset, this->light_name, length_light_name); - offset += length_light_name; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_light_name; - arrToVar(length_light_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_light_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_light_name-1]=0; - this->light_name = (char *)(inbuffer + offset-1); - offset += length_light_name; - return offset; - } - - const char * getType(){ return DELETELIGHT; }; - const char * getMD5(){ return "4fb676dfb4741fc866365702a859441c"; }; - - }; - - class DeleteLightResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - DeleteLightResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return DELETELIGHT; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class DeleteLight { - public: - typedef DeleteLightRequest Request; - typedef DeleteLightResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/DeleteModel.h b/arduino/ros_lib/gazebo_msgs/DeleteModel.h deleted file mode 100644 index 00da12d..0000000 --- a/arduino/ros_lib/gazebo_msgs/DeleteModel.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef _ROS_SERVICE_DeleteModel_h -#define _ROS_SERVICE_DeleteModel_h -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - -static const char DELETEMODEL[] = "gazebo_msgs/DeleteModel"; - - class DeleteModelRequest : public ros::Msg - { - public: - typedef const char* _model_name_type; - _model_name_type model_name; - - DeleteModelRequest(): - model_name("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_model_name = strlen(this->model_name); - varToArr(outbuffer + offset, length_model_name); - offset += 4; - memcpy(outbuffer + offset, this->model_name, length_model_name); - offset += length_model_name; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_model_name; - arrToVar(length_model_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_model_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_model_name-1]=0; - this->model_name = (char *)(inbuffer + offset-1); - offset += length_model_name; - return offset; - } - - const char * getType(){ return DELETEMODEL; }; - const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; - - }; - - class DeleteModelResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - DeleteModelResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return DELETEMODEL; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class DeleteModel { - public: - typedef DeleteModelRequest Request; - typedef DeleteModelResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/GetJointProperties.h b/arduino/ros_lib/gazebo_msgs/GetJointProperties.h deleted file mode 100644 index 10c386b..0000000 --- a/arduino/ros_lib/gazebo_msgs/GetJointProperties.h +++ /dev/null @@ -1,210 +0,0 @@ -#ifndef _ROS_SERVICE_GetJointProperties_h -#define _ROS_SERVICE_GetJointProperties_h -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - -static const char GETJOINTPROPERTIES[] = "gazebo_msgs/GetJointProperties"; - - class GetJointPropertiesRequest : public ros::Msg - { - public: - typedef const char* _joint_name_type; - _joint_name_type joint_name; - - GetJointPropertiesRequest(): - joint_name("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_joint_name = strlen(this->joint_name); - varToArr(outbuffer + offset, length_joint_name); - offset += 4; - memcpy(outbuffer + offset, this->joint_name, length_joint_name); - offset += length_joint_name; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_joint_name; - arrToVar(length_joint_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_joint_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_joint_name-1]=0; - this->joint_name = (char *)(inbuffer + offset-1); - offset += length_joint_name; - return offset; - } - - const char * getType(){ return GETJOINTPROPERTIES; }; - const char * getMD5(){ return "0be1351618e1dc030eb7959d9a4902de"; }; - - }; - - class GetJointPropertiesResponse : public ros::Msg - { - public: - typedef uint8_t _type_type; - _type_type type; - uint32_t damping_length; - typedef float _damping_type; - _damping_type st_damping; - _damping_type * damping; - uint32_t position_length; - typedef float _position_type; - _position_type st_position; - _position_type * position; - uint32_t rate_length; - typedef float _rate_type; - _rate_type st_rate; - _rate_type * rate; - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - enum { REVOLUTE = 0 }; - enum { CONTINUOUS = 1 }; - enum { PRISMATIC = 2 }; - enum { FIXED = 3 }; - enum { BALL = 4 }; - enum { UNIVERSAL = 5 }; - - GetJointPropertiesResponse(): - type(0), - damping_length(0), damping(NULL), - position_length(0), position(NULL), - rate_length(0), rate(NULL), - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; - offset += sizeof(this->type); - *(outbuffer + offset + 0) = (this->damping_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->damping_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->damping_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->damping_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->damping_length); - for( uint32_t i = 0; i < damping_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->damping[i]); - } - *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->position_length); - for( uint32_t i = 0; i < position_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->position[i]); - } - *(outbuffer + offset + 0) = (this->rate_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->rate_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->rate_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->rate_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->rate_length); - for( uint32_t i = 0; i < rate_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->rate[i]); - } - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - this->type = ((uint8_t) (*(inbuffer + offset))); - offset += sizeof(this->type); - uint32_t damping_lengthT = ((uint32_t) (*(inbuffer + offset))); - damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->damping_length); - if(damping_lengthT > damping_length) - this->damping = (float*)realloc(this->damping, damping_lengthT * sizeof(float)); - damping_length = damping_lengthT; - for( uint32_t i = 0; i < damping_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_damping)); - memcpy( &(this->damping[i]), &(this->st_damping), sizeof(float)); - } - uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); - position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->position_length); - if(position_lengthT > position_length) - this->position = (float*)realloc(this->position, position_lengthT * sizeof(float)); - position_length = position_lengthT; - for( uint32_t i = 0; i < position_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_position)); - memcpy( &(this->position[i]), &(this->st_position), sizeof(float)); - } - uint32_t rate_lengthT = ((uint32_t) (*(inbuffer + offset))); - rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->rate_length); - if(rate_lengthT > rate_length) - this->rate = (float*)realloc(this->rate, rate_lengthT * sizeof(float)); - rate_length = rate_lengthT; - for( uint32_t i = 0; i < rate_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_rate)); - memcpy( &(this->rate[i]), &(this->st_rate), sizeof(float)); - } - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return GETJOINTPROPERTIES; }; - const char * getMD5(){ return "cd7b30a39faa372283dc94c5f6457f82"; }; - - }; - - class GetJointProperties { - public: - typedef GetJointPropertiesRequest Request; - typedef GetJointPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/GetLightProperties.h b/arduino/ros_lib/gazebo_msgs/GetLightProperties.h deleted file mode 100644 index 94442fc..0000000 --- a/arduino/ros_lib/gazebo_msgs/GetLightProperties.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef _ROS_SERVICE_GetLightProperties_h -#define _ROS_SERVICE_GetLightProperties_h -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/ColorRGBA.h" - -namespace gazebo_msgs -{ - -static const char GETLIGHTPROPERTIES[] = "gazebo_msgs/GetLightProperties"; - - class GetLightPropertiesRequest : public ros::Msg - { - public: - typedef const char* _light_name_type; - _light_name_type light_name; - - GetLightPropertiesRequest(): - light_name("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_light_name = strlen(this->light_name); - varToArr(outbuffer + offset, length_light_name); - offset += 4; - memcpy(outbuffer + offset, this->light_name, length_light_name); - offset += length_light_name; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_light_name; - arrToVar(length_light_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_light_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_light_name-1]=0; - this->light_name = (char *)(inbuffer + offset-1); - offset += length_light_name; - return offset; - } - - const char * getType(){ return GETLIGHTPROPERTIES; }; - const char * getMD5(){ return "4fb676dfb4741fc866365702a859441c"; }; - - }; - - class GetLightPropertiesResponse : public ros::Msg - { - public: - typedef std_msgs::ColorRGBA _diffuse_type; - _diffuse_type diffuse; - typedef float _attenuation_constant_type; - _attenuation_constant_type attenuation_constant; - typedef float _attenuation_linear_type; - _attenuation_linear_type attenuation_linear; - typedef float _attenuation_quadratic_type; - _attenuation_quadratic_type attenuation_quadratic; - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - GetLightPropertiesResponse(): - diffuse(), - attenuation_constant(0), - attenuation_linear(0), - attenuation_quadratic(0), - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->diffuse.serialize(outbuffer + offset); - offset += serializeAvrFloat64(outbuffer + offset, this->attenuation_constant); - offset += serializeAvrFloat64(outbuffer + offset, this->attenuation_linear); - offset += serializeAvrFloat64(outbuffer + offset, this->attenuation_quadratic); - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->diffuse.deserialize(inbuffer + offset); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->attenuation_constant)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->attenuation_linear)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->attenuation_quadratic)); - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return GETLIGHTPROPERTIES; }; - const char * getMD5(){ return "9a19ddd5aab4c13b7643d1722c709f1f"; }; - - }; - - class GetLightProperties { - public: - typedef GetLightPropertiesRequest Request; - typedef GetLightPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/GetLinkProperties.h b/arduino/ros_lib/gazebo_msgs/GetLinkProperties.h deleted file mode 100644 index 0d2bc43..0000000 --- a/arduino/ros_lib/gazebo_msgs/GetLinkProperties.h +++ /dev/null @@ -1,181 +0,0 @@ -#ifndef _ROS_SERVICE_GetLinkProperties_h -#define _ROS_SERVICE_GetLinkProperties_h -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Pose.h" - -namespace gazebo_msgs -{ - -static const char GETLINKPROPERTIES[] = "gazebo_msgs/GetLinkProperties"; - - class GetLinkPropertiesRequest : public ros::Msg - { - public: - typedef const char* _link_name_type; - _link_name_type link_name; - - GetLinkPropertiesRequest(): - link_name("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_link_name = strlen(this->link_name); - varToArr(outbuffer + offset, length_link_name); - offset += 4; - memcpy(outbuffer + offset, this->link_name, length_link_name); - offset += length_link_name; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_link_name; - arrToVar(length_link_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_link_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_link_name-1]=0; - this->link_name = (char *)(inbuffer + offset-1); - offset += length_link_name; - return offset; - } - - const char * getType(){ return GETLINKPROPERTIES; }; - const char * getMD5(){ return "7d82d60381f1b66a30f2157f60884345"; }; - - }; - - class GetLinkPropertiesResponse : public ros::Msg - { - public: - typedef geometry_msgs::Pose _com_type; - _com_type com; - typedef bool _gravity_mode_type; - _gravity_mode_type gravity_mode; - typedef float _mass_type; - _mass_type mass; - typedef float _ixx_type; - _ixx_type ixx; - typedef float _ixy_type; - _ixy_type ixy; - typedef float _ixz_type; - _ixz_type ixz; - typedef float _iyy_type; - _iyy_type iyy; - typedef float _iyz_type; - _iyz_type iyz; - typedef float _izz_type; - _izz_type izz; - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - GetLinkPropertiesResponse(): - com(), - gravity_mode(0), - mass(0), - ixx(0), - ixy(0), - ixz(0), - iyy(0), - iyz(0), - izz(0), - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->com.serialize(outbuffer + offset); - union { - bool real; - uint8_t base; - } u_gravity_mode; - u_gravity_mode.real = this->gravity_mode; - *(outbuffer + offset + 0) = (u_gravity_mode.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->gravity_mode); - offset += serializeAvrFloat64(outbuffer + offset, this->mass); - offset += serializeAvrFloat64(outbuffer + offset, this->ixx); - offset += serializeAvrFloat64(outbuffer + offset, this->ixy); - offset += serializeAvrFloat64(outbuffer + offset, this->ixz); - offset += serializeAvrFloat64(outbuffer + offset, this->iyy); - offset += serializeAvrFloat64(outbuffer + offset, this->iyz); - offset += serializeAvrFloat64(outbuffer + offset, this->izz); - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->com.deserialize(inbuffer + offset); - union { - bool real; - uint8_t base; - } u_gravity_mode; - u_gravity_mode.base = 0; - u_gravity_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->gravity_mode = u_gravity_mode.real; - offset += sizeof(this->gravity_mode); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->mass)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->ixx)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->ixy)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->ixz)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->iyy)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->iyz)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->izz)); - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return GETLINKPROPERTIES; }; - const char * getMD5(){ return "a8619f92d17cfcc3958c0fd13299443d"; }; - - }; - - class GetLinkProperties { - public: - typedef GetLinkPropertiesRequest Request; - typedef GetLinkPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/GetLinkState.h b/arduino/ros_lib/gazebo_msgs/GetLinkState.h deleted file mode 100644 index 5e20764..0000000 --- a/arduino/ros_lib/gazebo_msgs/GetLinkState.h +++ /dev/null @@ -1,145 +0,0 @@ -#ifndef _ROS_SERVICE_GetLinkState_h -#define _ROS_SERVICE_GetLinkState_h -#include -#include -#include -#include "ros/msg.h" -#include "gazebo_msgs/LinkState.h" - -namespace gazebo_msgs -{ - -static const char GETLINKSTATE[] = "gazebo_msgs/GetLinkState"; - - class GetLinkStateRequest : public ros::Msg - { - public: - typedef const char* _link_name_type; - _link_name_type link_name; - typedef const char* _reference_frame_type; - _reference_frame_type reference_frame; - - GetLinkStateRequest(): - link_name(""), - reference_frame("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_link_name = strlen(this->link_name); - varToArr(outbuffer + offset, length_link_name); - offset += 4; - memcpy(outbuffer + offset, this->link_name, length_link_name); - offset += length_link_name; - uint32_t length_reference_frame = strlen(this->reference_frame); - varToArr(outbuffer + offset, length_reference_frame); - offset += 4; - memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); - offset += length_reference_frame; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_link_name; - arrToVar(length_link_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_link_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_link_name-1]=0; - this->link_name = (char *)(inbuffer + offset-1); - offset += length_link_name; - uint32_t length_reference_frame; - arrToVar(length_reference_frame, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_reference_frame-1]=0; - this->reference_frame = (char *)(inbuffer + offset-1); - offset += length_reference_frame; - return offset; - } - - const char * getType(){ return GETLINKSTATE; }; - const char * getMD5(){ return "7551675c30aaa71f7c288d4864552001"; }; - - }; - - class GetLinkStateResponse : public ros::Msg - { - public: - typedef gazebo_msgs::LinkState _link_state_type; - _link_state_type link_state; - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - GetLinkStateResponse(): - link_state(), - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->link_state.serialize(outbuffer + offset); - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->link_state.deserialize(inbuffer + offset); - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return GETLINKSTATE; }; - const char * getMD5(){ return "8ba55ad34f9c072e75c0de57b089753b"; }; - - }; - - class GetLinkState { - public: - typedef GetLinkStateRequest Request; - typedef GetLinkStateResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/GetModelProperties.h b/arduino/ros_lib/gazebo_msgs/GetModelProperties.h deleted file mode 100644 index 082e688..0000000 --- a/arduino/ros_lib/gazebo_msgs/GetModelProperties.h +++ /dev/null @@ -1,322 +0,0 @@ -#ifndef _ROS_SERVICE_GetModelProperties_h -#define _ROS_SERVICE_GetModelProperties_h -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - -static const char GETMODELPROPERTIES[] = "gazebo_msgs/GetModelProperties"; - - class GetModelPropertiesRequest : public ros::Msg - { - public: - typedef const char* _model_name_type; - _model_name_type model_name; - - GetModelPropertiesRequest(): - model_name("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_model_name = strlen(this->model_name); - varToArr(outbuffer + offset, length_model_name); - offset += 4; - memcpy(outbuffer + offset, this->model_name, length_model_name); - offset += length_model_name; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_model_name; - arrToVar(length_model_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_model_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_model_name-1]=0; - this->model_name = (char *)(inbuffer + offset-1); - offset += length_model_name; - return offset; - } - - const char * getType(){ return GETMODELPROPERTIES; }; - const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; - - }; - - class GetModelPropertiesResponse : public ros::Msg - { - public: - typedef const char* _parent_model_name_type; - _parent_model_name_type parent_model_name; - typedef const char* _canonical_body_name_type; - _canonical_body_name_type canonical_body_name; - uint32_t body_names_length; - typedef char* _body_names_type; - _body_names_type st_body_names; - _body_names_type * body_names; - uint32_t geom_names_length; - typedef char* _geom_names_type; - _geom_names_type st_geom_names; - _geom_names_type * geom_names; - uint32_t joint_names_length; - typedef char* _joint_names_type; - _joint_names_type st_joint_names; - _joint_names_type * joint_names; - uint32_t child_model_names_length; - typedef char* _child_model_names_type; - _child_model_names_type st_child_model_names; - _child_model_names_type * child_model_names; - typedef bool _is_static_type; - _is_static_type is_static; - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - GetModelPropertiesResponse(): - parent_model_name(""), - canonical_body_name(""), - body_names_length(0), body_names(NULL), - geom_names_length(0), geom_names(NULL), - joint_names_length(0), joint_names(NULL), - child_model_names_length(0), child_model_names(NULL), - is_static(0), - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_parent_model_name = strlen(this->parent_model_name); - varToArr(outbuffer + offset, length_parent_model_name); - offset += 4; - memcpy(outbuffer + offset, this->parent_model_name, length_parent_model_name); - offset += length_parent_model_name; - uint32_t length_canonical_body_name = strlen(this->canonical_body_name); - varToArr(outbuffer + offset, length_canonical_body_name); - offset += 4; - memcpy(outbuffer + offset, this->canonical_body_name, length_canonical_body_name); - offset += length_canonical_body_name; - *(outbuffer + offset + 0) = (this->body_names_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->body_names_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->body_names_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->body_names_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->body_names_length); - for( uint32_t i = 0; i < body_names_length; i++){ - uint32_t length_body_namesi = strlen(this->body_names[i]); - varToArr(outbuffer + offset, length_body_namesi); - offset += 4; - memcpy(outbuffer + offset, this->body_names[i], length_body_namesi); - offset += length_body_namesi; - } - *(outbuffer + offset + 0) = (this->geom_names_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->geom_names_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->geom_names_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->geom_names_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->geom_names_length); - for( uint32_t i = 0; i < geom_names_length; i++){ - uint32_t length_geom_namesi = strlen(this->geom_names[i]); - varToArr(outbuffer + offset, length_geom_namesi); - offset += 4; - memcpy(outbuffer + offset, this->geom_names[i], length_geom_namesi); - offset += length_geom_namesi; - } - *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->joint_names_length); - for( uint32_t i = 0; i < joint_names_length; i++){ - uint32_t length_joint_namesi = strlen(this->joint_names[i]); - varToArr(outbuffer + offset, length_joint_namesi); - offset += 4; - memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); - offset += length_joint_namesi; - } - *(outbuffer + offset + 0) = (this->child_model_names_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->child_model_names_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->child_model_names_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->child_model_names_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->child_model_names_length); - for( uint32_t i = 0; i < child_model_names_length; i++){ - uint32_t length_child_model_namesi = strlen(this->child_model_names[i]); - varToArr(outbuffer + offset, length_child_model_namesi); - offset += 4; - memcpy(outbuffer + offset, this->child_model_names[i], length_child_model_namesi); - offset += length_child_model_namesi; - } - union { - bool real; - uint8_t base; - } u_is_static; - u_is_static.real = this->is_static; - *(outbuffer + offset + 0) = (u_is_static.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->is_static); - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_parent_model_name; - arrToVar(length_parent_model_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_parent_model_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_parent_model_name-1]=0; - this->parent_model_name = (char *)(inbuffer + offset-1); - offset += length_parent_model_name; - uint32_t length_canonical_body_name; - arrToVar(length_canonical_body_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_canonical_body_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_canonical_body_name-1]=0; - this->canonical_body_name = (char *)(inbuffer + offset-1); - offset += length_canonical_body_name; - uint32_t body_names_lengthT = ((uint32_t) (*(inbuffer + offset))); - body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->body_names_length); - if(body_names_lengthT > body_names_length) - this->body_names = (char**)realloc(this->body_names, body_names_lengthT * sizeof(char*)); - body_names_length = body_names_lengthT; - for( uint32_t i = 0; i < body_names_length; i++){ - uint32_t length_st_body_names; - arrToVar(length_st_body_names, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_body_names; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_body_names-1]=0; - this->st_body_names = (char *)(inbuffer + offset-1); - offset += length_st_body_names; - memcpy( &(this->body_names[i]), &(this->st_body_names), sizeof(char*)); - } - uint32_t geom_names_lengthT = ((uint32_t) (*(inbuffer + offset))); - geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->geom_names_length); - if(geom_names_lengthT > geom_names_length) - this->geom_names = (char**)realloc(this->geom_names, geom_names_lengthT * sizeof(char*)); - geom_names_length = geom_names_lengthT; - for( uint32_t i = 0; i < geom_names_length; i++){ - uint32_t length_st_geom_names; - arrToVar(length_st_geom_names, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_geom_names; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_geom_names-1]=0; - this->st_geom_names = (char *)(inbuffer + offset-1); - offset += length_st_geom_names; - memcpy( &(this->geom_names[i]), &(this->st_geom_names), sizeof(char*)); - } - uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->joint_names_length); - if(joint_names_lengthT > joint_names_length) - this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); - joint_names_length = joint_names_lengthT; - for( uint32_t i = 0; i < joint_names_length; i++){ - uint32_t length_st_joint_names; - arrToVar(length_st_joint_names, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_joint_names-1]=0; - this->st_joint_names = (char *)(inbuffer + offset-1); - offset += length_st_joint_names; - memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); - } - uint32_t child_model_names_lengthT = ((uint32_t) (*(inbuffer + offset))); - child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->child_model_names_length); - if(child_model_names_lengthT > child_model_names_length) - this->child_model_names = (char**)realloc(this->child_model_names, child_model_names_lengthT * sizeof(char*)); - child_model_names_length = child_model_names_lengthT; - for( uint32_t i = 0; i < child_model_names_length; i++){ - uint32_t length_st_child_model_names; - arrToVar(length_st_child_model_names, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_child_model_names; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_child_model_names-1]=0; - this->st_child_model_names = (char *)(inbuffer + offset-1); - offset += length_st_child_model_names; - memcpy( &(this->child_model_names[i]), &(this->st_child_model_names), sizeof(char*)); - } - union { - bool real; - uint8_t base; - } u_is_static; - u_is_static.base = 0; - u_is_static.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->is_static = u_is_static.real; - offset += sizeof(this->is_static); - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return GETMODELPROPERTIES; }; - const char * getMD5(){ return "b7f370938ef77b464b95f1bab3ec5028"; }; - - }; - - class GetModelProperties { - public: - typedef GetModelPropertiesRequest Request; - typedef GetModelPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/GetModelState.h b/arduino/ros_lib/gazebo_msgs/GetModelState.h deleted file mode 100644 index 0dbcc81..0000000 --- a/arduino/ros_lib/gazebo_msgs/GetModelState.h +++ /dev/null @@ -1,157 +0,0 @@ -#ifndef _ROS_SERVICE_GetModelState_h -#define _ROS_SERVICE_GetModelState_h -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Pose.h" -#include "geometry_msgs/Twist.h" -#include "std_msgs/Header.h" - -namespace gazebo_msgs -{ - -static const char GETMODELSTATE[] = "gazebo_msgs/GetModelState"; - - class GetModelStateRequest : public ros::Msg - { - public: - typedef const char* _model_name_type; - _model_name_type model_name; - typedef const char* _relative_entity_name_type; - _relative_entity_name_type relative_entity_name; - - GetModelStateRequest(): - model_name(""), - relative_entity_name("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_model_name = strlen(this->model_name); - varToArr(outbuffer + offset, length_model_name); - offset += 4; - memcpy(outbuffer + offset, this->model_name, length_model_name); - offset += length_model_name; - uint32_t length_relative_entity_name = strlen(this->relative_entity_name); - varToArr(outbuffer + offset, length_relative_entity_name); - offset += 4; - memcpy(outbuffer + offset, this->relative_entity_name, length_relative_entity_name); - offset += length_relative_entity_name; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_model_name; - arrToVar(length_model_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_model_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_model_name-1]=0; - this->model_name = (char *)(inbuffer + offset-1); - offset += length_model_name; - uint32_t length_relative_entity_name; - arrToVar(length_relative_entity_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_relative_entity_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_relative_entity_name-1]=0; - this->relative_entity_name = (char *)(inbuffer + offset-1); - offset += length_relative_entity_name; - return offset; - } - - const char * getType(){ return GETMODELSTATE; }; - const char * getMD5(){ return "19d412713cefe4a67437e17a951e759e"; }; - - }; - - class GetModelStateResponse : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Pose _pose_type; - _pose_type pose; - typedef geometry_msgs::Twist _twist_type; - _twist_type twist; - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - GetModelStateResponse(): - header(), - pose(), - twist(), - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->pose.serialize(outbuffer + offset); - offset += this->twist.serialize(outbuffer + offset); - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->pose.deserialize(inbuffer + offset); - offset += this->twist.deserialize(inbuffer + offset); - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return GETMODELSTATE; }; - const char * getMD5(){ return "ccd51739bb00f0141629e87b792e92b9"; }; - - }; - - class GetModelState { - public: - typedef GetModelStateRequest Request; - typedef GetModelStateResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/GetPhysicsProperties.h b/arduino/ros_lib/gazebo_msgs/GetPhysicsProperties.h deleted file mode 100644 index 9b45854..0000000 --- a/arduino/ros_lib/gazebo_msgs/GetPhysicsProperties.h +++ /dev/null @@ -1,145 +0,0 @@ -#ifndef _ROS_SERVICE_GetPhysicsProperties_h -#define _ROS_SERVICE_GetPhysicsProperties_h -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Vector3.h" -#include "gazebo_msgs/ODEPhysics.h" - -namespace gazebo_msgs -{ - -static const char GETPHYSICSPROPERTIES[] = "gazebo_msgs/GetPhysicsProperties"; - - class GetPhysicsPropertiesRequest : public ros::Msg - { - public: - - GetPhysicsPropertiesRequest() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return GETPHYSICSPROPERTIES; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class GetPhysicsPropertiesResponse : public ros::Msg - { - public: - typedef float _time_step_type; - _time_step_type time_step; - typedef bool _pause_type; - _pause_type pause; - typedef float _max_update_rate_type; - _max_update_rate_type max_update_rate; - typedef geometry_msgs::Vector3 _gravity_type; - _gravity_type gravity; - typedef gazebo_msgs::ODEPhysics _ode_config_type; - _ode_config_type ode_config; - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - GetPhysicsPropertiesResponse(): - time_step(0), - pause(0), - max_update_rate(0), - gravity(), - ode_config(), - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->time_step); - union { - bool real; - uint8_t base; - } u_pause; - u_pause.real = this->pause; - *(outbuffer + offset + 0) = (u_pause.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->pause); - offset += serializeAvrFloat64(outbuffer + offset, this->max_update_rate); - offset += this->gravity.serialize(outbuffer + offset); - offset += this->ode_config.serialize(outbuffer + offset); - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->time_step)); - union { - bool real; - uint8_t base; - } u_pause; - u_pause.base = 0; - u_pause.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->pause = u_pause.real; - offset += sizeof(this->pause); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->max_update_rate)); - offset += this->gravity.deserialize(inbuffer + offset); - offset += this->ode_config.deserialize(inbuffer + offset); - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return GETPHYSICSPROPERTIES; }; - const char * getMD5(){ return "575a5e74786981b7df2e3afc567693a6"; }; - - }; - - class GetPhysicsProperties { - public: - typedef GetPhysicsPropertiesRequest Request; - typedef GetPhysicsPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/GetWorldProperties.h b/arduino/ros_lib/gazebo_msgs/GetWorldProperties.h deleted file mode 100644 index d576f87..0000000 --- a/arduino/ros_lib/gazebo_msgs/GetWorldProperties.h +++ /dev/null @@ -1,165 +0,0 @@ -#ifndef _ROS_SERVICE_GetWorldProperties_h -#define _ROS_SERVICE_GetWorldProperties_h -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - -static const char GETWORLDPROPERTIES[] = "gazebo_msgs/GetWorldProperties"; - - class GetWorldPropertiesRequest : public ros::Msg - { - public: - - GetWorldPropertiesRequest() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return GETWORLDPROPERTIES; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class GetWorldPropertiesResponse : public ros::Msg - { - public: - typedef float _sim_time_type; - _sim_time_type sim_time; - uint32_t model_names_length; - typedef char* _model_names_type; - _model_names_type st_model_names; - _model_names_type * model_names; - typedef bool _rendering_enabled_type; - _rendering_enabled_type rendering_enabled; - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - GetWorldPropertiesResponse(): - sim_time(0), - model_names_length(0), model_names(NULL), - rendering_enabled(0), - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->sim_time); - *(outbuffer + offset + 0) = (this->model_names_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->model_names_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->model_names_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->model_names_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->model_names_length); - for( uint32_t i = 0; i < model_names_length; i++){ - uint32_t length_model_namesi = strlen(this->model_names[i]); - varToArr(outbuffer + offset, length_model_namesi); - offset += 4; - memcpy(outbuffer + offset, this->model_names[i], length_model_namesi); - offset += length_model_namesi; - } - union { - bool real; - uint8_t base; - } u_rendering_enabled; - u_rendering_enabled.real = this->rendering_enabled; - *(outbuffer + offset + 0) = (u_rendering_enabled.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->rendering_enabled); - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->sim_time)); - uint32_t model_names_lengthT = ((uint32_t) (*(inbuffer + offset))); - model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->model_names_length); - if(model_names_lengthT > model_names_length) - this->model_names = (char**)realloc(this->model_names, model_names_lengthT * sizeof(char*)); - model_names_length = model_names_lengthT; - for( uint32_t i = 0; i < model_names_length; i++){ - uint32_t length_st_model_names; - arrToVar(length_st_model_names, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_model_names; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_model_names-1]=0; - this->st_model_names = (char *)(inbuffer + offset-1); - offset += length_st_model_names; - memcpy( &(this->model_names[i]), &(this->st_model_names), sizeof(char*)); - } - union { - bool real; - uint8_t base; - } u_rendering_enabled; - u_rendering_enabled.base = 0; - u_rendering_enabled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->rendering_enabled = u_rendering_enabled.real; - offset += sizeof(this->rendering_enabled); - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return GETWORLDPROPERTIES; }; - const char * getMD5(){ return "36bb0f2eccf4d8be971410c22818ba3f"; }; - - }; - - class GetWorldProperties { - public: - typedef GetWorldPropertiesRequest Request; - typedef GetWorldPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/JointRequest.h b/arduino/ros_lib/gazebo_msgs/JointRequest.h deleted file mode 100644 index 6c2c13e..0000000 --- a/arduino/ros_lib/gazebo_msgs/JointRequest.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef _ROS_SERVICE_JointRequest_h -#define _ROS_SERVICE_JointRequest_h -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - -static const char JOINTREQUEST[] = "gazebo_msgs/JointRequest"; - - class JointRequestRequest : public ros::Msg - { - public: - typedef const char* _joint_name_type; - _joint_name_type joint_name; - - JointRequestRequest(): - joint_name("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_joint_name = strlen(this->joint_name); - varToArr(outbuffer + offset, length_joint_name); - offset += 4; - memcpy(outbuffer + offset, this->joint_name, length_joint_name); - offset += length_joint_name; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_joint_name; - arrToVar(length_joint_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_joint_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_joint_name-1]=0; - this->joint_name = (char *)(inbuffer + offset-1); - offset += length_joint_name; - return offset; - } - - const char * getType(){ return JOINTREQUEST; }; - const char * getMD5(){ return "0be1351618e1dc030eb7959d9a4902de"; }; - - }; - - class JointRequestResponse : public ros::Msg - { - public: - - JointRequestResponse() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return JOINTREQUEST; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class JointRequest { - public: - typedef JointRequestRequest Request; - typedef JointRequestResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/LinkState.h b/arduino/ros_lib/gazebo_msgs/LinkState.h deleted file mode 100644 index cd2684b..0000000 --- a/arduino/ros_lib/gazebo_msgs/LinkState.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef _ROS_gazebo_msgs_LinkState_h -#define _ROS_gazebo_msgs_LinkState_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Pose.h" -#include "geometry_msgs/Twist.h" - -namespace gazebo_msgs -{ - - class LinkState : public ros::Msg - { - public: - typedef const char* _link_name_type; - _link_name_type link_name; - typedef geometry_msgs::Pose _pose_type; - _pose_type pose; - typedef geometry_msgs::Twist _twist_type; - _twist_type twist; - typedef const char* _reference_frame_type; - _reference_frame_type reference_frame; - - LinkState(): - link_name(""), - pose(), - twist(), - reference_frame("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_link_name = strlen(this->link_name); - varToArr(outbuffer + offset, length_link_name); - offset += 4; - memcpy(outbuffer + offset, this->link_name, length_link_name); - offset += length_link_name; - offset += this->pose.serialize(outbuffer + offset); - offset += this->twist.serialize(outbuffer + offset); - uint32_t length_reference_frame = strlen(this->reference_frame); - varToArr(outbuffer + offset, length_reference_frame); - offset += 4; - memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); - offset += length_reference_frame; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_link_name; - arrToVar(length_link_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_link_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_link_name-1]=0; - this->link_name = (char *)(inbuffer + offset-1); - offset += length_link_name; - offset += this->pose.deserialize(inbuffer + offset); - offset += this->twist.deserialize(inbuffer + offset); - uint32_t length_reference_frame; - arrToVar(length_reference_frame, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_reference_frame-1]=0; - this->reference_frame = (char *)(inbuffer + offset-1); - offset += length_reference_frame; - return offset; - } - - const char * getType(){ return "gazebo_msgs/LinkState"; }; - const char * getMD5(){ return "0818ebbf28ce3a08d48ab1eaa7309ebe"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/gazebo_msgs/LinkStates.h b/arduino/ros_lib/gazebo_msgs/LinkStates.h deleted file mode 100644 index 8ec738d..0000000 --- a/arduino/ros_lib/gazebo_msgs/LinkStates.h +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef _ROS_gazebo_msgs_LinkStates_h -#define _ROS_gazebo_msgs_LinkStates_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Pose.h" -#include "geometry_msgs/Twist.h" - -namespace gazebo_msgs -{ - - class LinkStates : public ros::Msg - { - public: - uint32_t name_length; - typedef char* _name_type; - _name_type st_name; - _name_type * name; - uint32_t pose_length; - typedef geometry_msgs::Pose _pose_type; - _pose_type st_pose; - _pose_type * pose; - uint32_t twist_length; - typedef geometry_msgs::Twist _twist_type; - _twist_type st_twist; - _twist_type * twist; - - LinkStates(): - name_length(0), name(NULL), - pose_length(0), pose(NULL), - twist_length(0), twist(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->name_length); - for( uint32_t i = 0; i < name_length; i++){ - uint32_t length_namei = strlen(this->name[i]); - varToArr(outbuffer + offset, length_namei); - offset += 4; - memcpy(outbuffer + offset, this->name[i], length_namei); - offset += length_namei; - } - *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->pose_length); - for( uint32_t i = 0; i < pose_length; i++){ - offset += this->pose[i].serialize(outbuffer + offset); - } - *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->twist_length); - for( uint32_t i = 0; i < twist_length; i++){ - offset += this->twist[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->name_length); - if(name_lengthT > name_length) - this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); - name_length = name_lengthT; - for( uint32_t i = 0; i < name_length; i++){ - uint32_t length_st_name; - arrToVar(length_st_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_name-1]=0; - this->st_name = (char *)(inbuffer + offset-1); - offset += length_st_name; - memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); - } - uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); - pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->pose_length); - if(pose_lengthT > pose_length) - this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); - pose_length = pose_lengthT; - for( uint32_t i = 0; i < pose_length; i++){ - offset += this->st_pose.deserialize(inbuffer + offset); - memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); - } - uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); - twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->twist_length); - if(twist_lengthT > twist_length) - this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); - twist_length = twist_lengthT; - for( uint32_t i = 0; i < twist_length; i++){ - offset += this->st_twist.deserialize(inbuffer + offset); - memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); - } - return offset; - } - - const char * getType(){ return "gazebo_msgs/LinkStates"; }; - const char * getMD5(){ return "48c080191eb15c41858319b4d8a609c2"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/gazebo_msgs/ModelState.h b/arduino/ros_lib/gazebo_msgs/ModelState.h deleted file mode 100644 index 4a3cfd1..0000000 --- a/arduino/ros_lib/gazebo_msgs/ModelState.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef _ROS_gazebo_msgs_ModelState_h -#define _ROS_gazebo_msgs_ModelState_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Pose.h" -#include "geometry_msgs/Twist.h" - -namespace gazebo_msgs -{ - - class ModelState : public ros::Msg - { - public: - typedef const char* _model_name_type; - _model_name_type model_name; - typedef geometry_msgs::Pose _pose_type; - _pose_type pose; - typedef geometry_msgs::Twist _twist_type; - _twist_type twist; - typedef const char* _reference_frame_type; - _reference_frame_type reference_frame; - - ModelState(): - model_name(""), - pose(), - twist(), - reference_frame("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_model_name = strlen(this->model_name); - varToArr(outbuffer + offset, length_model_name); - offset += 4; - memcpy(outbuffer + offset, this->model_name, length_model_name); - offset += length_model_name; - offset += this->pose.serialize(outbuffer + offset); - offset += this->twist.serialize(outbuffer + offset); - uint32_t length_reference_frame = strlen(this->reference_frame); - varToArr(outbuffer + offset, length_reference_frame); - offset += 4; - memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); - offset += length_reference_frame; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_model_name; - arrToVar(length_model_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_model_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_model_name-1]=0; - this->model_name = (char *)(inbuffer + offset-1); - offset += length_model_name; - offset += this->pose.deserialize(inbuffer + offset); - offset += this->twist.deserialize(inbuffer + offset); - uint32_t length_reference_frame; - arrToVar(length_reference_frame, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_reference_frame-1]=0; - this->reference_frame = (char *)(inbuffer + offset-1); - offset += length_reference_frame; - return offset; - } - - const char * getType(){ return "gazebo_msgs/ModelState"; }; - const char * getMD5(){ return "9330fd35f2fcd82d457e54bd54e10593"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/gazebo_msgs/ModelStates.h b/arduino/ros_lib/gazebo_msgs/ModelStates.h deleted file mode 100644 index f6c66d5..0000000 --- a/arduino/ros_lib/gazebo_msgs/ModelStates.h +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef _ROS_gazebo_msgs_ModelStates_h -#define _ROS_gazebo_msgs_ModelStates_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Pose.h" -#include "geometry_msgs/Twist.h" - -namespace gazebo_msgs -{ - - class ModelStates : public ros::Msg - { - public: - uint32_t name_length; - typedef char* _name_type; - _name_type st_name; - _name_type * name; - uint32_t pose_length; - typedef geometry_msgs::Pose _pose_type; - _pose_type st_pose; - _pose_type * pose; - uint32_t twist_length; - typedef geometry_msgs::Twist _twist_type; - _twist_type st_twist; - _twist_type * twist; - - ModelStates(): - name_length(0), name(NULL), - pose_length(0), pose(NULL), - twist_length(0), twist(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->name_length); - for( uint32_t i = 0; i < name_length; i++){ - uint32_t length_namei = strlen(this->name[i]); - varToArr(outbuffer + offset, length_namei); - offset += 4; - memcpy(outbuffer + offset, this->name[i], length_namei); - offset += length_namei; - } - *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->pose_length); - for( uint32_t i = 0; i < pose_length; i++){ - offset += this->pose[i].serialize(outbuffer + offset); - } - *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->twist_length); - for( uint32_t i = 0; i < twist_length; i++){ - offset += this->twist[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->name_length); - if(name_lengthT > name_length) - this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); - name_length = name_lengthT; - for( uint32_t i = 0; i < name_length; i++){ - uint32_t length_st_name; - arrToVar(length_st_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_name-1]=0; - this->st_name = (char *)(inbuffer + offset-1); - offset += length_st_name; - memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); - } - uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); - pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->pose_length); - if(pose_lengthT > pose_length) - this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); - pose_length = pose_lengthT; - for( uint32_t i = 0; i < pose_length; i++){ - offset += this->st_pose.deserialize(inbuffer + offset); - memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); - } - uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); - twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->twist_length); - if(twist_lengthT > twist_length) - this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); - twist_length = twist_lengthT; - for( uint32_t i = 0; i < twist_length; i++){ - offset += this->st_twist.deserialize(inbuffer + offset); - memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); - } - return offset; - } - - const char * getType(){ return "gazebo_msgs/ModelStates"; }; - const char * getMD5(){ return "48c080191eb15c41858319b4d8a609c2"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/gazebo_msgs/ODEJointProperties.h b/arduino/ros_lib/gazebo_msgs/ODEJointProperties.h deleted file mode 100644 index a273c0c..0000000 --- a/arduino/ros_lib/gazebo_msgs/ODEJointProperties.h +++ /dev/null @@ -1,288 +0,0 @@ -#ifndef _ROS_gazebo_msgs_ODEJointProperties_h -#define _ROS_gazebo_msgs_ODEJointProperties_h - -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - - class ODEJointProperties : public ros::Msg - { - public: - uint32_t damping_length; - typedef float _damping_type; - _damping_type st_damping; - _damping_type * damping; - uint32_t hiStop_length; - typedef float _hiStop_type; - _hiStop_type st_hiStop; - _hiStop_type * hiStop; - uint32_t loStop_length; - typedef float _loStop_type; - _loStop_type st_loStop; - _loStop_type * loStop; - uint32_t erp_length; - typedef float _erp_type; - _erp_type st_erp; - _erp_type * erp; - uint32_t cfm_length; - typedef float _cfm_type; - _cfm_type st_cfm; - _cfm_type * cfm; - uint32_t stop_erp_length; - typedef float _stop_erp_type; - _stop_erp_type st_stop_erp; - _stop_erp_type * stop_erp; - uint32_t stop_cfm_length; - typedef float _stop_cfm_type; - _stop_cfm_type st_stop_cfm; - _stop_cfm_type * stop_cfm; - uint32_t fudge_factor_length; - typedef float _fudge_factor_type; - _fudge_factor_type st_fudge_factor; - _fudge_factor_type * fudge_factor; - uint32_t fmax_length; - typedef float _fmax_type; - _fmax_type st_fmax; - _fmax_type * fmax; - uint32_t vel_length; - typedef float _vel_type; - _vel_type st_vel; - _vel_type * vel; - - ODEJointProperties(): - damping_length(0), damping(NULL), - hiStop_length(0), hiStop(NULL), - loStop_length(0), loStop(NULL), - erp_length(0), erp(NULL), - cfm_length(0), cfm(NULL), - stop_erp_length(0), stop_erp(NULL), - stop_cfm_length(0), stop_cfm(NULL), - fudge_factor_length(0), fudge_factor(NULL), - fmax_length(0), fmax(NULL), - vel_length(0), vel(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->damping_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->damping_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->damping_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->damping_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->damping_length); - for( uint32_t i = 0; i < damping_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->damping[i]); - } - *(outbuffer + offset + 0) = (this->hiStop_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->hiStop_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->hiStop_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->hiStop_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->hiStop_length); - for( uint32_t i = 0; i < hiStop_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->hiStop[i]); - } - *(outbuffer + offset + 0) = (this->loStop_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->loStop_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->loStop_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->loStop_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->loStop_length); - for( uint32_t i = 0; i < loStop_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->loStop[i]); - } - *(outbuffer + offset + 0) = (this->erp_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->erp_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->erp_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->erp_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->erp_length); - for( uint32_t i = 0; i < erp_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->erp[i]); - } - *(outbuffer + offset + 0) = (this->cfm_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->cfm_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->cfm_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->cfm_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->cfm_length); - for( uint32_t i = 0; i < cfm_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->cfm[i]); - } - *(outbuffer + offset + 0) = (this->stop_erp_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->stop_erp_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->stop_erp_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->stop_erp_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->stop_erp_length); - for( uint32_t i = 0; i < stop_erp_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->stop_erp[i]); - } - *(outbuffer + offset + 0) = (this->stop_cfm_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->stop_cfm_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->stop_cfm_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->stop_cfm_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->stop_cfm_length); - for( uint32_t i = 0; i < stop_cfm_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->stop_cfm[i]); - } - *(outbuffer + offset + 0) = (this->fudge_factor_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->fudge_factor_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->fudge_factor_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->fudge_factor_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->fudge_factor_length); - for( uint32_t i = 0; i < fudge_factor_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->fudge_factor[i]); - } - *(outbuffer + offset + 0) = (this->fmax_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->fmax_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->fmax_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->fmax_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->fmax_length); - for( uint32_t i = 0; i < fmax_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->fmax[i]); - } - *(outbuffer + offset + 0) = (this->vel_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->vel_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->vel_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->vel_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->vel_length); - for( uint32_t i = 0; i < vel_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->vel[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t damping_lengthT = ((uint32_t) (*(inbuffer + offset))); - damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->damping_length); - if(damping_lengthT > damping_length) - this->damping = (float*)realloc(this->damping, damping_lengthT * sizeof(float)); - damping_length = damping_lengthT; - for( uint32_t i = 0; i < damping_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_damping)); - memcpy( &(this->damping[i]), &(this->st_damping), sizeof(float)); - } - uint32_t hiStop_lengthT = ((uint32_t) (*(inbuffer + offset))); - hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->hiStop_length); - if(hiStop_lengthT > hiStop_length) - this->hiStop = (float*)realloc(this->hiStop, hiStop_lengthT * sizeof(float)); - hiStop_length = hiStop_lengthT; - for( uint32_t i = 0; i < hiStop_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_hiStop)); - memcpy( &(this->hiStop[i]), &(this->st_hiStop), sizeof(float)); - } - uint32_t loStop_lengthT = ((uint32_t) (*(inbuffer + offset))); - loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->loStop_length); - if(loStop_lengthT > loStop_length) - this->loStop = (float*)realloc(this->loStop, loStop_lengthT * sizeof(float)); - loStop_length = loStop_lengthT; - for( uint32_t i = 0; i < loStop_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_loStop)); - memcpy( &(this->loStop[i]), &(this->st_loStop), sizeof(float)); - } - uint32_t erp_lengthT = ((uint32_t) (*(inbuffer + offset))); - erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->erp_length); - if(erp_lengthT > erp_length) - this->erp = (float*)realloc(this->erp, erp_lengthT * sizeof(float)); - erp_length = erp_lengthT; - for( uint32_t i = 0; i < erp_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_erp)); - memcpy( &(this->erp[i]), &(this->st_erp), sizeof(float)); - } - uint32_t cfm_lengthT = ((uint32_t) (*(inbuffer + offset))); - cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->cfm_length); - if(cfm_lengthT > cfm_length) - this->cfm = (float*)realloc(this->cfm, cfm_lengthT * sizeof(float)); - cfm_length = cfm_lengthT; - for( uint32_t i = 0; i < cfm_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_cfm)); - memcpy( &(this->cfm[i]), &(this->st_cfm), sizeof(float)); - } - uint32_t stop_erp_lengthT = ((uint32_t) (*(inbuffer + offset))); - stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->stop_erp_length); - if(stop_erp_lengthT > stop_erp_length) - this->stop_erp = (float*)realloc(this->stop_erp, stop_erp_lengthT * sizeof(float)); - stop_erp_length = stop_erp_lengthT; - for( uint32_t i = 0; i < stop_erp_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_stop_erp)); - memcpy( &(this->stop_erp[i]), &(this->st_stop_erp), sizeof(float)); - } - uint32_t stop_cfm_lengthT = ((uint32_t) (*(inbuffer + offset))); - stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->stop_cfm_length); - if(stop_cfm_lengthT > stop_cfm_length) - this->stop_cfm = (float*)realloc(this->stop_cfm, stop_cfm_lengthT * sizeof(float)); - stop_cfm_length = stop_cfm_lengthT; - for( uint32_t i = 0; i < stop_cfm_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_stop_cfm)); - memcpy( &(this->stop_cfm[i]), &(this->st_stop_cfm), sizeof(float)); - } - uint32_t fudge_factor_lengthT = ((uint32_t) (*(inbuffer + offset))); - fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->fudge_factor_length); - if(fudge_factor_lengthT > fudge_factor_length) - this->fudge_factor = (float*)realloc(this->fudge_factor, fudge_factor_lengthT * sizeof(float)); - fudge_factor_length = fudge_factor_lengthT; - for( uint32_t i = 0; i < fudge_factor_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_fudge_factor)); - memcpy( &(this->fudge_factor[i]), &(this->st_fudge_factor), sizeof(float)); - } - uint32_t fmax_lengthT = ((uint32_t) (*(inbuffer + offset))); - fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->fmax_length); - if(fmax_lengthT > fmax_length) - this->fmax = (float*)realloc(this->fmax, fmax_lengthT * sizeof(float)); - fmax_length = fmax_lengthT; - for( uint32_t i = 0; i < fmax_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_fmax)); - memcpy( &(this->fmax[i]), &(this->st_fmax), sizeof(float)); - } - uint32_t vel_lengthT = ((uint32_t) (*(inbuffer + offset))); - vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->vel_length); - if(vel_lengthT > vel_length) - this->vel = (float*)realloc(this->vel, vel_lengthT * sizeof(float)); - vel_length = vel_lengthT; - for( uint32_t i = 0; i < vel_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_vel)); - memcpy( &(this->vel[i]), &(this->st_vel), sizeof(float)); - } - return offset; - } - - const char * getType(){ return "gazebo_msgs/ODEJointProperties"; }; - const char * getMD5(){ return "1b744c32a920af979f53afe2f9c3511f"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/gazebo_msgs/ODEPhysics.h b/arduino/ros_lib/gazebo_msgs/ODEPhysics.h deleted file mode 100644 index a2e5699..0000000 --- a/arduino/ros_lib/gazebo_msgs/ODEPhysics.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef _ROS_gazebo_msgs_ODEPhysics_h -#define _ROS_gazebo_msgs_ODEPhysics_h - -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - - class ODEPhysics : public ros::Msg - { - public: - typedef bool _auto_disable_bodies_type; - _auto_disable_bodies_type auto_disable_bodies; - typedef uint32_t _sor_pgs_precon_iters_type; - _sor_pgs_precon_iters_type sor_pgs_precon_iters; - typedef uint32_t _sor_pgs_iters_type; - _sor_pgs_iters_type sor_pgs_iters; - typedef float _sor_pgs_w_type; - _sor_pgs_w_type sor_pgs_w; - typedef float _sor_pgs_rms_error_tol_type; - _sor_pgs_rms_error_tol_type sor_pgs_rms_error_tol; - typedef float _contact_surface_layer_type; - _contact_surface_layer_type contact_surface_layer; - typedef float _contact_max_correcting_vel_type; - _contact_max_correcting_vel_type contact_max_correcting_vel; - typedef float _cfm_type; - _cfm_type cfm; - typedef float _erp_type; - _erp_type erp; - typedef uint32_t _max_contacts_type; - _max_contacts_type max_contacts; - - ODEPhysics(): - auto_disable_bodies(0), - sor_pgs_precon_iters(0), - sor_pgs_iters(0), - sor_pgs_w(0), - sor_pgs_rms_error_tol(0), - contact_surface_layer(0), - contact_max_correcting_vel(0), - cfm(0), - erp(0), - max_contacts(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_auto_disable_bodies; - u_auto_disable_bodies.real = this->auto_disable_bodies; - *(outbuffer + offset + 0) = (u_auto_disable_bodies.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->auto_disable_bodies); - *(outbuffer + offset + 0) = (this->sor_pgs_precon_iters >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->sor_pgs_precon_iters >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->sor_pgs_precon_iters >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->sor_pgs_precon_iters >> (8 * 3)) & 0xFF; - offset += sizeof(this->sor_pgs_precon_iters); - *(outbuffer + offset + 0) = (this->sor_pgs_iters >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->sor_pgs_iters >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->sor_pgs_iters >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->sor_pgs_iters >> (8 * 3)) & 0xFF; - offset += sizeof(this->sor_pgs_iters); - offset += serializeAvrFloat64(outbuffer + offset, this->sor_pgs_w); - offset += serializeAvrFloat64(outbuffer + offset, this->sor_pgs_rms_error_tol); - offset += serializeAvrFloat64(outbuffer + offset, this->contact_surface_layer); - offset += serializeAvrFloat64(outbuffer + offset, this->contact_max_correcting_vel); - offset += serializeAvrFloat64(outbuffer + offset, this->cfm); - offset += serializeAvrFloat64(outbuffer + offset, this->erp); - *(outbuffer + offset + 0) = (this->max_contacts >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->max_contacts >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->max_contacts >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->max_contacts >> (8 * 3)) & 0xFF; - offset += sizeof(this->max_contacts); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_auto_disable_bodies; - u_auto_disable_bodies.base = 0; - u_auto_disable_bodies.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->auto_disable_bodies = u_auto_disable_bodies.real; - offset += sizeof(this->auto_disable_bodies); - this->sor_pgs_precon_iters = ((uint32_t) (*(inbuffer + offset))); - this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->sor_pgs_precon_iters); - this->sor_pgs_iters = ((uint32_t) (*(inbuffer + offset))); - this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->sor_pgs_iters); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->sor_pgs_w)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->sor_pgs_rms_error_tol)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->contact_surface_layer)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->contact_max_correcting_vel)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->cfm)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->erp)); - this->max_contacts = ((uint32_t) (*(inbuffer + offset))); - this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->max_contacts); - return offset; - } - - const char * getType(){ return "gazebo_msgs/ODEPhysics"; }; - const char * getMD5(){ return "667d56ddbd547918c32d1934503dc335"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/gazebo_msgs/SetJointProperties.h b/arduino/ros_lib/gazebo_msgs/SetJointProperties.h deleted file mode 100644 index 981853d..0000000 --- a/arduino/ros_lib/gazebo_msgs/SetJointProperties.h +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef _ROS_SERVICE_SetJointProperties_h -#define _ROS_SERVICE_SetJointProperties_h -#include -#include -#include -#include "ros/msg.h" -#include "gazebo_msgs/ODEJointProperties.h" - -namespace gazebo_msgs -{ - -static const char SETJOINTPROPERTIES[] = "gazebo_msgs/SetJointProperties"; - - class SetJointPropertiesRequest : public ros::Msg - { - public: - typedef const char* _joint_name_type; - _joint_name_type joint_name; - typedef gazebo_msgs::ODEJointProperties _ode_joint_config_type; - _ode_joint_config_type ode_joint_config; - - SetJointPropertiesRequest(): - joint_name(""), - ode_joint_config() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_joint_name = strlen(this->joint_name); - varToArr(outbuffer + offset, length_joint_name); - offset += 4; - memcpy(outbuffer + offset, this->joint_name, length_joint_name); - offset += length_joint_name; - offset += this->ode_joint_config.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_joint_name; - arrToVar(length_joint_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_joint_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_joint_name-1]=0; - this->joint_name = (char *)(inbuffer + offset-1); - offset += length_joint_name; - offset += this->ode_joint_config.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return SETJOINTPROPERTIES; }; - const char * getMD5(){ return "331fd8f35fd27e3c1421175590258e26"; }; - - }; - - class SetJointPropertiesResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - SetJointPropertiesResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return SETJOINTPROPERTIES; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class SetJointProperties { - public: - typedef SetJointPropertiesRequest Request; - typedef SetJointPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/SetJointTrajectory.h b/arduino/ros_lib/gazebo_msgs/SetJointTrajectory.h deleted file mode 100644 index 81146ce..0000000 --- a/arduino/ros_lib/gazebo_msgs/SetJointTrajectory.h +++ /dev/null @@ -1,170 +0,0 @@ -#ifndef _ROS_SERVICE_SetJointTrajectory_h -#define _ROS_SERVICE_SetJointTrajectory_h -#include -#include -#include -#include "ros/msg.h" -#include "trajectory_msgs/JointTrajectory.h" -#include "geometry_msgs/Pose.h" - -namespace gazebo_msgs -{ - -static const char SETJOINTTRAJECTORY[] = "gazebo_msgs/SetJointTrajectory"; - - class SetJointTrajectoryRequest : public ros::Msg - { - public: - typedef const char* _model_name_type; - _model_name_type model_name; - typedef trajectory_msgs::JointTrajectory _joint_trajectory_type; - _joint_trajectory_type joint_trajectory; - typedef geometry_msgs::Pose _model_pose_type; - _model_pose_type model_pose; - typedef bool _set_model_pose_type; - _set_model_pose_type set_model_pose; - typedef bool _disable_physics_updates_type; - _disable_physics_updates_type disable_physics_updates; - - SetJointTrajectoryRequest(): - model_name(""), - joint_trajectory(), - model_pose(), - set_model_pose(0), - disable_physics_updates(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_model_name = strlen(this->model_name); - varToArr(outbuffer + offset, length_model_name); - offset += 4; - memcpy(outbuffer + offset, this->model_name, length_model_name); - offset += length_model_name; - offset += this->joint_trajectory.serialize(outbuffer + offset); - offset += this->model_pose.serialize(outbuffer + offset); - union { - bool real; - uint8_t base; - } u_set_model_pose; - u_set_model_pose.real = this->set_model_pose; - *(outbuffer + offset + 0) = (u_set_model_pose.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->set_model_pose); - union { - bool real; - uint8_t base; - } u_disable_physics_updates; - u_disable_physics_updates.real = this->disable_physics_updates; - *(outbuffer + offset + 0) = (u_disable_physics_updates.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->disable_physics_updates); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_model_name; - arrToVar(length_model_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_model_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_model_name-1]=0; - this->model_name = (char *)(inbuffer + offset-1); - offset += length_model_name; - offset += this->joint_trajectory.deserialize(inbuffer + offset); - offset += this->model_pose.deserialize(inbuffer + offset); - union { - bool real; - uint8_t base; - } u_set_model_pose; - u_set_model_pose.base = 0; - u_set_model_pose.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->set_model_pose = u_set_model_pose.real; - offset += sizeof(this->set_model_pose); - union { - bool real; - uint8_t base; - } u_disable_physics_updates; - u_disable_physics_updates.base = 0; - u_disable_physics_updates.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->disable_physics_updates = u_disable_physics_updates.real; - offset += sizeof(this->disable_physics_updates); - return offset; - } - - const char * getType(){ return SETJOINTTRAJECTORY; }; - const char * getMD5(){ return "649dd2eba5ffd358069238825f9f85ab"; }; - - }; - - class SetJointTrajectoryResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - SetJointTrajectoryResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return SETJOINTTRAJECTORY; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class SetJointTrajectory { - public: - typedef SetJointTrajectoryRequest Request; - typedef SetJointTrajectoryResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/SetLightProperties.h b/arduino/ros_lib/gazebo_msgs/SetLightProperties.h deleted file mode 100644 index 9f7d0d3..0000000 --- a/arduino/ros_lib/gazebo_msgs/SetLightProperties.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef _ROS_SERVICE_SetLightProperties_h -#define _ROS_SERVICE_SetLightProperties_h -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/ColorRGBA.h" - -namespace gazebo_msgs -{ - -static const char SETLIGHTPROPERTIES[] = "gazebo_msgs/SetLightProperties"; - - class SetLightPropertiesRequest : public ros::Msg - { - public: - typedef const char* _light_name_type; - _light_name_type light_name; - typedef std_msgs::ColorRGBA _diffuse_type; - _diffuse_type diffuse; - typedef float _attenuation_constant_type; - _attenuation_constant_type attenuation_constant; - typedef float _attenuation_linear_type; - _attenuation_linear_type attenuation_linear; - typedef float _attenuation_quadratic_type; - _attenuation_quadratic_type attenuation_quadratic; - - SetLightPropertiesRequest(): - light_name(""), - diffuse(), - attenuation_constant(0), - attenuation_linear(0), - attenuation_quadratic(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_light_name = strlen(this->light_name); - varToArr(outbuffer + offset, length_light_name); - offset += 4; - memcpy(outbuffer + offset, this->light_name, length_light_name); - offset += length_light_name; - offset += this->diffuse.serialize(outbuffer + offset); - offset += serializeAvrFloat64(outbuffer + offset, this->attenuation_constant); - offset += serializeAvrFloat64(outbuffer + offset, this->attenuation_linear); - offset += serializeAvrFloat64(outbuffer + offset, this->attenuation_quadratic); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_light_name; - arrToVar(length_light_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_light_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_light_name-1]=0; - this->light_name = (char *)(inbuffer + offset-1); - offset += length_light_name; - offset += this->diffuse.deserialize(inbuffer + offset); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->attenuation_constant)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->attenuation_linear)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->attenuation_quadratic)); - return offset; - } - - const char * getType(){ return SETLIGHTPROPERTIES; }; - const char * getMD5(){ return "73ad1ac5e9e312ddf7c74f38ad843f34"; }; - - }; - - class SetLightPropertiesResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - SetLightPropertiesResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return SETLIGHTPROPERTIES; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class SetLightProperties { - public: - typedef SetLightPropertiesRequest Request; - typedef SetLightPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/SetLinkProperties.h b/arduino/ros_lib/gazebo_msgs/SetLinkProperties.h deleted file mode 100644 index 5747d26..0000000 --- a/arduino/ros_lib/gazebo_msgs/SetLinkProperties.h +++ /dev/null @@ -1,181 +0,0 @@ -#ifndef _ROS_SERVICE_SetLinkProperties_h -#define _ROS_SERVICE_SetLinkProperties_h -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Pose.h" - -namespace gazebo_msgs -{ - -static const char SETLINKPROPERTIES[] = "gazebo_msgs/SetLinkProperties"; - - class SetLinkPropertiesRequest : public ros::Msg - { - public: - typedef const char* _link_name_type; - _link_name_type link_name; - typedef geometry_msgs::Pose _com_type; - _com_type com; - typedef bool _gravity_mode_type; - _gravity_mode_type gravity_mode; - typedef float _mass_type; - _mass_type mass; - typedef float _ixx_type; - _ixx_type ixx; - typedef float _ixy_type; - _ixy_type ixy; - typedef float _ixz_type; - _ixz_type ixz; - typedef float _iyy_type; - _iyy_type iyy; - typedef float _iyz_type; - _iyz_type iyz; - typedef float _izz_type; - _izz_type izz; - - SetLinkPropertiesRequest(): - link_name(""), - com(), - gravity_mode(0), - mass(0), - ixx(0), - ixy(0), - ixz(0), - iyy(0), - iyz(0), - izz(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_link_name = strlen(this->link_name); - varToArr(outbuffer + offset, length_link_name); - offset += 4; - memcpy(outbuffer + offset, this->link_name, length_link_name); - offset += length_link_name; - offset += this->com.serialize(outbuffer + offset); - union { - bool real; - uint8_t base; - } u_gravity_mode; - u_gravity_mode.real = this->gravity_mode; - *(outbuffer + offset + 0) = (u_gravity_mode.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->gravity_mode); - offset += serializeAvrFloat64(outbuffer + offset, this->mass); - offset += serializeAvrFloat64(outbuffer + offset, this->ixx); - offset += serializeAvrFloat64(outbuffer + offset, this->ixy); - offset += serializeAvrFloat64(outbuffer + offset, this->ixz); - offset += serializeAvrFloat64(outbuffer + offset, this->iyy); - offset += serializeAvrFloat64(outbuffer + offset, this->iyz); - offset += serializeAvrFloat64(outbuffer + offset, this->izz); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_link_name; - arrToVar(length_link_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_link_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_link_name-1]=0; - this->link_name = (char *)(inbuffer + offset-1); - offset += length_link_name; - offset += this->com.deserialize(inbuffer + offset); - union { - bool real; - uint8_t base; - } u_gravity_mode; - u_gravity_mode.base = 0; - u_gravity_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->gravity_mode = u_gravity_mode.real; - offset += sizeof(this->gravity_mode); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->mass)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->ixx)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->ixy)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->ixz)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->iyy)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->iyz)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->izz)); - return offset; - } - - const char * getType(){ return SETLINKPROPERTIES; }; - const char * getMD5(){ return "68ac74a4be01b165bc305b5ccdc45e91"; }; - - }; - - class SetLinkPropertiesResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - SetLinkPropertiesResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return SETLINKPROPERTIES; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class SetLinkProperties { - public: - typedef SetLinkPropertiesRequest Request; - typedef SetLinkPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/SetLinkState.h b/arduino/ros_lib/gazebo_msgs/SetLinkState.h deleted file mode 100644 index f089492..0000000 --- a/arduino/ros_lib/gazebo_msgs/SetLinkState.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef _ROS_SERVICE_SetLinkState_h -#define _ROS_SERVICE_SetLinkState_h -#include -#include -#include -#include "ros/msg.h" -#include "gazebo_msgs/LinkState.h" - -namespace gazebo_msgs -{ - -static const char SETLINKSTATE[] = "gazebo_msgs/SetLinkState"; - - class SetLinkStateRequest : public ros::Msg - { - public: - typedef gazebo_msgs::LinkState _link_state_type; - _link_state_type link_state; - - SetLinkStateRequest(): - link_state() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->link_state.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->link_state.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return SETLINKSTATE; }; - const char * getMD5(){ return "22a2c757d56911b6f27868159e9a872d"; }; - - }; - - class SetLinkStateResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - SetLinkStateResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return SETLINKSTATE; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class SetLinkState { - public: - typedef SetLinkStateRequest Request; - typedef SetLinkStateResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/SetModelConfiguration.h b/arduino/ros_lib/gazebo_msgs/SetModelConfiguration.h deleted file mode 100644 index 80ef137..0000000 --- a/arduino/ros_lib/gazebo_msgs/SetModelConfiguration.h +++ /dev/null @@ -1,201 +0,0 @@ -#ifndef _ROS_SERVICE_SetModelConfiguration_h -#define _ROS_SERVICE_SetModelConfiguration_h -#include -#include -#include -#include "ros/msg.h" - -namespace gazebo_msgs -{ - -static const char SETMODELCONFIGURATION[] = "gazebo_msgs/SetModelConfiguration"; - - class SetModelConfigurationRequest : public ros::Msg - { - public: - typedef const char* _model_name_type; - _model_name_type model_name; - typedef const char* _urdf_param_name_type; - _urdf_param_name_type urdf_param_name; - uint32_t joint_names_length; - typedef char* _joint_names_type; - _joint_names_type st_joint_names; - _joint_names_type * joint_names; - uint32_t joint_positions_length; - typedef float _joint_positions_type; - _joint_positions_type st_joint_positions; - _joint_positions_type * joint_positions; - - SetModelConfigurationRequest(): - model_name(""), - urdf_param_name(""), - joint_names_length(0), joint_names(NULL), - joint_positions_length(0), joint_positions(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_model_name = strlen(this->model_name); - varToArr(outbuffer + offset, length_model_name); - offset += 4; - memcpy(outbuffer + offset, this->model_name, length_model_name); - offset += length_model_name; - uint32_t length_urdf_param_name = strlen(this->urdf_param_name); - varToArr(outbuffer + offset, length_urdf_param_name); - offset += 4; - memcpy(outbuffer + offset, this->urdf_param_name, length_urdf_param_name); - offset += length_urdf_param_name; - *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->joint_names_length); - for( uint32_t i = 0; i < joint_names_length; i++){ - uint32_t length_joint_namesi = strlen(this->joint_names[i]); - varToArr(outbuffer + offset, length_joint_namesi); - offset += 4; - memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); - offset += length_joint_namesi; - } - *(outbuffer + offset + 0) = (this->joint_positions_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->joint_positions_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->joint_positions_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->joint_positions_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->joint_positions_length); - for( uint32_t i = 0; i < joint_positions_length; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->joint_positions[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_model_name; - arrToVar(length_model_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_model_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_model_name-1]=0; - this->model_name = (char *)(inbuffer + offset-1); - offset += length_model_name; - uint32_t length_urdf_param_name; - arrToVar(length_urdf_param_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_urdf_param_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_urdf_param_name-1]=0; - this->urdf_param_name = (char *)(inbuffer + offset-1); - offset += length_urdf_param_name; - uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->joint_names_length); - if(joint_names_lengthT > joint_names_length) - this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); - joint_names_length = joint_names_lengthT; - for( uint32_t i = 0; i < joint_names_length; i++){ - uint32_t length_st_joint_names; - arrToVar(length_st_joint_names, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_joint_names-1]=0; - this->st_joint_names = (char *)(inbuffer + offset-1); - offset += length_st_joint_names; - memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); - } - uint32_t joint_positions_lengthT = ((uint32_t) (*(inbuffer + offset))); - joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->joint_positions_length); - if(joint_positions_lengthT > joint_positions_length) - this->joint_positions = (float*)realloc(this->joint_positions, joint_positions_lengthT * sizeof(float)); - joint_positions_length = joint_positions_lengthT; - for( uint32_t i = 0; i < joint_positions_length; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->st_joint_positions)); - memcpy( &(this->joint_positions[i]), &(this->st_joint_positions), sizeof(float)); - } - return offset; - } - - const char * getType(){ return SETMODELCONFIGURATION; }; - const char * getMD5(){ return "160eae60f51fabff255480c70afa289f"; }; - - }; - - class SetModelConfigurationResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - SetModelConfigurationResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return SETMODELCONFIGURATION; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class SetModelConfiguration { - public: - typedef SetModelConfigurationRequest Request; - typedef SetModelConfigurationResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/SetModelState.h b/arduino/ros_lib/gazebo_msgs/SetModelState.h deleted file mode 100644 index ef251ad..0000000 --- a/arduino/ros_lib/gazebo_msgs/SetModelState.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef _ROS_SERVICE_SetModelState_h -#define _ROS_SERVICE_SetModelState_h -#include -#include -#include -#include "ros/msg.h" -#include "gazebo_msgs/ModelState.h" - -namespace gazebo_msgs -{ - -static const char SETMODELSTATE[] = "gazebo_msgs/SetModelState"; - - class SetModelStateRequest : public ros::Msg - { - public: - typedef gazebo_msgs::ModelState _model_state_type; - _model_state_type model_state; - - SetModelStateRequest(): - model_state() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->model_state.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->model_state.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return SETMODELSTATE; }; - const char * getMD5(){ return "cb042b0e91880f4661b29ea5b6234350"; }; - - }; - - class SetModelStateResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - SetModelStateResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return SETMODELSTATE; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class SetModelState { - public: - typedef SetModelStateRequest Request; - typedef SetModelStateResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/SetPhysicsProperties.h b/arduino/ros_lib/gazebo_msgs/SetPhysicsProperties.h deleted file mode 100644 index 2fde5c1..0000000 --- a/arduino/ros_lib/gazebo_msgs/SetPhysicsProperties.h +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef _ROS_SERVICE_SetPhysicsProperties_h -#define _ROS_SERVICE_SetPhysicsProperties_h -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Vector3.h" -#include "gazebo_msgs/ODEPhysics.h" - -namespace gazebo_msgs -{ - -static const char SETPHYSICSPROPERTIES[] = "gazebo_msgs/SetPhysicsProperties"; - - class SetPhysicsPropertiesRequest : public ros::Msg - { - public: - typedef float _time_step_type; - _time_step_type time_step; - typedef float _max_update_rate_type; - _max_update_rate_type max_update_rate; - typedef geometry_msgs::Vector3 _gravity_type; - _gravity_type gravity; - typedef gazebo_msgs::ODEPhysics _ode_config_type; - _ode_config_type ode_config; - - SetPhysicsPropertiesRequest(): - time_step(0), - max_update_rate(0), - gravity(), - ode_config() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->time_step); - offset += serializeAvrFloat64(outbuffer + offset, this->max_update_rate); - offset += this->gravity.serialize(outbuffer + offset); - offset += this->ode_config.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->time_step)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->max_update_rate)); - offset += this->gravity.deserialize(inbuffer + offset); - offset += this->ode_config.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return SETPHYSICSPROPERTIES; }; - const char * getMD5(){ return "abd9f82732b52b92e9d6bb36e6a82452"; }; - - }; - - class SetPhysicsPropertiesResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - SetPhysicsPropertiesResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return SETPHYSICSPROPERTIES; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class SetPhysicsProperties { - public: - typedef SetPhysicsPropertiesRequest Request; - typedef SetPhysicsPropertiesResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/SpawnModel.h b/arduino/ros_lib/gazebo_msgs/SpawnModel.h deleted file mode 100644 index 215b001..0000000 --- a/arduino/ros_lib/gazebo_msgs/SpawnModel.h +++ /dev/null @@ -1,179 +0,0 @@ -#ifndef _ROS_SERVICE_SpawnModel_h -#define _ROS_SERVICE_SpawnModel_h -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Pose.h" - -namespace gazebo_msgs -{ - -static const char SPAWNMODEL[] = "gazebo_msgs/SpawnModel"; - - class SpawnModelRequest : public ros::Msg - { - public: - typedef const char* _model_name_type; - _model_name_type model_name; - typedef const char* _model_xml_type; - _model_xml_type model_xml; - typedef const char* _robot_namespace_type; - _robot_namespace_type robot_namespace; - typedef geometry_msgs::Pose _initial_pose_type; - _initial_pose_type initial_pose; - typedef const char* _reference_frame_type; - _reference_frame_type reference_frame; - - SpawnModelRequest(): - model_name(""), - model_xml(""), - robot_namespace(""), - initial_pose(), - reference_frame("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_model_name = strlen(this->model_name); - varToArr(outbuffer + offset, length_model_name); - offset += 4; - memcpy(outbuffer + offset, this->model_name, length_model_name); - offset += length_model_name; - uint32_t length_model_xml = strlen(this->model_xml); - varToArr(outbuffer + offset, length_model_xml); - offset += 4; - memcpy(outbuffer + offset, this->model_xml, length_model_xml); - offset += length_model_xml; - uint32_t length_robot_namespace = strlen(this->robot_namespace); - varToArr(outbuffer + offset, length_robot_namespace); - offset += 4; - memcpy(outbuffer + offset, this->robot_namespace, length_robot_namespace); - offset += length_robot_namespace; - offset += this->initial_pose.serialize(outbuffer + offset); - uint32_t length_reference_frame = strlen(this->reference_frame); - varToArr(outbuffer + offset, length_reference_frame); - offset += 4; - memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); - offset += length_reference_frame; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_model_name; - arrToVar(length_model_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_model_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_model_name-1]=0; - this->model_name = (char *)(inbuffer + offset-1); - offset += length_model_name; - uint32_t length_model_xml; - arrToVar(length_model_xml, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_model_xml; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_model_xml-1]=0; - this->model_xml = (char *)(inbuffer + offset-1); - offset += length_model_xml; - uint32_t length_robot_namespace; - arrToVar(length_robot_namespace, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_robot_namespace; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_robot_namespace-1]=0; - this->robot_namespace = (char *)(inbuffer + offset-1); - offset += length_robot_namespace; - offset += this->initial_pose.deserialize(inbuffer + offset); - uint32_t length_reference_frame; - arrToVar(length_reference_frame, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_reference_frame-1]=0; - this->reference_frame = (char *)(inbuffer + offset-1); - offset += length_reference_frame; - return offset; - } - - const char * getType(){ return SPAWNMODEL; }; - const char * getMD5(){ return "6d0eba5753761cd57e6263a056b79930"; }; - - }; - - class SpawnModelResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - typedef const char* _status_message_type; - _status_message_type status_message; - - SpawnModelResponse(): - success(0), - status_message("") - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - uint32_t length_status_message = strlen(this->status_message); - varToArr(outbuffer + offset, length_status_message); - offset += 4; - memcpy(outbuffer + offset, this->status_message, length_status_message); - offset += length_status_message; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - uint32_t length_status_message; - arrToVar(length_status_message, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_status_message; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_status_message-1]=0; - this->status_message = (char *)(inbuffer + offset-1); - offset += length_status_message; - return offset; - } - - const char * getType(){ return SPAWNMODEL; }; - const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; - - }; - - class SpawnModel { - public: - typedef SpawnModelRequest Request; - typedef SpawnModelResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/gazebo_msgs/WorldState.h b/arduino/ros_lib/gazebo_msgs/WorldState.h deleted file mode 100644 index 43eb256..0000000 --- a/arduino/ros_lib/gazebo_msgs/WorldState.h +++ /dev/null @@ -1,159 +0,0 @@ -#ifndef _ROS_gazebo_msgs_WorldState_h -#define _ROS_gazebo_msgs_WorldState_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Pose.h" -#include "geometry_msgs/Twist.h" -#include "geometry_msgs/Wrench.h" - -namespace gazebo_msgs -{ - - class WorldState : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t name_length; - typedef char* _name_type; - _name_type st_name; - _name_type * name; - uint32_t pose_length; - typedef geometry_msgs::Pose _pose_type; - _pose_type st_pose; - _pose_type * pose; - uint32_t twist_length; - typedef geometry_msgs::Twist _twist_type; - _twist_type st_twist; - _twist_type * twist; - uint32_t wrench_length; - typedef geometry_msgs::Wrench _wrench_type; - _wrench_type st_wrench; - _wrench_type * wrench; - - WorldState(): - header(), - name_length(0), name(NULL), - pose_length(0), pose(NULL), - twist_length(0), twist(NULL), - wrench_length(0), wrench(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->name_length); - for( uint32_t i = 0; i < name_length; i++){ - uint32_t length_namei = strlen(this->name[i]); - varToArr(outbuffer + offset, length_namei); - offset += 4; - memcpy(outbuffer + offset, this->name[i], length_namei); - offset += length_namei; - } - *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->pose_length); - for( uint32_t i = 0; i < pose_length; i++){ - offset += this->pose[i].serialize(outbuffer + offset); - } - *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->twist_length); - for( uint32_t i = 0; i < twist_length; i++){ - offset += this->twist[i].serialize(outbuffer + offset); - } - *(outbuffer + offset + 0) = (this->wrench_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->wrench_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->wrench_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->wrench_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->wrench_length); - for( uint32_t i = 0; i < wrench_length; i++){ - offset += this->wrench[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->name_length); - if(name_lengthT > name_length) - this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); - name_length = name_lengthT; - for( uint32_t i = 0; i < name_length; i++){ - uint32_t length_st_name; - arrToVar(length_st_name, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_st_name; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_st_name-1]=0; - this->st_name = (char *)(inbuffer + offset-1); - offset += length_st_name; - memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); - } - uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); - pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->pose_length); - if(pose_lengthT > pose_length) - this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); - pose_length = pose_lengthT; - for( uint32_t i = 0; i < pose_length; i++){ - offset += this->st_pose.deserialize(inbuffer + offset); - memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); - } - uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); - twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->twist_length); - if(twist_lengthT > twist_length) - this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); - twist_length = twist_lengthT; - for( uint32_t i = 0; i < twist_length; i++){ - offset += this->st_twist.deserialize(inbuffer + offset); - memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); - } - uint32_t wrench_lengthT = ((uint32_t) (*(inbuffer + offset))); - wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->wrench_length); - if(wrench_lengthT > wrench_length) - this->wrench = (geometry_msgs::Wrench*)realloc(this->wrench, wrench_lengthT * sizeof(geometry_msgs::Wrench)); - wrench_length = wrench_lengthT; - for( uint32_t i = 0; i < wrench_length; i++){ - offset += this->st_wrench.deserialize(inbuffer + offset); - memcpy( &(this->wrench[i]), &(this->st_wrench), sizeof(geometry_msgs::Wrench)); - } - return offset; - } - - const char * getType(){ return "gazebo_msgs/WorldState"; }; - const char * getMD5(){ return "de1a9de3ab7ba97ac0e9ec01a4eb481e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Accel.h b/arduino/ros_lib/geometry_msgs/Accel.h deleted file mode 100644 index b5931f6..0000000 --- a/arduino/ros_lib/geometry_msgs/Accel.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef _ROS_geometry_msgs_Accel_h -#define _ROS_geometry_msgs_Accel_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Vector3.h" - -namespace geometry_msgs -{ - - class Accel : public ros::Msg - { - public: - typedef geometry_msgs::Vector3 _linear_type; - _linear_type linear; - typedef geometry_msgs::Vector3 _angular_type; - _angular_type angular; - - Accel(): - linear(), - angular() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->linear.serialize(outbuffer + offset); - offset += this->angular.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->linear.deserialize(inbuffer + offset); - offset += this->angular.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/Accel"; }; - const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/AccelStamped.h b/arduino/ros_lib/geometry_msgs/AccelStamped.h deleted file mode 100644 index d7f7858..0000000 --- a/arduino/ros_lib/geometry_msgs/AccelStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_AccelStamped_h -#define _ROS_geometry_msgs_AccelStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Accel.h" - -namespace geometry_msgs -{ - - class AccelStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Accel _accel_type; - _accel_type accel; - - AccelStamped(): - header(), - accel() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->accel.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->accel.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/AccelStamped"; }; - const char * getMD5(){ return "d8a98a5d81351b6eb0578c78557e7659"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/AccelWithCovariance.h b/arduino/ros_lib/geometry_msgs/AccelWithCovariance.h deleted file mode 100644 index d665068..0000000 --- a/arduino/ros_lib/geometry_msgs/AccelWithCovariance.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef _ROS_geometry_msgs_AccelWithCovariance_h -#define _ROS_geometry_msgs_AccelWithCovariance_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Accel.h" - -namespace geometry_msgs -{ - - class AccelWithCovariance : public ros::Msg - { - public: - typedef geometry_msgs::Accel _accel_type; - _accel_type accel; - float covariance[36]; - - AccelWithCovariance(): - accel(), - covariance() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->accel.serialize(outbuffer + offset); - for( uint32_t i = 0; i < 36; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->covariance[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->accel.deserialize(inbuffer + offset); - for( uint32_t i = 0; i < 36; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->covariance[i])); - } - return offset; - } - - const char * getType(){ return "geometry_msgs/AccelWithCovariance"; }; - const char * getMD5(){ return "ad5a718d699c6be72a02b8d6a139f334"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h b/arduino/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h deleted file mode 100644 index 3153d39..0000000 --- a/arduino/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_AccelWithCovarianceStamped_h -#define _ROS_geometry_msgs_AccelWithCovarianceStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/AccelWithCovariance.h" - -namespace geometry_msgs -{ - - class AccelWithCovarianceStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::AccelWithCovariance _accel_type; - _accel_type accel; - - AccelWithCovarianceStamped(): - header(), - accel() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->accel.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->accel.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/AccelWithCovarianceStamped"; }; - const char * getMD5(){ return "96adb295225031ec8d57fb4251b0a886"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Inertia.h b/arduino/ros_lib/geometry_msgs/Inertia.h deleted file mode 100644 index c9fe974..0000000 --- a/arduino/ros_lib/geometry_msgs/Inertia.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef _ROS_geometry_msgs_Inertia_h -#define _ROS_geometry_msgs_Inertia_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Vector3.h" - -namespace geometry_msgs -{ - - class Inertia : public ros::Msg - { - public: - typedef float _m_type; - _m_type m; - typedef geometry_msgs::Vector3 _com_type; - _com_type com; - typedef float _ixx_type; - _ixx_type ixx; - typedef float _ixy_type; - _ixy_type ixy; - typedef float _ixz_type; - _ixz_type ixz; - typedef float _iyy_type; - _iyy_type iyy; - typedef float _iyz_type; - _iyz_type iyz; - typedef float _izz_type; - _izz_type izz; - - Inertia(): - m(0), - com(), - ixx(0), - ixy(0), - ixz(0), - iyy(0), - iyz(0), - izz(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->m); - offset += this->com.serialize(outbuffer + offset); - offset += serializeAvrFloat64(outbuffer + offset, this->ixx); - offset += serializeAvrFloat64(outbuffer + offset, this->ixy); - offset += serializeAvrFloat64(outbuffer + offset, this->ixz); - offset += serializeAvrFloat64(outbuffer + offset, this->iyy); - offset += serializeAvrFloat64(outbuffer + offset, this->iyz); - offset += serializeAvrFloat64(outbuffer + offset, this->izz); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->m)); - offset += this->com.deserialize(inbuffer + offset); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->ixx)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->ixy)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->ixz)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->iyy)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->iyz)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->izz)); - return offset; - } - - const char * getType(){ return "geometry_msgs/Inertia"; }; - const char * getMD5(){ return "1d26e4bb6c83ff141c5cf0d883c2b0fe"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/InertiaStamped.h b/arduino/ros_lib/geometry_msgs/InertiaStamped.h deleted file mode 100644 index 2d8c944..0000000 --- a/arduino/ros_lib/geometry_msgs/InertiaStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_InertiaStamped_h -#define _ROS_geometry_msgs_InertiaStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Inertia.h" - -namespace geometry_msgs -{ - - class InertiaStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Inertia _inertia_type; - _inertia_type inertia; - - InertiaStamped(): - header(), - inertia() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->inertia.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->inertia.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/InertiaStamped"; }; - const char * getMD5(){ return "ddee48caeab5a966c5e8d166654a9ac7"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Point.h b/arduino/ros_lib/geometry_msgs/Point.h deleted file mode 100644 index ca1e59f..0000000 --- a/arduino/ros_lib/geometry_msgs/Point.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _ROS_geometry_msgs_Point_h -#define _ROS_geometry_msgs_Point_h - -#include -#include -#include -#include "ros/msg.h" - -namespace geometry_msgs -{ - - class Point : public ros::Msg - { - public: - typedef float _x_type; - _x_type x; - typedef float _y_type; - _y_type y; - typedef float _z_type; - _z_type z; - - Point(): - x(0), - y(0), - z(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->x); - offset += serializeAvrFloat64(outbuffer + offset, this->y); - offset += serializeAvrFloat64(outbuffer + offset, this->z); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->x)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->y)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->z)); - return offset; - } - - const char * getType(){ return "geometry_msgs/Point"; }; - const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Point32.h b/arduino/ros_lib/geometry_msgs/Point32.h deleted file mode 100644 index 8c3b572..0000000 --- a/arduino/ros_lib/geometry_msgs/Point32.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef _ROS_geometry_msgs_Point32_h -#define _ROS_geometry_msgs_Point32_h - -#include -#include -#include -#include "ros/msg.h" - -namespace geometry_msgs -{ - - class Point32 : public ros::Msg - { - public: - typedef float _x_type; - _x_type x; - typedef float _y_type; - _y_type y; - typedef float _z_type; - _z_type z; - - Point32(): - x(0), - y(0), - z(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - float real; - uint32_t base; - } u_x; - u_x.real = this->x; - *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->x); - union { - float real; - uint32_t base; - } u_y; - u_y.real = this->y; - *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->y); - union { - float real; - uint32_t base; - } u_z; - u_z.real = this->z; - *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->z); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - float real; - uint32_t base; - } u_x; - u_x.base = 0; - u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->x = u_x.real; - offset += sizeof(this->x); - union { - float real; - uint32_t base; - } u_y; - u_y.base = 0; - u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->y = u_y.real; - offset += sizeof(this->y); - union { - float real; - uint32_t base; - } u_z; - u_z.base = 0; - u_z.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_z.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_z.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_z.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->z = u_z.real; - offset += sizeof(this->z); - return offset; - } - - const char * getType(){ return "geometry_msgs/Point32"; }; - const char * getMD5(){ return "cc153912f1453b708d221682bc23d9ac"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/PointStamped.h b/arduino/ros_lib/geometry_msgs/PointStamped.h deleted file mode 100644 index ce24530..0000000 --- a/arduino/ros_lib/geometry_msgs/PointStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_PointStamped_h -#define _ROS_geometry_msgs_PointStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Point.h" - -namespace geometry_msgs -{ - - class PointStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Point _point_type; - _point_type point; - - PointStamped(): - header(), - point() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->point.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->point.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/PointStamped"; }; - const char * getMD5(){ return "c63aecb41bfdfd6b7e1fac37c7cbe7bf"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Polygon.h b/arduino/ros_lib/geometry_msgs/Polygon.h deleted file mode 100644 index 8ff3276..0000000 --- a/arduino/ros_lib/geometry_msgs/Polygon.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _ROS_geometry_msgs_Polygon_h -#define _ROS_geometry_msgs_Polygon_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Point32.h" - -namespace geometry_msgs -{ - - class Polygon : public ros::Msg - { - public: - uint32_t points_length; - typedef geometry_msgs::Point32 _points_type; - _points_type st_points; - _points_type * points; - - Polygon(): - points_length(0), points(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->points_length); - for( uint32_t i = 0; i < points_length; i++){ - offset += this->points[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); - points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->points_length); - if(points_lengthT > points_length) - this->points = (geometry_msgs::Point32*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point32)); - points_length = points_lengthT; - for( uint32_t i = 0; i < points_length; i++){ - offset += this->st_points.deserialize(inbuffer + offset); - memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point32)); - } - return offset; - } - - const char * getType(){ return "geometry_msgs/Polygon"; }; - const char * getMD5(){ return "cd60a26494a087f577976f0329fa120e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/PolygonStamped.h b/arduino/ros_lib/geometry_msgs/PolygonStamped.h deleted file mode 100644 index badc359..0000000 --- a/arduino/ros_lib/geometry_msgs/PolygonStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_PolygonStamped_h -#define _ROS_geometry_msgs_PolygonStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Polygon.h" - -namespace geometry_msgs -{ - - class PolygonStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Polygon _polygon_type; - _polygon_type polygon; - - PolygonStamped(): - header(), - polygon() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->polygon.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->polygon.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/PolygonStamped"; }; - const char * getMD5(){ return "c6be8f7dc3bee7fe9e8d296070f53340"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Pose.h b/arduino/ros_lib/geometry_msgs/Pose.h deleted file mode 100644 index 70f986b..0000000 --- a/arduino/ros_lib/geometry_msgs/Pose.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_Pose_h -#define _ROS_geometry_msgs_Pose_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Point.h" -#include "geometry_msgs/Quaternion.h" - -namespace geometry_msgs -{ - - class Pose : public ros::Msg - { - public: - typedef geometry_msgs::Point _position_type; - _position_type position; - typedef geometry_msgs::Quaternion _orientation_type; - _orientation_type orientation; - - Pose(): - position(), - orientation() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->position.serialize(outbuffer + offset); - offset += this->orientation.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->position.deserialize(inbuffer + offset); - offset += this->orientation.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/Pose"; }; - const char * getMD5(){ return "e45d45a5a1ce597b249e23fb30fc871f"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Pose2D.h b/arduino/ros_lib/geometry_msgs/Pose2D.h deleted file mode 100644 index fa2420e..0000000 --- a/arduino/ros_lib/geometry_msgs/Pose2D.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _ROS_geometry_msgs_Pose2D_h -#define _ROS_geometry_msgs_Pose2D_h - -#include -#include -#include -#include "ros/msg.h" - -namespace geometry_msgs -{ - - class Pose2D : public ros::Msg - { - public: - typedef float _x_type; - _x_type x; - typedef float _y_type; - _y_type y; - typedef float _theta_type; - _theta_type theta; - - Pose2D(): - x(0), - y(0), - theta(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->x); - offset += serializeAvrFloat64(outbuffer + offset, this->y); - offset += serializeAvrFloat64(outbuffer + offset, this->theta); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->x)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->y)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->theta)); - return offset; - } - - const char * getType(){ return "geometry_msgs/Pose2D"; }; - const char * getMD5(){ return "938fa65709584ad8e77d238529be13b8"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/PoseArray.h b/arduino/ros_lib/geometry_msgs/PoseArray.h deleted file mode 100644 index 9e6a89e..0000000 --- a/arduino/ros_lib/geometry_msgs/PoseArray.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _ROS_geometry_msgs_PoseArray_h -#define _ROS_geometry_msgs_PoseArray_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Pose.h" - -namespace geometry_msgs -{ - - class PoseArray : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t poses_length; - typedef geometry_msgs::Pose _poses_type; - _poses_type st_poses; - _poses_type * poses; - - PoseArray(): - header(), - poses_length(0), poses(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->poses_length); - for( uint32_t i = 0; i < poses_length; i++){ - offset += this->poses[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); - poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->poses_length); - if(poses_lengthT > poses_length) - this->poses = (geometry_msgs::Pose*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::Pose)); - poses_length = poses_lengthT; - for( uint32_t i = 0; i < poses_length; i++){ - offset += this->st_poses.deserialize(inbuffer + offset); - memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::Pose)); - } - return offset; - } - - const char * getType(){ return "geometry_msgs/PoseArray"; }; - const char * getMD5(){ return "916c28c5764443f268b296bb671b9d97"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/PoseStamped.h b/arduino/ros_lib/geometry_msgs/PoseStamped.h deleted file mode 100644 index cb79251..0000000 --- a/arduino/ros_lib/geometry_msgs/PoseStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_PoseStamped_h -#define _ROS_geometry_msgs_PoseStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Pose.h" - -namespace geometry_msgs -{ - - class PoseStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Pose _pose_type; - _pose_type pose; - - PoseStamped(): - header(), - pose() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->pose.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->pose.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/PoseStamped"; }; - const char * getMD5(){ return "d3812c3cbc69362b77dc0b19b345f8f5"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/PoseWithCovariance.h b/arduino/ros_lib/geometry_msgs/PoseWithCovariance.h deleted file mode 100644 index 8e8969a..0000000 --- a/arduino/ros_lib/geometry_msgs/PoseWithCovariance.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef _ROS_geometry_msgs_PoseWithCovariance_h -#define _ROS_geometry_msgs_PoseWithCovariance_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Pose.h" - -namespace geometry_msgs -{ - - class PoseWithCovariance : public ros::Msg - { - public: - typedef geometry_msgs::Pose _pose_type; - _pose_type pose; - float covariance[36]; - - PoseWithCovariance(): - pose(), - covariance() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->pose.serialize(outbuffer + offset); - for( uint32_t i = 0; i < 36; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->covariance[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->pose.deserialize(inbuffer + offset); - for( uint32_t i = 0; i < 36; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->covariance[i])); - } - return offset; - } - - const char * getType(){ return "geometry_msgs/PoseWithCovariance"; }; - const char * getMD5(){ return "c23e848cf1b7533a8d7c259073a97e6f"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h b/arduino/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h deleted file mode 100644 index db623cd..0000000 --- a/arduino/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_PoseWithCovarianceStamped_h -#define _ROS_geometry_msgs_PoseWithCovarianceStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/PoseWithCovariance.h" - -namespace geometry_msgs -{ - - class PoseWithCovarianceStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::PoseWithCovariance _pose_type; - _pose_type pose; - - PoseWithCovarianceStamped(): - header(), - pose() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->pose.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->pose.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/PoseWithCovarianceStamped"; }; - const char * getMD5(){ return "953b798c0f514ff060a53a3498ce6246"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Quaternion.h b/arduino/ros_lib/geometry_msgs/Quaternion.h deleted file mode 100644 index fa69bce..0000000 --- a/arduino/ros_lib/geometry_msgs/Quaternion.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _ROS_geometry_msgs_Quaternion_h -#define _ROS_geometry_msgs_Quaternion_h - -#include -#include -#include -#include "ros/msg.h" - -namespace geometry_msgs -{ - - class Quaternion : public ros::Msg - { - public: - typedef float _x_type; - _x_type x; - typedef float _y_type; - _y_type y; - typedef float _z_type; - _z_type z; - typedef float _w_type; - _w_type w; - - Quaternion(): - x(0), - y(0), - z(0), - w(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->x); - offset += serializeAvrFloat64(outbuffer + offset, this->y); - offset += serializeAvrFloat64(outbuffer + offset, this->z); - offset += serializeAvrFloat64(outbuffer + offset, this->w); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->x)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->y)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->z)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->w)); - return offset; - } - - const char * getType(){ return "geometry_msgs/Quaternion"; }; - const char * getMD5(){ return "a779879fadf0160734f906b8c19c7004"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/QuaternionStamped.h b/arduino/ros_lib/geometry_msgs/QuaternionStamped.h deleted file mode 100644 index 626358d..0000000 --- a/arduino/ros_lib/geometry_msgs/QuaternionStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_QuaternionStamped_h -#define _ROS_geometry_msgs_QuaternionStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Quaternion.h" - -namespace geometry_msgs -{ - - class QuaternionStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Quaternion _quaternion_type; - _quaternion_type quaternion; - - QuaternionStamped(): - header(), - quaternion() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->quaternion.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->quaternion.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/QuaternionStamped"; }; - const char * getMD5(){ return "e57f1e547e0e1fd13504588ffc8334e2"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Transform.h b/arduino/ros_lib/geometry_msgs/Transform.h deleted file mode 100644 index 27a9944..0000000 --- a/arduino/ros_lib/geometry_msgs/Transform.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_Transform_h -#define _ROS_geometry_msgs_Transform_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Vector3.h" -#include "geometry_msgs/Quaternion.h" - -namespace geometry_msgs -{ - - class Transform : public ros::Msg - { - public: - typedef geometry_msgs::Vector3 _translation_type; - _translation_type translation; - typedef geometry_msgs::Quaternion _rotation_type; - _rotation_type rotation; - - Transform(): - translation(), - rotation() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->translation.serialize(outbuffer + offset); - offset += this->rotation.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->translation.deserialize(inbuffer + offset); - offset += this->rotation.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/Transform"; }; - const char * getMD5(){ return "ac9eff44abf714214112b05d54a3cf9b"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/TransformStamped.h b/arduino/ros_lib/geometry_msgs/TransformStamped.h deleted file mode 100644 index b197b54..0000000 --- a/arduino/ros_lib/geometry_msgs/TransformStamped.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef _ROS_geometry_msgs_TransformStamped_h -#define _ROS_geometry_msgs_TransformStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Transform.h" - -namespace geometry_msgs -{ - - class TransformStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef const char* _child_frame_id_type; - _child_frame_id_type child_frame_id; - typedef geometry_msgs::Transform _transform_type; - _transform_type transform; - - TransformStamped(): - header(), - child_frame_id(""), - transform() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - uint32_t length_child_frame_id = strlen(this->child_frame_id); - varToArr(outbuffer + offset, length_child_frame_id); - offset += 4; - memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id); - offset += length_child_frame_id; - offset += this->transform.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t length_child_frame_id; - arrToVar(length_child_frame_id, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_child_frame_id-1]=0; - this->child_frame_id = (char *)(inbuffer + offset-1); - offset += length_child_frame_id; - offset += this->transform.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/TransformStamped"; }; - const char * getMD5(){ return "b5764a33bfeb3588febc2682852579b0"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Twist.h b/arduino/ros_lib/geometry_msgs/Twist.h deleted file mode 100644 index 026dae0..0000000 --- a/arduino/ros_lib/geometry_msgs/Twist.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef _ROS_geometry_msgs_Twist_h -#define _ROS_geometry_msgs_Twist_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Vector3.h" - -namespace geometry_msgs -{ - - class Twist : public ros::Msg - { - public: - typedef geometry_msgs::Vector3 _linear_type; - _linear_type linear; - typedef geometry_msgs::Vector3 _angular_type; - _angular_type angular; - - Twist(): - linear(), - angular() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->linear.serialize(outbuffer + offset); - offset += this->angular.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->linear.deserialize(inbuffer + offset); - offset += this->angular.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/Twist"; }; - const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/TwistStamped.h b/arduino/ros_lib/geometry_msgs/TwistStamped.h deleted file mode 100644 index 40143c8..0000000 --- a/arduino/ros_lib/geometry_msgs/TwistStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_TwistStamped_h -#define _ROS_geometry_msgs_TwistStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Twist.h" - -namespace geometry_msgs -{ - - class TwistStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Twist _twist_type; - _twist_type twist; - - TwistStamped(): - header(), - twist() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->twist.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->twist.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/TwistStamped"; }; - const char * getMD5(){ return "98d34b0043a2093cf9d9345ab6eef12e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/TwistWithCovariance.h b/arduino/ros_lib/geometry_msgs/TwistWithCovariance.h deleted file mode 100644 index 500b6ba..0000000 --- a/arduino/ros_lib/geometry_msgs/TwistWithCovariance.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef _ROS_geometry_msgs_TwistWithCovariance_h -#define _ROS_geometry_msgs_TwistWithCovariance_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Twist.h" - -namespace geometry_msgs -{ - - class TwistWithCovariance : public ros::Msg - { - public: - typedef geometry_msgs::Twist _twist_type; - _twist_type twist; - float covariance[36]; - - TwistWithCovariance(): - twist(), - covariance() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->twist.serialize(outbuffer + offset); - for( uint32_t i = 0; i < 36; i++){ - offset += serializeAvrFloat64(outbuffer + offset, this->covariance[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->twist.deserialize(inbuffer + offset); - for( uint32_t i = 0; i < 36; i++){ - offset += deserializeAvrFloat64(inbuffer + offset, &(this->covariance[i])); - } - return offset; - } - - const char * getType(){ return "geometry_msgs/TwistWithCovariance"; }; - const char * getMD5(){ return "1fe8a28e6890a4cc3ae4c3ca5c7d82e6"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h b/arduino/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h deleted file mode 100644 index 701edff..0000000 --- a/arduino/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_TwistWithCovarianceStamped_h -#define _ROS_geometry_msgs_TwistWithCovarianceStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/TwistWithCovariance.h" - -namespace geometry_msgs -{ - - class TwistWithCovarianceStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::TwistWithCovariance _twist_type; - _twist_type twist; - - TwistWithCovarianceStamped(): - header(), - twist() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->twist.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->twist.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/TwistWithCovarianceStamped"; }; - const char * getMD5(){ return "8927a1a12fb2607ceea095b2dc440a96"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Vector3.h b/arduino/ros_lib/geometry_msgs/Vector3.h deleted file mode 100644 index fbad02e..0000000 --- a/arduino/ros_lib/geometry_msgs/Vector3.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _ROS_geometry_msgs_Vector3_h -#define _ROS_geometry_msgs_Vector3_h - -#include -#include -#include -#include "ros/msg.h" - -namespace geometry_msgs -{ - - class Vector3 : public ros::Msg - { - public: - typedef float _x_type; - _x_type x; - typedef float _y_type; - _y_type y; - typedef float _z_type; - _z_type z; - - Vector3(): - x(0), - y(0), - z(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->x); - offset += serializeAvrFloat64(outbuffer + offset, this->y); - offset += serializeAvrFloat64(outbuffer + offset, this->z); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->x)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->y)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->z)); - return offset; - } - - const char * getType(){ return "geometry_msgs/Vector3"; }; - const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Vector3Stamped.h b/arduino/ros_lib/geometry_msgs/Vector3Stamped.h deleted file mode 100644 index 9032066..0000000 --- a/arduino/ros_lib/geometry_msgs/Vector3Stamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_Vector3Stamped_h -#define _ROS_geometry_msgs_Vector3Stamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Vector3.h" - -namespace geometry_msgs -{ - - class Vector3Stamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Vector3 _vector_type; - _vector_type vector; - - Vector3Stamped(): - header(), - vector() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->vector.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->vector.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/Vector3Stamped"; }; - const char * getMD5(){ return "7b324c7325e683bf02a9b14b01090ec7"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/Wrench.h b/arduino/ros_lib/geometry_msgs/Wrench.h deleted file mode 100644 index 52e5934..0000000 --- a/arduino/ros_lib/geometry_msgs/Wrench.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef _ROS_geometry_msgs_Wrench_h -#define _ROS_geometry_msgs_Wrench_h - -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/Vector3.h" - -namespace geometry_msgs -{ - - class Wrench : public ros::Msg - { - public: - typedef geometry_msgs::Vector3 _force_type; - _force_type force; - typedef geometry_msgs::Vector3 _torque_type; - _torque_type torque; - - Wrench(): - force(), - torque() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->force.serialize(outbuffer + offset); - offset += this->torque.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->force.deserialize(inbuffer + offset); - offset += this->torque.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/Wrench"; }; - const char * getMD5(){ return "4f539cf138b23283b520fd271b567936"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/geometry_msgs/WrenchStamped.h b/arduino/ros_lib/geometry_msgs/WrenchStamped.h deleted file mode 100644 index 41b82f9..0000000 --- a/arduino/ros_lib/geometry_msgs/WrenchStamped.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _ROS_geometry_msgs_WrenchStamped_h -#define _ROS_geometry_msgs_WrenchStamped_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Wrench.h" - -namespace geometry_msgs -{ - - class WrenchStamped : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef geometry_msgs::Wrench _wrench_type; - _wrench_type wrench; - - WrenchStamped(): - header(), - wrench() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->wrench.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->wrench.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "geometry_msgs/WrenchStamped"; }; - const char * getMD5(){ return "d78d3cb249ce23087ade7e7d0c40cfa7"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/map_msgs/GetMapROI.h b/arduino/ros_lib/map_msgs/GetMapROI.h deleted file mode 100644 index c52bf37..0000000 --- a/arduino/ros_lib/map_msgs/GetMapROI.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef _ROS_SERVICE_GetMapROI_h -#define _ROS_SERVICE_GetMapROI_h -#include -#include -#include -#include "ros/msg.h" -#include "nav_msgs/OccupancyGrid.h" - -namespace map_msgs -{ - -static const char GETMAPROI[] = "map_msgs/GetMapROI"; - - class GetMapROIRequest : public ros::Msg - { - public: - typedef float _x_type; - _x_type x; - typedef float _y_type; - _y_type y; - typedef float _l_x_type; - _l_x_type l_x; - typedef float _l_y_type; - _l_y_type l_y; - - GetMapROIRequest(): - x(0), - y(0), - l_x(0), - l_y(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->x); - offset += serializeAvrFloat64(outbuffer + offset, this->y); - offset += serializeAvrFloat64(outbuffer + offset, this->l_x); - offset += serializeAvrFloat64(outbuffer + offset, this->l_y); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->x)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->y)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->l_x)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->l_y)); - return offset; - } - - const char * getType(){ return GETMAPROI; }; - const char * getMD5(){ return "43c2ff8f45af555c0eaf070c401e9a47"; }; - - }; - - class GetMapROIResponse : public ros::Msg - { - public: - typedef nav_msgs::OccupancyGrid _sub_map_type; - _sub_map_type sub_map; - - GetMapROIResponse(): - sub_map() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->sub_map.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->sub_map.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return GETMAPROI; }; - const char * getMD5(){ return "4d1986519c00d81967d2891a606b234c"; }; - - }; - - class GetMapROI { - public: - typedef GetMapROIRequest Request; - typedef GetMapROIResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/map_msgs/GetPointMap.h b/arduino/ros_lib/map_msgs/GetPointMap.h deleted file mode 100644 index 3da8ab1..0000000 --- a/arduino/ros_lib/map_msgs/GetPointMap.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef _ROS_SERVICE_GetPointMap_h -#define _ROS_SERVICE_GetPointMap_h -#include -#include -#include -#include "ros/msg.h" -#include "sensor_msgs/PointCloud2.h" - -namespace map_msgs -{ - -static const char GETPOINTMAP[] = "map_msgs/GetPointMap"; - - class GetPointMapRequest : public ros::Msg - { - public: - - GetPointMapRequest() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return GETPOINTMAP; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class GetPointMapResponse : public ros::Msg - { - public: - typedef sensor_msgs::PointCloud2 _map_type; - _map_type map; - - GetPointMapResponse(): - map() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->map.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->map.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return GETPOINTMAP; }; - const char * getMD5(){ return "b84fbb39505086eb6a62d933c75cb7b4"; }; - - }; - - class GetPointMap { - public: - typedef GetPointMapRequest Request; - typedef GetPointMapResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/map_msgs/GetPointMapROI.h b/arduino/ros_lib/map_msgs/GetPointMapROI.h deleted file mode 100644 index 77750d4..0000000 --- a/arduino/ros_lib/map_msgs/GetPointMapROI.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef _ROS_SERVICE_GetPointMapROI_h -#define _ROS_SERVICE_GetPointMapROI_h -#include -#include -#include -#include "ros/msg.h" -#include "sensor_msgs/PointCloud2.h" - -namespace map_msgs -{ - -static const char GETPOINTMAPROI[] = "map_msgs/GetPointMapROI"; - - class GetPointMapROIRequest : public ros::Msg - { - public: - typedef float _x_type; - _x_type x; - typedef float _y_type; - _y_type y; - typedef float _z_type; - _z_type z; - typedef float _r_type; - _r_type r; - typedef float _l_x_type; - _l_x_type l_x; - typedef float _l_y_type; - _l_y_type l_y; - typedef float _l_z_type; - _l_z_type l_z; - - GetPointMapROIRequest(): - x(0), - y(0), - z(0), - r(0), - l_x(0), - l_y(0), - l_z(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += serializeAvrFloat64(outbuffer + offset, this->x); - offset += serializeAvrFloat64(outbuffer + offset, this->y); - offset += serializeAvrFloat64(outbuffer + offset, this->z); - offset += serializeAvrFloat64(outbuffer + offset, this->r); - offset += serializeAvrFloat64(outbuffer + offset, this->l_x); - offset += serializeAvrFloat64(outbuffer + offset, this->l_y); - offset += serializeAvrFloat64(outbuffer + offset, this->l_z); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->x)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->y)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->z)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->r)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->l_x)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->l_y)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->l_z)); - return offset; - } - - const char * getType(){ return GETPOINTMAPROI; }; - const char * getMD5(){ return "895f7e437a9a6dd225316872b187a303"; }; - - }; - - class GetPointMapROIResponse : public ros::Msg - { - public: - typedef sensor_msgs::PointCloud2 _sub_map_type; - _sub_map_type sub_map; - - GetPointMapROIResponse(): - sub_map() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->sub_map.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->sub_map.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return GETPOINTMAPROI; }; - const char * getMD5(){ return "313769f8b0e724525c6463336cbccd63"; }; - - }; - - class GetPointMapROI { - public: - typedef GetPointMapROIRequest Request; - typedef GetPointMapROIResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/map_msgs/OccupancyGridUpdate.h b/arduino/ros_lib/map_msgs/OccupancyGridUpdate.h deleted file mode 100644 index 23590d2..0000000 --- a/arduino/ros_lib/map_msgs/OccupancyGridUpdate.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef _ROS_map_msgs_OccupancyGridUpdate_h -#define _ROS_map_msgs_OccupancyGridUpdate_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" - -namespace map_msgs -{ - - class OccupancyGridUpdate : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef int32_t _x_type; - _x_type x; - typedef int32_t _y_type; - _y_type y; - typedef uint32_t _width_type; - _width_type width; - typedef uint32_t _height_type; - _height_type height; - uint32_t data_length; - typedef int8_t _data_type; - _data_type st_data; - _data_type * data; - - OccupancyGridUpdate(): - header(), - x(0), - y(0), - width(0), - height(0), - data_length(0), data(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - union { - int32_t real; - uint32_t base; - } u_x; - u_x.real = this->x; - *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->x); - union { - int32_t real; - uint32_t base; - } u_y; - u_y.real = this->y; - *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->y); - *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; - offset += sizeof(this->width); - *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; - offset += sizeof(this->height); - *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->data_length); - for( uint32_t i = 0; i < data_length; i++){ - union { - int8_t real; - uint8_t base; - } u_datai; - u_datai.real = this->data[i]; - *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->data[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - union { - int32_t real; - uint32_t base; - } u_x; - u_x.base = 0; - u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->x = u_x.real; - offset += sizeof(this->x); - union { - int32_t real; - uint32_t base; - } u_y; - u_y.base = 0; - u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->y = u_y.real; - offset += sizeof(this->y); - this->width = ((uint32_t) (*(inbuffer + offset))); - this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->width); - this->height = ((uint32_t) (*(inbuffer + offset))); - this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->height); - uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); - data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->data_length); - if(data_lengthT > data_length) - this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); - data_length = data_lengthT; - for( uint32_t i = 0; i < data_length; i++){ - union { - int8_t real; - uint8_t base; - } u_st_data; - u_st_data.base = 0; - u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->st_data = u_st_data.real; - offset += sizeof(this->st_data); - memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); - } - return offset; - } - - const char * getType(){ return "map_msgs/OccupancyGridUpdate"; }; - const char * getMD5(){ return "b295be292b335c34718bd939deebe1c9"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/map_msgs/PointCloud2Update.h b/arduino/ros_lib/map_msgs/PointCloud2Update.h deleted file mode 100644 index eee4cb1..0000000 --- a/arduino/ros_lib/map_msgs/PointCloud2Update.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef _ROS_map_msgs_PointCloud2Update_h -#define _ROS_map_msgs_PointCloud2Update_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "sensor_msgs/PointCloud2.h" - -namespace map_msgs -{ - - class PointCloud2Update : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef uint32_t _type_type; - _type_type type; - typedef sensor_msgs::PointCloud2 _points_type; - _points_type points; - enum { ADD = 0 }; - enum { DELETE = 1 }; - - PointCloud2Update(): - header(), - type(0), - points() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->type >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->type >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->type >> (8 * 3)) & 0xFF; - offset += sizeof(this->type); - offset += this->points.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - this->type = ((uint32_t) (*(inbuffer + offset))); - this->type |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->type |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->type |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->type); - offset += this->points.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "map_msgs/PointCloud2Update"; }; - const char * getMD5(){ return "6c58e4f249ae9cd2b24fb1ee0f99195e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/map_msgs/ProjectedMap.h b/arduino/ros_lib/map_msgs/ProjectedMap.h deleted file mode 100644 index 5201861..0000000 --- a/arduino/ros_lib/map_msgs/ProjectedMap.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _ROS_map_msgs_ProjectedMap_h -#define _ROS_map_msgs_ProjectedMap_h - -#include -#include -#include -#include "ros/msg.h" -#include "nav_msgs/OccupancyGrid.h" - -namespace map_msgs -{ - - class ProjectedMap : public ros::Msg - { - public: - typedef nav_msgs::OccupancyGrid _map_type; - _map_type map; - typedef float _min_z_type; - _min_z_type min_z; - typedef float _max_z_type; - _max_z_type max_z; - - ProjectedMap(): - map(), - min_z(0), - max_z(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->map.serialize(outbuffer + offset); - offset += serializeAvrFloat64(outbuffer + offset, this->min_z); - offset += serializeAvrFloat64(outbuffer + offset, this->max_z); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->map.deserialize(inbuffer + offset); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->min_z)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->max_z)); - return offset; - } - - const char * getType(){ return "map_msgs/ProjectedMap"; }; - const char * getMD5(){ return "7bbe8f96e45089681dc1ea7d023cbfca"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/map_msgs/ProjectedMapInfo.h b/arduino/ros_lib/map_msgs/ProjectedMapInfo.h deleted file mode 100644 index 378bf23..0000000 --- a/arduino/ros_lib/map_msgs/ProjectedMapInfo.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef _ROS_map_msgs_ProjectedMapInfo_h -#define _ROS_map_msgs_ProjectedMapInfo_h - -#include -#include -#include -#include "ros/msg.h" - -namespace map_msgs -{ - - class ProjectedMapInfo : public ros::Msg - { - public: - typedef const char* _frame_id_type; - _frame_id_type frame_id; - typedef float _x_type; - _x_type x; - typedef float _y_type; - _y_type y; - typedef float _width_type; - _width_type width; - typedef float _height_type; - _height_type height; - typedef float _min_z_type; - _min_z_type min_z; - typedef float _max_z_type; - _max_z_type max_z; - - ProjectedMapInfo(): - frame_id(""), - x(0), - y(0), - width(0), - height(0), - min_z(0), - max_z(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - uint32_t length_frame_id = strlen(this->frame_id); - varToArr(outbuffer + offset, length_frame_id); - offset += 4; - memcpy(outbuffer + offset, this->frame_id, length_frame_id); - offset += length_frame_id; - offset += serializeAvrFloat64(outbuffer + offset, this->x); - offset += serializeAvrFloat64(outbuffer + offset, this->y); - offset += serializeAvrFloat64(outbuffer + offset, this->width); - offset += serializeAvrFloat64(outbuffer + offset, this->height); - offset += serializeAvrFloat64(outbuffer + offset, this->min_z); - offset += serializeAvrFloat64(outbuffer + offset, this->max_z); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t length_frame_id; - arrToVar(length_frame_id, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_frame_id; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_frame_id-1]=0; - this->frame_id = (char *)(inbuffer + offset-1); - offset += length_frame_id; - offset += deserializeAvrFloat64(inbuffer + offset, &(this->x)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->y)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->width)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->height)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->min_z)); - offset += deserializeAvrFloat64(inbuffer + offset, &(this->max_z)); - return offset; - } - - const char * getType(){ return "map_msgs/ProjectedMapInfo"; }; - const char * getMD5(){ return "2dc10595ae94de23f22f8a6d2a0eef7a"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/map_msgs/ProjectedMapsInfo.h b/arduino/ros_lib/map_msgs/ProjectedMapsInfo.h deleted file mode 100644 index b515b94..0000000 --- a/arduino/ros_lib/map_msgs/ProjectedMapsInfo.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef _ROS_SERVICE_ProjectedMapsInfo_h -#define _ROS_SERVICE_ProjectedMapsInfo_h -#include -#include -#include -#include "ros/msg.h" -#include "map_msgs/ProjectedMapInfo.h" - -namespace map_msgs -{ - -static const char PROJECTEDMAPSINFO[] = "map_msgs/ProjectedMapsInfo"; - - class ProjectedMapsInfoRequest : public ros::Msg - { - public: - uint32_t projected_maps_info_length; - typedef map_msgs::ProjectedMapInfo _projected_maps_info_type; - _projected_maps_info_type st_projected_maps_info; - _projected_maps_info_type * projected_maps_info; - - ProjectedMapsInfoRequest(): - projected_maps_info_length(0), projected_maps_info(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->projected_maps_info_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->projected_maps_info_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->projected_maps_info_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->projected_maps_info_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->projected_maps_info_length); - for( uint32_t i = 0; i < projected_maps_info_length; i++){ - offset += this->projected_maps_info[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t projected_maps_info_lengthT = ((uint32_t) (*(inbuffer + offset))); - projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->projected_maps_info_length); - if(projected_maps_info_lengthT > projected_maps_info_length) - this->projected_maps_info = (map_msgs::ProjectedMapInfo*)realloc(this->projected_maps_info, projected_maps_info_lengthT * sizeof(map_msgs::ProjectedMapInfo)); - projected_maps_info_length = projected_maps_info_lengthT; - for( uint32_t i = 0; i < projected_maps_info_length; i++){ - offset += this->st_projected_maps_info.deserialize(inbuffer + offset); - memcpy( &(this->projected_maps_info[i]), &(this->st_projected_maps_info), sizeof(map_msgs::ProjectedMapInfo)); - } - return offset; - } - - const char * getType(){ return PROJECTEDMAPSINFO; }; - const char * getMD5(){ return "d7980a33202421c8cd74565e57a4d229"; }; - - }; - - class ProjectedMapsInfoResponse : public ros::Msg - { - public: - - ProjectedMapsInfoResponse() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return PROJECTEDMAPSINFO; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class ProjectedMapsInfo { - public: - typedef ProjectedMapsInfoRequest Request; - typedef ProjectedMapsInfoResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/map_msgs/SaveMap.h b/arduino/ros_lib/map_msgs/SaveMap.h deleted file mode 100644 index c304c22..0000000 --- a/arduino/ros_lib/map_msgs/SaveMap.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef _ROS_SERVICE_SaveMap_h -#define _ROS_SERVICE_SaveMap_h -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/String.h" - -namespace map_msgs -{ - -static const char SAVEMAP[] = "map_msgs/SaveMap"; - - class SaveMapRequest : public ros::Msg - { - public: - typedef std_msgs::String _filename_type; - _filename_type filename; - - SaveMapRequest(): - filename() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->filename.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->filename.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return SAVEMAP; }; - const char * getMD5(){ return "716e25f9d9dc76ceba197f93cbf05dc7"; }; - - }; - - class SaveMapResponse : public ros::Msg - { - public: - - SaveMapResponse() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return SAVEMAP; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class SaveMap { - public: - typedef SaveMapRequest Request; - typedef SaveMapResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/map_msgs/SetMapProjections.h b/arduino/ros_lib/map_msgs/SetMapProjections.h deleted file mode 100644 index 1ead172..0000000 --- a/arduino/ros_lib/map_msgs/SetMapProjections.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef _ROS_SERVICE_SetMapProjections_h -#define _ROS_SERVICE_SetMapProjections_h -#include -#include -#include -#include "ros/msg.h" -#include "map_msgs/ProjectedMapInfo.h" - -namespace map_msgs -{ - -static const char SETMAPPROJECTIONS[] = "map_msgs/SetMapProjections"; - - class SetMapProjectionsRequest : public ros::Msg - { - public: - - SetMapProjectionsRequest() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return SETMAPPROJECTIONS; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class SetMapProjectionsResponse : public ros::Msg - { - public: - uint32_t projected_maps_info_length; - typedef map_msgs::ProjectedMapInfo _projected_maps_info_type; - _projected_maps_info_type st_projected_maps_info; - _projected_maps_info_type * projected_maps_info; - - SetMapProjectionsResponse(): - projected_maps_info_length(0), projected_maps_info(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->projected_maps_info_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->projected_maps_info_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->projected_maps_info_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->projected_maps_info_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->projected_maps_info_length); - for( uint32_t i = 0; i < projected_maps_info_length; i++){ - offset += this->projected_maps_info[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t projected_maps_info_lengthT = ((uint32_t) (*(inbuffer + offset))); - projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->projected_maps_info_length); - if(projected_maps_info_lengthT > projected_maps_info_length) - this->projected_maps_info = (map_msgs::ProjectedMapInfo*)realloc(this->projected_maps_info, projected_maps_info_lengthT * sizeof(map_msgs::ProjectedMapInfo)); - projected_maps_info_length = projected_maps_info_lengthT; - for( uint32_t i = 0; i < projected_maps_info_length; i++){ - offset += this->st_projected_maps_info.deserialize(inbuffer + offset); - memcpy( &(this->projected_maps_info[i]), &(this->st_projected_maps_info), sizeof(map_msgs::ProjectedMapInfo)); - } - return offset; - } - - const char * getType(){ return SETMAPPROJECTIONS; }; - const char * getMD5(){ return "d7980a33202421c8cd74565e57a4d229"; }; - - }; - - class SetMapProjections { - public: - typedef SetMapProjectionsRequest Request; - typedef SetMapProjectionsResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/nav_msgs/GetMap.h b/arduino/ros_lib/nav_msgs/GetMap.h deleted file mode 100644 index ef7e3fa..0000000 --- a/arduino/ros_lib/nav_msgs/GetMap.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef _ROS_SERVICE_GetMap_h -#define _ROS_SERVICE_GetMap_h -#include -#include -#include -#include "ros/msg.h" -#include "nav_msgs/OccupancyGrid.h" - -namespace nav_msgs -{ - -static const char GETMAP[] = "nav_msgs/GetMap"; - - class GetMapRequest : public ros::Msg - { - public: - - GetMapRequest() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return GETMAP; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - - class GetMapResponse : public ros::Msg - { - public: - typedef nav_msgs::OccupancyGrid _map_type; - _map_type map; - - GetMapResponse(): - map() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->map.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->map.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return GETMAP; }; - const char * getMD5(){ return "6cdd0a18e0aff5b0a3ca2326a89b54ff"; }; - - }; - - class GetMap { - public: - typedef GetMapRequest Request; - typedef GetMapResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/nav_msgs/GetMapAction.h b/arduino/ros_lib/nav_msgs/GetMapAction.h deleted file mode 100644 index 56e8299..0000000 --- a/arduino/ros_lib/nav_msgs/GetMapAction.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_nav_msgs_GetMapAction_h -#define _ROS_nav_msgs_GetMapAction_h - -#include -#include -#include -#include "ros/msg.h" -#include "nav_msgs/GetMapActionGoal.h" -#include "nav_msgs/GetMapActionResult.h" -#include "nav_msgs/GetMapActionFeedback.h" - -namespace nav_msgs -{ - - class GetMapAction : public ros::Msg - { - public: - typedef nav_msgs::GetMapActionGoal _action_goal_type; - _action_goal_type action_goal; - typedef nav_msgs::GetMapActionResult _action_result_type; - _action_result_type action_result; - typedef nav_msgs::GetMapActionFeedback _action_feedback_type; - _action_feedback_type action_feedback; - - GetMapAction(): - action_goal(), - action_result(), - action_feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->action_goal.serialize(outbuffer + offset); - offset += this->action_result.serialize(outbuffer + offset); - offset += this->action_feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->action_goal.deserialize(inbuffer + offset); - offset += this->action_result.deserialize(inbuffer + offset); - offset += this->action_feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "nav_msgs/GetMapAction"; }; - const char * getMD5(){ return "e611ad23fbf237c031b7536416dc7cd7"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/GetMapActionFeedback.h b/arduino/ros_lib/nav_msgs/GetMapActionFeedback.h deleted file mode 100644 index fb60003..0000000 --- a/arduino/ros_lib/nav_msgs/GetMapActionFeedback.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_nav_msgs_GetMapActionFeedback_h -#define _ROS_nav_msgs_GetMapActionFeedback_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "nav_msgs/GetMapFeedback.h" - -namespace nav_msgs -{ - - class GetMapActionFeedback : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef nav_msgs::GetMapFeedback _feedback_type; - _feedback_type feedback; - - GetMapActionFeedback(): - header(), - status(), - feedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->feedback.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->feedback.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "nav_msgs/GetMapActionFeedback"; }; - const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/GetMapActionGoal.h b/arduino/ros_lib/nav_msgs/GetMapActionGoal.h deleted file mode 100644 index da4244a..0000000 --- a/arduino/ros_lib/nav_msgs/GetMapActionGoal.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_nav_msgs_GetMapActionGoal_h -#define _ROS_nav_msgs_GetMapActionGoal_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalID.h" -#include "nav_msgs/GetMapGoal.h" - -namespace nav_msgs -{ - - class GetMapActionGoal : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalID _goal_id_type; - _goal_id_type goal_id; - typedef nav_msgs::GetMapGoal _goal_type; - _goal_type goal; - - GetMapActionGoal(): - header(), - goal_id(), - goal() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->goal_id.serialize(outbuffer + offset); - offset += this->goal.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->goal_id.deserialize(inbuffer + offset); - offset += this->goal.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "nav_msgs/GetMapActionGoal"; }; - const char * getMD5(){ return "4b30be6cd12b9e72826df56b481f40e0"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/GetMapActionResult.h b/arduino/ros_lib/nav_msgs/GetMapActionResult.h deleted file mode 100644 index f614a35..0000000 --- a/arduino/ros_lib/nav_msgs/GetMapActionResult.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _ROS_nav_msgs_GetMapActionResult_h -#define _ROS_nav_msgs_GetMapActionResult_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "actionlib_msgs/GoalStatus.h" -#include "nav_msgs/GetMapResult.h" - -namespace nav_msgs -{ - - class GetMapActionResult : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef actionlib_msgs::GoalStatus _status_type; - _status_type status; - typedef nav_msgs::GetMapResult _result_type; - _result_type result; - - GetMapActionResult(): - header(), - status(), - result() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->status.serialize(outbuffer + offset); - offset += this->result.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->status.deserialize(inbuffer + offset); - offset += this->result.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "nav_msgs/GetMapActionResult"; }; - const char * getMD5(){ return "ac66e5b9a79bb4bbd33dab245236c892"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/GetMapFeedback.h b/arduino/ros_lib/nav_msgs/GetMapFeedback.h deleted file mode 100644 index e3b4560..0000000 --- a/arduino/ros_lib/nav_msgs/GetMapFeedback.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _ROS_nav_msgs_GetMapFeedback_h -#define _ROS_nav_msgs_GetMapFeedback_h - -#include -#include -#include -#include "ros/msg.h" - -namespace nav_msgs -{ - - class GetMapFeedback : public ros::Msg - { - public: - - GetMapFeedback() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return "nav_msgs/GetMapFeedback"; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/GetMapGoal.h b/arduino/ros_lib/nav_msgs/GetMapGoal.h deleted file mode 100644 index 88a17c5..0000000 --- a/arduino/ros_lib/nav_msgs/GetMapGoal.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _ROS_nav_msgs_GetMapGoal_h -#define _ROS_nav_msgs_GetMapGoal_h - -#include -#include -#include -#include "ros/msg.h" - -namespace nav_msgs -{ - - class GetMapGoal : public ros::Msg - { - public: - - GetMapGoal() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - return offset; - } - - const char * getType(){ return "nav_msgs/GetMapGoal"; }; - const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/GetMapResult.h b/arduino/ros_lib/nav_msgs/GetMapResult.h deleted file mode 100644 index 1ef8fbd..0000000 --- a/arduino/ros_lib/nav_msgs/GetMapResult.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _ROS_nav_msgs_GetMapResult_h -#define _ROS_nav_msgs_GetMapResult_h - -#include -#include -#include -#include "ros/msg.h" -#include "nav_msgs/OccupancyGrid.h" - -namespace nav_msgs -{ - - class GetMapResult : public ros::Msg - { - public: - typedef nav_msgs::OccupancyGrid _map_type; - _map_type map; - - GetMapResult(): - map() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->map.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->map.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "nav_msgs/GetMapResult"; }; - const char * getMD5(){ return "6cdd0a18e0aff5b0a3ca2326a89b54ff"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/GetPlan.h b/arduino/ros_lib/nav_msgs/GetPlan.h deleted file mode 100644 index fe312b2..0000000 --- a/arduino/ros_lib/nav_msgs/GetPlan.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef _ROS_SERVICE_GetPlan_h -#define _ROS_SERVICE_GetPlan_h -#include -#include -#include -#include "ros/msg.h" -#include "geometry_msgs/PoseStamped.h" -#include "nav_msgs/Path.h" - -namespace nav_msgs -{ - -static const char GETPLAN[] = "nav_msgs/GetPlan"; - - class GetPlanRequest : public ros::Msg - { - public: - typedef geometry_msgs::PoseStamped _start_type; - _start_type start; - typedef geometry_msgs::PoseStamped _goal_type; - _goal_type goal; - typedef float _tolerance_type; - _tolerance_type tolerance; - - GetPlanRequest(): - start(), - goal(), - tolerance(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->start.serialize(outbuffer + offset); - offset += this->goal.serialize(outbuffer + offset); - union { - float real; - uint32_t base; - } u_tolerance; - u_tolerance.real = this->tolerance; - *(outbuffer + offset + 0) = (u_tolerance.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_tolerance.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_tolerance.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_tolerance.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->tolerance); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->start.deserialize(inbuffer + offset); - offset += this->goal.deserialize(inbuffer + offset); - union { - float real; - uint32_t base; - } u_tolerance; - u_tolerance.base = 0; - u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->tolerance = u_tolerance.real; - offset += sizeof(this->tolerance); - return offset; - } - - const char * getType(){ return GETPLAN; }; - const char * getMD5(){ return "e25a43e0752bcca599a8c2eef8282df8"; }; - - }; - - class GetPlanResponse : public ros::Msg - { - public: - typedef nav_msgs::Path _plan_type; - _plan_type plan; - - GetPlanResponse(): - plan() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->plan.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->plan.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return GETPLAN; }; - const char * getMD5(){ return "0002bc113c0259d71f6cf8cbc9430e18"; }; - - }; - - class GetPlan { - public: - typedef GetPlanRequest Request; - typedef GetPlanResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/nav_msgs/GridCells.h b/arduino/ros_lib/nav_msgs/GridCells.h deleted file mode 100644 index 6c41cc6..0000000 --- a/arduino/ros_lib/nav_msgs/GridCells.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef _ROS_nav_msgs_GridCells_h -#define _ROS_nav_msgs_GridCells_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/Point.h" - -namespace nav_msgs -{ - - class GridCells : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef float _cell_width_type; - _cell_width_type cell_width; - typedef float _cell_height_type; - _cell_height_type cell_height; - uint32_t cells_length; - typedef geometry_msgs::Point _cells_type; - _cells_type st_cells; - _cells_type * cells; - - GridCells(): - header(), - cell_width(0), - cell_height(0), - cells_length(0), cells(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - union { - float real; - uint32_t base; - } u_cell_width; - u_cell_width.real = this->cell_width; - *(outbuffer + offset + 0) = (u_cell_width.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_cell_width.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_cell_width.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_cell_width.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->cell_width); - union { - float real; - uint32_t base; - } u_cell_height; - u_cell_height.real = this->cell_height; - *(outbuffer + offset + 0) = (u_cell_height.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_cell_height.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_cell_height.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_cell_height.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->cell_height); - *(outbuffer + offset + 0) = (this->cells_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->cells_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->cells_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->cells_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->cells_length); - for( uint32_t i = 0; i < cells_length; i++){ - offset += this->cells[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - union { - float real; - uint32_t base; - } u_cell_width; - u_cell_width.base = 0; - u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->cell_width = u_cell_width.real; - offset += sizeof(this->cell_width); - union { - float real; - uint32_t base; - } u_cell_height; - u_cell_height.base = 0; - u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->cell_height = u_cell_height.real; - offset += sizeof(this->cell_height); - uint32_t cells_lengthT = ((uint32_t) (*(inbuffer + offset))); - cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->cells_length); - if(cells_lengthT > cells_length) - this->cells = (geometry_msgs::Point*)realloc(this->cells, cells_lengthT * sizeof(geometry_msgs::Point)); - cells_length = cells_lengthT; - for( uint32_t i = 0; i < cells_length; i++){ - offset += this->st_cells.deserialize(inbuffer + offset); - memcpy( &(this->cells[i]), &(this->st_cells), sizeof(geometry_msgs::Point)); - } - return offset; - } - - const char * getType(){ return "nav_msgs/GridCells"; }; - const char * getMD5(){ return "b9e4f5df6d28e272ebde00a3994830f5"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/MapMetaData.h b/arduino/ros_lib/nav_msgs/MapMetaData.h deleted file mode 100644 index 47733d9..0000000 --- a/arduino/ros_lib/nav_msgs/MapMetaData.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef _ROS_nav_msgs_MapMetaData_h -#define _ROS_nav_msgs_MapMetaData_h - -#include -#include -#include -#include "ros/msg.h" -#include "ros/time.h" -#include "geometry_msgs/Pose.h" - -namespace nav_msgs -{ - - class MapMetaData : public ros::Msg - { - public: - typedef ros::Time _map_load_time_type; - _map_load_time_type map_load_time; - typedef float _resolution_type; - _resolution_type resolution; - typedef uint32_t _width_type; - _width_type width; - typedef uint32_t _height_type; - _height_type height; - typedef geometry_msgs::Pose _origin_type; - _origin_type origin; - - MapMetaData(): - map_load_time(), - resolution(0), - width(0), - height(0), - origin() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->map_load_time.sec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->map_load_time.sec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->map_load_time.sec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->map_load_time.sec >> (8 * 3)) & 0xFF; - offset += sizeof(this->map_load_time.sec); - *(outbuffer + offset + 0) = (this->map_load_time.nsec >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->map_load_time.nsec >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->map_load_time.nsec >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->map_load_time.nsec >> (8 * 3)) & 0xFF; - offset += sizeof(this->map_load_time.nsec); - union { - float real; - uint32_t base; - } u_resolution; - u_resolution.real = this->resolution; - *(outbuffer + offset + 0) = (u_resolution.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_resolution.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_resolution.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_resolution.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->resolution); - *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; - offset += sizeof(this->width); - *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; - offset += sizeof(this->height); - offset += this->origin.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - this->map_load_time.sec = ((uint32_t) (*(inbuffer + offset))); - this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->map_load_time.sec); - this->map_load_time.nsec = ((uint32_t) (*(inbuffer + offset))); - this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->map_load_time.nsec); - union { - float real; - uint32_t base; - } u_resolution; - u_resolution.base = 0; - u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->resolution = u_resolution.real; - offset += sizeof(this->resolution); - this->width = ((uint32_t) (*(inbuffer + offset))); - this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->width); - this->height = ((uint32_t) (*(inbuffer + offset))); - this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->height); - offset += this->origin.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "nav_msgs/MapMetaData"; }; - const char * getMD5(){ return "10cfc8a2818024d3248802c00c95f11b"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/OccupancyGrid.h b/arduino/ros_lib/nav_msgs/OccupancyGrid.h deleted file mode 100644 index 4205f43..0000000 --- a/arduino/ros_lib/nav_msgs/OccupancyGrid.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef _ROS_nav_msgs_OccupancyGrid_h -#define _ROS_nav_msgs_OccupancyGrid_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "nav_msgs/MapMetaData.h" - -namespace nav_msgs -{ - - class OccupancyGrid : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef nav_msgs::MapMetaData _info_type; - _info_type info; - uint32_t data_length; - typedef int8_t _data_type; - _data_type st_data; - _data_type * data; - - OccupancyGrid(): - header(), - info(), - data_length(0), data(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->info.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->data_length); - for( uint32_t i = 0; i < data_length; i++){ - union { - int8_t real; - uint8_t base; - } u_datai; - u_datai.real = this->data[i]; - *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->data[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->info.deserialize(inbuffer + offset); - uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); - data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->data_length); - if(data_lengthT > data_length) - this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); - data_length = data_lengthT; - for( uint32_t i = 0; i < data_length; i++){ - union { - int8_t real; - uint8_t base; - } u_st_data; - u_st_data.base = 0; - u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->st_data = u_st_data.real; - offset += sizeof(this->st_data); - memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); - } - return offset; - } - - const char * getType(){ return "nav_msgs/OccupancyGrid"; }; - const char * getMD5(){ return "3381f2d731d4076ec5c71b0759edbe4e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/Odometry.h b/arduino/ros_lib/nav_msgs/Odometry.h deleted file mode 100644 index ef64509..0000000 --- a/arduino/ros_lib/nav_msgs/Odometry.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef _ROS_nav_msgs_Odometry_h -#define _ROS_nav_msgs_Odometry_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/PoseWithCovariance.h" -#include "geometry_msgs/TwistWithCovariance.h" - -namespace nav_msgs -{ - - class Odometry : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef const char* _child_frame_id_type; - _child_frame_id_type child_frame_id; - typedef geometry_msgs::PoseWithCovariance _pose_type; - _pose_type pose; - typedef geometry_msgs::TwistWithCovariance _twist_type; - _twist_type twist; - - Odometry(): - header(), - child_frame_id(""), - pose(), - twist() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - uint32_t length_child_frame_id = strlen(this->child_frame_id); - varToArr(outbuffer + offset, length_child_frame_id); - offset += 4; - memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id); - offset += length_child_frame_id; - offset += this->pose.serialize(outbuffer + offset); - offset += this->twist.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t length_child_frame_id; - arrToVar(length_child_frame_id, (inbuffer + offset)); - offset += 4; - for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){ - inbuffer[k-1]=inbuffer[k]; - } - inbuffer[offset+length_child_frame_id-1]=0; - this->child_frame_id = (char *)(inbuffer + offset-1); - offset += length_child_frame_id; - offset += this->pose.deserialize(inbuffer + offset); - offset += this->twist.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return "nav_msgs/Odometry"; }; - const char * getMD5(){ return "cd5e73d190d741a2f92e81eda573aca7"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/Path.h b/arduino/ros_lib/nav_msgs/Path.h deleted file mode 100644 index 8587706..0000000 --- a/arduino/ros_lib/nav_msgs/Path.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _ROS_nav_msgs_Path_h -#define _ROS_nav_msgs_Path_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "geometry_msgs/PoseStamped.h" - -namespace nav_msgs -{ - - class Path : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t poses_length; - typedef geometry_msgs::PoseStamped _poses_type; - _poses_type st_poses; - _poses_type * poses; - - Path(): - header(), - poses_length(0), poses(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->poses_length); - for( uint32_t i = 0; i < poses_length; i++){ - offset += this->poses[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); - poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->poses_length); - if(poses_lengthT > poses_length) - this->poses = (geometry_msgs::PoseStamped*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::PoseStamped)); - poses_length = poses_lengthT; - for( uint32_t i = 0; i < poses_length; i++){ - offset += this->st_poses.deserialize(inbuffer + offset); - memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::PoseStamped)); - } - return offset; - } - - const char * getType(){ return "nav_msgs/Path"; }; - const char * getMD5(){ return "6227e2b7e9cce15051f669a5e197bbf7"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/nav_msgs/SetMap.h b/arduino/ros_lib/nav_msgs/SetMap.h deleted file mode 100644 index 717cead..0000000 --- a/arduino/ros_lib/nav_msgs/SetMap.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef _ROS_SERVICE_SetMap_h -#define _ROS_SERVICE_SetMap_h -#include -#include -#include -#include "ros/msg.h" -#include "nav_msgs/OccupancyGrid.h" -#include "geometry_msgs/PoseWithCovarianceStamped.h" - -namespace nav_msgs -{ - -static const char SETMAP[] = "nav_msgs/SetMap"; - - class SetMapRequest : public ros::Msg - { - public: - typedef nav_msgs::OccupancyGrid _map_type; - _map_type map; - typedef geometry_msgs::PoseWithCovarianceStamped _initial_pose_type; - _initial_pose_type initial_pose; - - SetMapRequest(): - map(), - initial_pose() - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->map.serialize(outbuffer + offset); - offset += this->initial_pose.serialize(outbuffer + offset); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->map.deserialize(inbuffer + offset); - offset += this->initial_pose.deserialize(inbuffer + offset); - return offset; - } - - const char * getType(){ return SETMAP; }; - const char * getMD5(){ return "91149a20d7be299b87c340df8cc94fd4"; }; - - }; - - class SetMapResponse : public ros::Msg - { - public: - typedef bool _success_type; - _success_type success; - - SetMapResponse(): - success(0) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.real = this->success; - *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; - offset += sizeof(this->success); - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - union { - bool real; - uint8_t base; - } u_success; - u_success.base = 0; - u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); - this->success = u_success.real; - offset += sizeof(this->success); - return offset; - } - - const char * getType(){ return SETMAP; }; - const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; - - }; - - class SetMap { - public: - typedef SetMapRequest Request; - typedef SetMapResponse Response; - }; - -} -#endif diff --git a/arduino/ros_lib/pcl_msgs/ModelCoefficients.h b/arduino/ros_lib/pcl_msgs/ModelCoefficients.h deleted file mode 100644 index 3256a94..0000000 --- a/arduino/ros_lib/pcl_msgs/ModelCoefficients.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef _ROS_pcl_msgs_ModelCoefficients_h -#define _ROS_pcl_msgs_ModelCoefficients_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" - -namespace pcl_msgs -{ - - class ModelCoefficients : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t values_length; - typedef float _values_type; - _values_type st_values; - _values_type * values; - - ModelCoefficients(): - header(), - values_length(0), values(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->values_length); - for( uint32_t i = 0; i < values_length; i++){ - union { - float real; - uint32_t base; - } u_valuesi; - u_valuesi.real = this->values[i]; - *(outbuffer + offset + 0) = (u_valuesi.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_valuesi.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_valuesi.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_valuesi.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->values[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); - values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->values_length); - if(values_lengthT > values_length) - this->values = (float*)realloc(this->values, values_lengthT * sizeof(float)); - values_length = values_lengthT; - for( uint32_t i = 0; i < values_length; i++){ - union { - float real; - uint32_t base; - } u_st_values; - u_st_values.base = 0; - u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->st_values = u_st_values.real; - offset += sizeof(this->st_values); - memcpy( &(this->values[i]), &(this->st_values), sizeof(float)); - } - return offset; - } - - const char * getType(){ return "pcl_msgs/ModelCoefficients"; }; - const char * getMD5(){ return "ca27dea75e72cb894cd36f9e5005e93e"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/pcl_msgs/PointIndices.h b/arduino/ros_lib/pcl_msgs/PointIndices.h deleted file mode 100644 index 56feb9b..0000000 --- a/arduino/ros_lib/pcl_msgs/PointIndices.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef _ROS_pcl_msgs_PointIndices_h -#define _ROS_pcl_msgs_PointIndices_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" - -namespace pcl_msgs -{ - - class PointIndices : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - uint32_t indices_length; - typedef int32_t _indices_type; - _indices_type st_indices; - _indices_type * indices; - - PointIndices(): - header(), - indices_length(0), indices(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->indices_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->indices_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->indices_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->indices_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->indices_length); - for( uint32_t i = 0; i < indices_length; i++){ - union { - int32_t real; - uint32_t base; - } u_indicesi; - u_indicesi.real = this->indices[i]; - *(outbuffer + offset + 0) = (u_indicesi.base >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (u_indicesi.base >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (u_indicesi.base >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (u_indicesi.base >> (8 * 3)) & 0xFF; - offset += sizeof(this->indices[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - uint32_t indices_lengthT = ((uint32_t) (*(inbuffer + offset))); - indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->indices_length); - if(indices_lengthT > indices_length) - this->indices = (int32_t*)realloc(this->indices, indices_lengthT * sizeof(int32_t)); - indices_length = indices_lengthT; - for( uint32_t i = 0; i < indices_length; i++){ - union { - int32_t real; - uint32_t base; - } u_st_indices; - u_st_indices.base = 0; - u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); - u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - this->st_indices = u_st_indices.real; - offset += sizeof(this->st_indices); - memcpy( &(this->indices[i]), &(this->st_indices), sizeof(int32_t)); - } - return offset; - } - - const char * getType(){ return "pcl_msgs/PointIndices"; }; - const char * getMD5(){ return "458c7998b7eaf99908256472e273b3d4"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/pcl_msgs/PolygonMesh.h b/arduino/ros_lib/pcl_msgs/PolygonMesh.h deleted file mode 100644 index d98e4c1..0000000 --- a/arduino/ros_lib/pcl_msgs/PolygonMesh.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef _ROS_pcl_msgs_PolygonMesh_h -#define _ROS_pcl_msgs_PolygonMesh_h - -#include -#include -#include -#include "ros/msg.h" -#include "std_msgs/Header.h" -#include "sensor_msgs/PointCloud2.h" -#include "pcl_msgs/Vertices.h" - -namespace pcl_msgs -{ - - class PolygonMesh : public ros::Msg - { - public: - typedef std_msgs::Header _header_type; - _header_type header; - typedef sensor_msgs::PointCloud2 _cloud_type; - _cloud_type cloud; - uint32_t polygons_length; - typedef pcl_msgs::Vertices _polygons_type; - _polygons_type st_polygons; - _polygons_type * polygons; - - PolygonMesh(): - header(), - cloud(), - polygons_length(0), polygons(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - offset += this->header.serialize(outbuffer + offset); - offset += this->cloud.serialize(outbuffer + offset); - *(outbuffer + offset + 0) = (this->polygons_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->polygons_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->polygons_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->polygons_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->polygons_length); - for( uint32_t i = 0; i < polygons_length; i++){ - offset += this->polygons[i].serialize(outbuffer + offset); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - offset += this->header.deserialize(inbuffer + offset); - offset += this->cloud.deserialize(inbuffer + offset); - uint32_t polygons_lengthT = ((uint32_t) (*(inbuffer + offset))); - polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->polygons_length); - if(polygons_lengthT > polygons_length) - this->polygons = (pcl_msgs::Vertices*)realloc(this->polygons, polygons_lengthT * sizeof(pcl_msgs::Vertices)); - polygons_length = polygons_lengthT; - for( uint32_t i = 0; i < polygons_length; i++){ - offset += this->st_polygons.deserialize(inbuffer + offset); - memcpy( &(this->polygons[i]), &(this->st_polygons), sizeof(pcl_msgs::Vertices)); - } - return offset; - } - - const char * getType(){ return "pcl_msgs/PolygonMesh"; }; - const char * getMD5(){ return "45a5fc6ad2cde8489600a790acc9a38a"; }; - - }; - -} -#endif \ No newline at end of file diff --git a/arduino/ros_lib/pcl_msgs/Vertices.h b/arduino/ros_lib/pcl_msgs/Vertices.h deleted file mode 100644 index 55a6704..0000000 --- a/arduino/ros_lib/pcl_msgs/Vertices.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _ROS_pcl_msgs_Vertices_h -#define _ROS_pcl_msgs_Vertices_h - -#include -#include -#include -#include "ros/msg.h" - -namespace pcl_msgs -{ - - class Vertices : public ros::Msg - { - public: - uint32_t vertices_length; - typedef uint32_t _vertices_type; - _vertices_type st_vertices; - _vertices_type * vertices; - - Vertices(): - vertices_length(0), vertices(NULL) - { - } - - virtual int serialize(unsigned char *outbuffer) const - { - int offset = 0; - *(outbuffer + offset + 0) = (this->vertices_length >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->vertices_length >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->vertices_length >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->vertices_length >> (8 * 3)) & 0xFF; - offset += sizeof(this->vertices_length); - for( uint32_t i = 0; i < vertices_length; i++){ - *(outbuffer + offset + 0) = (this->vertices[i] >> (8 * 0)) & 0xFF; - *(outbuffer + offset + 1) = (this->vertices[i] >> (8 * 1)) & 0xFF; - *(outbuffer + offset + 2) = (this->vertices[i] >> (8 * 2)) & 0xFF; - *(outbuffer + offset + 3) = (this->vertices[i] >> (8 * 3)) & 0xFF; - offset += sizeof(this->vertices[i]); - } - return offset; - } - - virtual int deserialize(unsigned char *inbuffer) - { - int offset = 0; - uint32_t vertices_lengthT = ((uint32_t) (*(inbuffer + offset))); - vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->vertices_length); - if(vertices_lengthT > vertices_length) - this->vertices = (uint32_t*)realloc(this->vertices, vertices_lengthT * sizeof(uint32_t)); - vertices_length = vertices_lengthT; - for( uint32_t i = 0; i < vertices_length; i++){ - this->st_vertices = ((uint32_t) (*(inbuffer + offset))); - this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); - this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); - this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); - offset += sizeof(this->st_vertices); - memcpy( &(this->vertices[i]), &(this->st_vertices), sizeof(uint32_t)); - } - return offset; - } - - const char * getType(){ return "pcl_msgs/Vertices"; }; - const char * getMD5(){ return "39bd7b1c23763ddd1b882b97cb7cfe11"; }; - - }; - -} -#endif \ No newline at end of file