arduino代码

This commit is contained in:
astura
2026-07-18 18:22:58 +08:00
parent 2b7a320983
commit a2825ed71a
438 changed files with 36538 additions and 0 deletions
@@ -0,0 +1,52 @@
/*
* rosserial ADC Example
*
* This is a poor man's Oscilloscope. It does not have the sampling
* rate or accuracy of a commerical scope, but it is great to get
* an analog value into ROS in a pinch.
*/
#if (ARDUINO >= 100)
#include <Arduino.h>
#else
#include <WProgram.h>
#endif
#include <ros.h>
#include <rosserial_arduino/Adc.h>
ros::NodeHandle nh;
rosserial_arduino::Adc adc_msg;
ros::Publisher p("adc", &adc_msg);
void setup()
{
pinMode(13, OUTPUT);
nh.initNode();
nh.advertise(p);
}
//We average the analog reading to elminate some of the noise
int averageAnalog(int pin){
int v=0;
for(int i=0; i<4; i++) v+= analogRead(pin);
return v/4;
}
long adc_timer;
void loop()
{
adc_msg.adc0 = averageAnalog(0);
adc_msg.adc1 = averageAnalog(1);
adc_msg.adc2 = averageAnalog(2);
adc_msg.adc3 = averageAnalog(3);
adc_msg.adc4 = averageAnalog(4);
adc_msg.adc5 = averageAnalog(5);
p.publish(&adc_msg);
nh.spinOnce();
}
@@ -0,0 +1,29 @@
/*
* rosserial Subscriber Example
* Blinks an LED on callback
*/
#include <ros.h>
#include <std_msgs/Empty.h>
ros::NodeHandle nh;
void messageCb( const std_msgs::Empty& toggle_msg){
digitalWrite(13, HIGH-digitalRead(13)); // blink the led
}
ros::Subscriber<std_msgs::Empty> sub("toggle_led", &messageCb );
void setup()
{
pinMode(13, OUTPUT);
nh.initNode();
nh.subscribe(sub);
}
void loop()
{
nh.spinOnce();
delay(1);
}
@@ -0,0 +1,162 @@
/*
* RosSerial BlinkM Example
* This program shows how to control a blinkm
* from an arduino using RosSerial
*/
#include <stdlib.h>
#include <ros.h>
#include <std_msgs/String.h>
//include Wire/ twi for the BlinkM
#include <Wire.h>
extern "C" {
#include "utility/twi.h"
}
#include "BlinkM_funcs.h"
const byte blinkm_addr = 0x09; //default blinkm address
void setLED( bool solid, char color)
{
if (solid)
{
switch (color)
{
case 'w': // white
BlinkM_stopScript( blinkm_addr );
BlinkM_fadeToRGB( blinkm_addr, 0xff,0xff,0xff);
break;
case 'r': //RED
BlinkM_stopScript( blinkm_addr );
BlinkM_fadeToRGB( blinkm_addr, 0xff,0,0);
break;
case 'g':// Green
BlinkM_stopScript( blinkm_addr );
BlinkM_fadeToRGB( blinkm_addr, 0,0xff,0);
break;
case 'b':// Blue
BlinkM_stopScript( blinkm_addr );
BlinkM_fadeToRGB( blinkm_addr, 0,0,0xff);
break;
case 'c':// Cyan
BlinkM_stopScript( blinkm_addr );
BlinkM_fadeToRGB( blinkm_addr, 0,0xff,0xff);
break;
case 'm': // Magenta
BlinkM_stopScript( blinkm_addr );
BlinkM_fadeToRGB( blinkm_addr, 0xff,0,0xff);
break;
case 'y': // yellow
BlinkM_stopScript( blinkm_addr );
BlinkM_fadeToRGB( blinkm_addr, 0xff,0xff,0);
break;
default: // Black
BlinkM_stopScript( blinkm_addr );
BlinkM_fadeToRGB( blinkm_addr, 0,0,0);
break;
}
}
else
{
switch (color)
{
case 'r': // Blink Red
BlinkM_stopScript( blinkm_addr );
BlinkM_playScript( blinkm_addr, 3,0,0 );
break;
case 'w': // Blink white
BlinkM_stopScript( blinkm_addr );
BlinkM_playScript( blinkm_addr, 2,0,0 );
break;
case 'g': // Blink Green
BlinkM_stopScript( blinkm_addr );
BlinkM_playScript( blinkm_addr, 4,0,0 );
break;
case 'b': // Blink Blue
BlinkM_stopScript( blinkm_addr );
BlinkM_playScript( blinkm_addr, 5,0,0 );
break;
case 'c': //Blink Cyan
BlinkM_stopScript( blinkm_addr );
BlinkM_playScript( blinkm_addr, 6,0,0 );
break;
case 'm': //Blink Magenta
BlinkM_stopScript( blinkm_addr );
BlinkM_playScript( blinkm_addr, 7,0,0 );
break;
case 'y': //Blink Yellow
BlinkM_stopScript( blinkm_addr );
BlinkM_playScript( blinkm_addr, 8,0,0 );
break;
default: //OFF
BlinkM_stopScript( blinkm_addr );
BlinkM_playScript( blinkm_addr, 9,0,0 );
break;
}
}
}
void light_cb( const std_msgs::String& light_cmd){
bool solid =false;
char color;
if (strlen( (const char* ) light_cmd.data) ==2 ){
solid = (light_cmd.data[0] == 'S') || (light_cmd.data[0] == 's');
color = light_cmd.data[1];
}
else{
solid= false;
color = light_cmd.data[0];
}
setLED(solid, color);
}
ros::NodeHandle nh;
ros::Subscriber<std_msgs::String> sub("blinkm" , light_cb);
void setup()
{
pinMode(13, OUTPUT); //set up the LED
BlinkM_beginWithPower();
delay(100);
BlinkM_stopScript(blinkm_addr); // turn off startup script
setLED(false, 0); //turn off the led
nh.initNode();
nh.subscribe(sub);
}
void loop()
{
nh.spinOnce();
delay(1);
}
@@ -0,0 +1,440 @@
/*
* BlinkM_funcs.h -- Arduino 'library' to control BlinkM
* --------------
*
*
* Note: original version of this file lives with the BlinkMTester sketch
*
* Note: all the functions are declared 'static' because
* it saves about 1.5 kbyte in code space in final compiled sketch.
* A C++ library of this costs a 1kB more.
*
* 2007-8, Tod E. Kurt, ThingM, http://thingm.com/
*
* version: 20081101
*
* history:
* 20080101 - initial release
* 20080203 - added setStartupParam(), bugfix receiveBytes() from Dan Julio
* 20081101 - fixed to work with Arduino-0012, added MaxM commands,
* added test script read/write functions, cleaned up some functions
* 20090121 - added I2C bus scan functions, has dependencies on private
* functions inside Wire library, so might break in the future
* 20100420 - added BlinkM_startPower and _stopPower
*
*/
#include <Wire.h>
extern "C" {
#include "utility/twi.h" // from Wire library, so we can do bus scanning
}
// format of light script lines: duration, command, arg1,arg2,arg3
typedef struct _blinkm_script_line {
uint8_t dur;
uint8_t cmd[4]; // cmd,arg1,arg2,arg3
} blinkm_script_line;
// Call this first (when powering BlinkM from a power supply)
static void BlinkM_begin()
{
Wire.begin(); // join i2c bus (address optional for master)
}
/*
* actually can't do this either, because twi_init() has THREE callocs in it too
*
static void BlinkM_reset()
{
twi_init(); // can't just call Wire.begin() again because of calloc()s there
}
*/
//
// each call to twi_writeTo() should return 0 if device is there
// or other value (usually 2) if nothing is at that address
//
static void BlinkM_scanI2CBus(byte from, byte to,
void(*callback)(byte add, byte result) )
{
byte rc;
byte data = 0; // not used, just an address to feed to twi_writeTo()
for( byte addr = from; addr <= to; addr++ ) {
rc = twi_writeTo(addr, &data, 0, 1, 1);
callback( addr, rc );
}
}
//
//
static int8_t BlinkM_findFirstI2CDevice()
{
byte rc;
byte data = 0; // not used, just an address to feed to twi_writeTo()
for( byte addr=1; addr < 120; addr++ ) { // only scan addrs 1-120
rc = twi_writeTo(addr, &data, 0, 1, 1);
if( rc == 0 ) return addr; // found an address
}
return -1; // no device found in range given
}
// FIXME: make this more Arduino-like
static void BlinkM_startPowerWithPins(byte pwrpin, byte gndpin)
{
DDRC |= _BV(pwrpin) | _BV(gndpin); // make outputs
PORTC &=~ _BV(gndpin);
PORTC |= _BV(pwrpin);
}
// FIXME: make this more Arduino-like
static void BlinkM_stopPowerWithPins(byte pwrpin, byte gndpin)
{
DDRC &=~ (_BV(pwrpin) | _BV(gndpin));
}
//
static void BlinkM_startPower()
{
BlinkM_startPowerWithPins( PORTC3, PORTC2 );
}
//
static void BlinkM_stopPower()
{
BlinkM_stopPowerWithPins( PORTC3, PORTC2 );
}
// General version of BlinkM_beginWithPower().
// Call this first when BlinkM is plugged directly into Arduino
static void BlinkM_beginWithPowerPins(byte pwrpin, byte gndpin)
{
BlinkM_startPowerWithPins(pwrpin,gndpin);
delay(100); // wait for things to stabilize
Wire.begin();
}
// Call this first when BlinkM is plugged directly into Arduino
// FIXME: make this more Arduino-like
static void BlinkM_beginWithPower()
{
BlinkM_beginWithPowerPins( PORTC3, PORTC2 );
}
// sends a generic command
static void BlinkM_sendCmd(byte addr, byte* cmd, int cmdlen)
{
Wire.beginTransmission(addr);
for( byte i=0; i<cmdlen; i++)
Wire.write(cmd[i]);
Wire.endTransmission();
}
// receives generic data
// returns 0 on success, and -1 if no data available
// note: responsiblity of caller to know how many bytes to expect
static int BlinkM_receiveBytes(byte addr, byte* resp, byte len)
{
Wire.requestFrom(addr, len);
if( Wire.available() ) {
for( int i=0; i<len; i++)
resp[i] = Wire.read();
return 0;
}
return -1;
}
// Sets the I2C address of the BlinkM.
// Uses "general call" broadcast address
static void BlinkM_setAddress(byte newaddress)
{
Wire.beginTransmission(0x00); // general call (broadcast address)
Wire.write('A');
Wire.write(newaddress);
Wire.write(0xD0);
Wire.write(0x0D); // dood!
Wire.write(newaddress);
Wire.endTransmission();
delay(50); // just in case
}
// Gets the I2C address of the BlinKM
// Kind of redundant when sent to a specific address
// but uses to verify BlinkM communication
static int BlinkM_getAddress(byte addr)
{
Wire.beginTransmission(addr);
Wire.write('a');
Wire.endTransmission();
Wire.requestFrom(addr, (byte)1); // general call
if( Wire.available() ) {
byte b = Wire.read();
return b;
}
return -1;
}
// Gets the BlinkM firmware version
static int BlinkM_getVersion(byte addr)
{
Wire.beginTransmission(addr);
Wire.write('Z');
Wire.endTransmission();
Wire.requestFrom(addr, (byte)2);
if( Wire.available() ) {
byte major_ver = Wire.read();
byte minor_ver = Wire.read();
return (major_ver<<8) + minor_ver;
}
return -1;
}
// Demonstrates how to verify you're talking to a BlinkM
// and that you know its address
static int BlinkM_checkAddress(byte addr)
{
//Serial.print("Checking BlinkM address...");
int b = BlinkM_getAddress(addr);
if( b==-1 ) {
//Serial.println("No response, that's not good");
return -1; // no response
}
//Serial.print("received addr: 0x");
//Serial.print(b,HEX);
if( b != addr )
return 1; // error, addr mismatch
else
return 0; // match, everything okay
}
// Sets the speed of fading between colors.
// Higher numbers means faster fading, 255 == instantaneous fading
static void BlinkM_setFadeSpeed(byte addr, byte fadespeed)
{
Wire.beginTransmission(addr);
Wire.write('f');
Wire.write(fadespeed);
Wire.endTransmission();
}
// Sets the light script playback time adjust
// The timeadj argument is signed, and is an additive value to all
// durations in a light script. Set to zero to turn off time adjust.
static void BlinkM_setTimeAdj(byte addr, byte timeadj)
{
Wire.beginTransmission(addr);
Wire.write('t');
Wire.write(timeadj);
Wire.endTransmission();
}
// Fades to an RGB color
static void BlinkM_fadeToRGB(byte addr, byte red, byte grn, byte blu)
{
Wire.beginTransmission(addr);
Wire.write('c');
Wire.write(red);
Wire.write(grn);
Wire.write(blu);
Wire.endTransmission();
}
// Fades to an HSB color
static void BlinkM_fadeToHSB(byte addr, byte hue, byte saturation, byte brightness)
{
Wire.beginTransmission(addr);
Wire.write('h');
Wire.write(hue);
Wire.write(saturation);
Wire.write(brightness);
Wire.endTransmission();
}
// Sets an RGB color immediately
static void BlinkM_setRGB(byte addr, byte red, byte grn, byte blu)
{
Wire.beginTransmission(addr);
Wire.write('n');
Wire.write(red);
Wire.write(grn);
Wire.write(blu);
Wire.endTransmission();
}
// Fades to a random RGB color
static void BlinkM_fadeToRandomRGB(byte addr, byte rrnd, byte grnd, byte brnd)
{
Wire.beginTransmission(addr);
Wire.write('C');
Wire.write(rrnd);
Wire.write(grnd);
Wire.write(brnd);
Wire.endTransmission();
}
// Fades to a random HSB color
static void BlinkM_fadeToRandomHSB(byte addr, byte hrnd, byte srnd, byte brnd)
{
Wire.beginTransmission(addr);
Wire.write('H');
Wire.write(hrnd);
Wire.write(srnd);
Wire.write(brnd);
Wire.endTransmission();
}
//
static void BlinkM_getRGBColor(byte addr, byte* r, byte* g, byte* b)
{
Wire.beginTransmission(addr);
Wire.write('g');
Wire.endTransmission();
Wire.requestFrom(addr, (byte)3);
if( Wire.available() ) {
*r = Wire.read();
*g = Wire.read();
*b = Wire.read();
}
}
//
static void BlinkM_playScript(byte addr, byte script_id, byte reps, byte pos)
{
Wire.beginTransmission(addr);
Wire.write('p');
Wire.write(script_id);
Wire.write(reps);
Wire.write(pos);
Wire.endTransmission();
}
//
static void BlinkM_stopScript(byte addr)
{
Wire.beginTransmission(addr);
Wire.write('o');
Wire.endTransmission();
}
//
static void BlinkM_setScriptLengthReps(byte addr, byte script_id,
byte len, byte reps)
{
Wire.beginTransmission(addr);
Wire.write('L');
Wire.write(script_id);
Wire.write(len);
Wire.write(reps);
Wire.endTransmission();
}
// Fill up script_line with data from a script line
// currently only script_id = 0 works (eeprom script)
static void BlinkM_readScriptLine(byte addr, byte script_id,
byte pos, blinkm_script_line* script_line)
{
Wire.beginTransmission(addr);
Wire.write('R');
Wire.write(script_id);
Wire.write(pos);
Wire.endTransmission();
Wire.requestFrom(addr, (byte)5);
while( Wire.available() < 5 ) ; // FIXME: wait until we get 7 bytes
script_line->dur = Wire.read();
script_line->cmd[0] = Wire.read();
script_line->cmd[1] = Wire.read();
script_line->cmd[2] = Wire.read();
script_line->cmd[3] = Wire.read();
}
//
static void BlinkM_writeScriptLine(byte addr, byte script_id,
byte pos, byte dur,
byte cmd, byte arg1, byte arg2, byte arg3)
{
#ifdef BLINKM_FUNCS_DEBUG
Serial.print("writing line:"); Serial.print(pos,DEC);
Serial.print(" with cmd:"); Serial.print(cmd);
Serial.print(" arg1:"); Serial.println(arg1,HEX);
#endif
Wire.beginTransmission(addr);
Wire.write('W');
Wire.write(script_id);
Wire.write(pos);
Wire.write(dur);
Wire.write(cmd);
Wire.write(arg1);
Wire.write(arg2);
Wire.write(arg3);
Wire.endTransmission();
}
//
static void BlinkM_writeScript(byte addr, byte script_id,
byte len, byte reps,
blinkm_script_line* lines)
{
#ifdef BLINKM_FUNCS_DEBUG
Serial.print("writing script to addr:"); Serial.print(addr,DEC);
Serial.print(", script_id:"); Serial.println(script_id,DEC);
#endif
for(byte i=0; i < len; i++) {
blinkm_script_line l = lines[i];
BlinkM_writeScriptLine( addr, script_id, i, l.dur,
l.cmd[0], l.cmd[1], l.cmd[2], l.cmd[3]);
delay(20); // must wait for EEPROM to be programmed
}
BlinkM_setScriptLengthReps(addr, script_id, len, reps);
}
//
static void BlinkM_setStartupParams(byte addr, byte mode, byte script_id,
byte reps, byte fadespeed, byte timeadj)
{
Wire.beginTransmission(addr);
Wire.write('B');
Wire.write(mode); // default 0x01 == Play script
Wire.write(script_id); // default 0x00 == script #0
Wire.write(reps); // default 0x00 == repeat infinitely
Wire.write(fadespeed); // default 0x08 == usually overridden by sketch
Wire.write(timeadj); // default 0x00 == sometimes overridden by sketch
Wire.endTransmission();
}
// Gets digital inputs of the BlinkM
// returns -1 on failure
static int BlinkM_getInputsO(byte addr)
{
Wire.beginTransmission(addr);
Wire.write('i');
Wire.endTransmission();
Wire.requestFrom(addr, (byte)1);
if( Wire.available() ) {
byte b = Wire.read();
return b;
}
return -1;
}
// Gets digital inputs of the BlinkM
// stores them in passed in array
// returns -1 on failure
static int BlinkM_getInputs(byte addr, byte inputs[])
{
Wire.beginTransmission(addr);
Wire.write('i');
Wire.endTransmission();
Wire.requestFrom(addr, (byte)4);
while( Wire.available() < 4 ) ; // FIXME: wait until we get 4 bytes
inputs[0] = Wire.read();
inputs[1] = Wire.read();
inputs[2] = Wire.read();
inputs[3] = Wire.read();
return 0;
}
@@ -0,0 +1,94 @@
/*
* rosserial Clapper Example
*
* This code is a very simple example of the kinds of
* custom sensors that you can easily set up with rosserial
* and Arduino. This code uses a microphone attached to
* analog pin 5 detect two claps (2 loud sounds).
* You can use this clapper, for example, to command a robot
* in the area to come do your bidding.
*/
#if (ARDUINO >= 100)
#include <Arduino.h>
#else
#include <WProgram.h>
#endif
#include <ros.h>
#include <std_msgs/Empty.h>
ros::NodeHandle nh;
std_msgs::Empty clap_msg;
ros::Publisher p("clap", &clap_msg);
enum clapper_state { clap1, clap_one_waiting, pause, clap2};
clapper_state clap;
int volume_thresh = 200; //a clap sound needs to be:
//abs(clap_volume) > average noise + volume_thresh
int mic_pin = 5;
int adc_ave=0;
void setup()
{
pinMode(13, OUTPUT);
nh.initNode();
nh.advertise(p);
//measure the average volume of the noise in the area
for (int i =0; i<10;i++) adc_ave += analogRead(mic_pin);
adc_ave /= 10;
}
long event_timer;
void loop()
{
int mic_val = 0;
for(int i=0; i<4; i++) mic_val += analogRead(mic_pin);
mic_val = mic_val/4-adc_ave;
switch(clap){
case clap1:
if (abs(mic_val) > volume_thresh){
clap = clap_one_waiting;
event_timer = millis();
}
break;
case clap_one_waiting:
if ( (abs(mic_val) < 30) && ( (millis() - event_timer) > 20 ) )
{
clap= pause;
event_timer = millis();
}
break;
case pause: // make sure there is a pause between
// the loud sounds
if ( mic_val > volume_thresh)
{
clap = clap1;
}
else if ( (millis()-event_timer)> 60) {
clap = clap2;
event_timer = millis();
}
break;
case clap2:
if (abs(mic_val) > volume_thresh){ //we have got a double clap!
clap = clap1;
p.publish(&clap_msg);
}
else if ( (millis()-event_timer)> 200) {
clap= clap1; // no clap detected, reset state machine
}
break;
}
nh.spinOnce();
}
@@ -0,0 +1,75 @@
/*
* rosserial Publisher Example
* Prints "hello world!"
* This intend to connect to a Wifi Access Point
* and a rosserial socket server.
* You can launch the rosserial socket server with
* roslaunch rosserial_server socket.launch
* The default port is 11411
*
*/
#include <ESP8266WiFi.h>
#include <ros.h>
#include <std_msgs/String.h>
const char* ssid = "your-ssid";
const char* password = "your-password";
// Set the rosserial socket server IP address
IPAddress server(192,168,1,1);
// Set the rosserial socket server port
const uint16_t serverPort = 11411;
ros::NodeHandle nh;
// Make a chatter publisher
std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);
// Be polite and say hello
char hello[13] = "hello world!";
void setup()
{
// Use ESP8266 serial to monitor the process
Serial.begin(115200);
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
// Connect the ESP8266 the the wifi AP
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
// Set the connection to rosserial socket server
nh.getHardware()->setConnection(server, serverPort);
nh.initNode();
// Another way to get IP
Serial.print("IP = ");
Serial.println(nh.getHardware()->getLocalIP());
// Start to be polite
nh.advertise(chatter);
}
void loop()
{
if (nh.connected()) {
Serial.println("Connected");
// Say hello
str_msg.data = hello;
chatter.publish( &str_msg );
} else {
Serial.println("Not Connected");
}
nh.spinOnce();
// Loop exproximativly at 1Hz
delay(1000);
}
@@ -0,0 +1,28 @@
/*
* rosserial Publisher Example
* Prints "hello world!"
*/
#include <ros.h>
#include <std_msgs/String.h>
ros::NodeHandle nh;
std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);
char hello[13] = "hello world!";
void setup()
{
nh.initNode();
nh.advertise(chatter);
}
void loop()
{
str_msg.data = hello;
chatter.publish( &str_msg );
nh.spinOnce();
delay(1000);
}
@@ -0,0 +1,64 @@
/*
* rosserial IR Ranger Example
*
* This example is calibrated for the Sharp GP2D120XJ00F.
*/
#include <ros.h>
#include <ros/time.h>
#include <sensor_msgs/Range.h>
ros::NodeHandle nh;
sensor_msgs::Range range_msg;
ros::Publisher pub_range( "range_data", &range_msg);
const int analog_pin = 0;
unsigned long range_timer;
/*
* getRange() - samples the analog input from the ranger
* and converts it into meters.
*/
float getRange(int pin_num){
int sample;
// Get data
sample = analogRead(pin_num)/4;
// if the ADC reading is too low,
// then we are really far away from anything
if(sample < 10)
return 254; // max range
// Magic numbers to get cm
sample= 1309/(sample-3);
return (sample - 1)/100; //convert to meters
}
char frameid[] = "/ir_ranger";
void setup()
{
nh.initNode();
nh.advertise(pub_range);
range_msg.radiation_type = sensor_msgs::Range::INFRARED;
range_msg.header.frame_id = frameid;
range_msg.field_of_view = 0.01;
range_msg.min_range = 0.03;
range_msg.max_range = 0.4;
}
void loop()
{
// publish the range value every 50 milliseconds
// since it takes that long for the sensor to stabilize
if ( (millis()-range_timer) > 50){
range_msg.range = getRange(analog_pin);
range_msg.header.stamp = nh.now();
pub_range.publish(&range_msg);
range_timer = millis() + 50;
}
nh.spinOnce();
}
@@ -0,0 +1,45 @@
/*
* rosserial PubSub Example
* Prints "hello world!" and toggles led
*/
#include <ros.h>
#include <std_msgs/String.h>
#include <std_msgs/Empty.h>
ros::NodeHandle nh;
std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);
char hello[13] = "hello world!";
char debug[]= "debug statements";
char info[] = "infos";
char warn[] = "warnings";
char error[] = "errors";
char fatal[] = "fatalities";
void setup()
{
pinMode(13, OUTPUT);
nh.initNode();
nh.advertise(chatter);
}
void loop()
{
str_msg.data = hello;
chatter.publish( &str_msg );
nh.logdebug(debug);
nh.loginfo(info);
nh.logwarn(warn);
nh.logerror(error);
nh.logfatal(fatal);
nh.spinOnce();
delay(500);
}
@@ -0,0 +1,53 @@
/*
* rosserial Planar Odometry Example
*/
#include <ros.h>
#include <ros/time.h>
#include <tf/tf.h>
#include <tf/transform_broadcaster.h>
ros::NodeHandle nh;
geometry_msgs::TransformStamped t;
tf::TransformBroadcaster broadcaster;
double x = 1.0;
double y = 0.0;
double theta = 1.57;
char base_link[] = "/base_link";
char odom[] = "/odom";
void setup()
{
nh.initNode();
broadcaster.init(nh);
}
void loop()
{
// drive in a circle
double dx = 0.2;
double dtheta = 0.18;
x += cos(theta)*dx*0.1;
y += sin(theta)*dx*0.1;
theta += dtheta*0.1;
if(theta > 3.14)
theta=-3.14;
// tf odom->base_link
t.header.frame_id = odom;
t.child_frame_id = base_link;
t.transform.translation.x = x;
t.transform.translation.y = y;
t.transform.rotation = tf::createQuaternionFromYaw(theta);
t.header.stamp = nh.now();
broadcaster.sendTransform(t);
nh.spinOnce();
delay(10);
}
@@ -0,0 +1,38 @@
/*
* rosserial Service Client
*/
#include <ros.h>
#include <std_msgs/String.h>
#include <rosserial_arduino/Test.h>
ros::NodeHandle nh;
using rosserial_arduino::Test;
ros::ServiceClient<Test::Request, Test::Response> client("test_srv");
std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);
char hello[13] = "hello world!";
void setup()
{
nh.initNode();
nh.serviceClient(client);
nh.advertise(chatter);
while(!nh.connected()) nh.spinOnce();
nh.loginfo("Startup complete");
}
void loop()
{
Test::Request req;
Test::Response res;
req.input = hello;
client.call(req, res);
str_msg.data = res.output;
chatter.publish( &str_msg );
nh.spinOnce();
delay(100);
}
@@ -0,0 +1,20 @@
#!/usr/bin/env python
"""
Sample code to use with ServiceClient.pde
"""
import roslib; roslib.load_manifest("rosserial_arduino")
import rospy
from rosserial_arduino.srv import *
def callback(req):
print "The arduino is calling! Please send it a message:"
t = TestResponse()
t.output = raw_input()
return t
rospy.init_node("service_client_test")
rospy.Service("test_srv", Test, callback)
rospy.spin()
@@ -0,0 +1,40 @@
/*
* rosserial Service Server
*/
#include <ros.h>
#include <std_msgs/String.h>
#include <rosserial_arduino/Test.h>
ros::NodeHandle nh;
using rosserial_arduino::Test;
int i;
void callback(const Test::Request & req, Test::Response & res){
if((i++)%2)
res.output = "hello";
else
res.output = "world";
}
ros::ServiceServer<Test::Request, Test::Response> server("test_srv",&callback);
std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);
char hello[13] = "hello world!";
void setup()
{
nh.initNode();
nh.advertiseService(server);
nh.advertise(chatter);
}
void loop()
{
str_msg.data = hello;
chatter.publish( &str_msg );
nh.spinOnce();
delay(10);
}
@@ -0,0 +1,49 @@
/*
* rosserial Servo Control Example
*
* This sketch demonstrates the control of hobby R/C servos
* using ROS and the arduiono
*
* For the full tutorial write up, visit
* www.ros.org/wiki/rosserial_arduino_demos
*
* For more information on the Arduino Servo Library
* Checkout :
* http://www.arduino.cc/en/Reference/Servo
*/
#if (ARDUINO >= 100)
#include <Arduino.h>
#else
#include <WProgram.h>
#endif
#include <Servo.h>
#include <ros.h>
#include <std_msgs/UInt16.h>
ros::NodeHandle nh;
Servo servo;
void servo_cb( const std_msgs::UInt16& cmd_msg){
servo.write(cmd_msg.data); //set servo angle, should be from 0-180
digitalWrite(13, HIGH-digitalRead(13)); //toggle led
}
ros::Subscriber<std_msgs::UInt16> sub("servo", servo_cb);
void setup(){
pinMode(13, OUTPUT);
nh.initNode();
nh.subscribe(sub);
servo.attach(9); //attach it to pin 9
}
void loop(){
nh.spinOnce();
delay(1);
}
@@ -0,0 +1,72 @@
/*
* rosserial Temperature Sensor Example
*
* This tutorial demonstrates the usage of the
* Sparkfun TMP102 Digital Temperature Breakout board
* http://www.sparkfun.com/products/9418
*
* Source Code Based off of:
* http://wiring.org.co/learning/libraries/tmp102sparkfun.html
*/
#include <Wire.h>
#include <ros.h>
#include <std_msgs/Float32.h>
ros::NodeHandle nh;
std_msgs::Float32 temp_msg;
ros::Publisher pub_temp("temperature", &temp_msg);
// From the datasheet the BMP module address LSB distinguishes
// between read (1) and write (0) operations, corresponding to
// address 0x91 (read) and 0x90 (write).
// shift the address 1 bit right (0x91 or 0x90), the Wire library only needs the 7
// most significant bits for the address 0x91 >> 1 = 0x48
// 0x90 >> 1 = 0x48 (72)
int sensorAddress = 0x91 >> 1; // From datasheet sensor address is 0x91
// shift the address 1 bit right, the Wire library only needs the 7
// most significant bits for the address
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
nh.initNode();
nh.advertise(pub_temp);
}
long publisher_timer;
void loop()
{
if (millis() > publisher_timer) {
// step 1: request reading from sensor
Wire.requestFrom(sensorAddress,2);
delay(10);
if (2 <= Wire.available()) // if two bytes were received
{
byte msb;
byte lsb;
int temperature;
msb = Wire.read(); // receive high byte (full degrees)
lsb = Wire.read(); // receive low byte (fraction degrees)
temperature = ((msb) << 4); // MSB
temperature |= (lsb >> 4); // LSB
temp_msg.data = temperature*0.0625;
pub_temp.publish(&temp_msg);
}
publisher_timer = millis() + 1000;
}
nh.spinOnce();
}
@@ -0,0 +1,37 @@
/*
* rosserial Time and TF Example
* Publishes a transform at current time
*/
#include <ros.h>
#include <ros/time.h>
#include <tf/transform_broadcaster.h>
ros::NodeHandle nh;
geometry_msgs::TransformStamped t;
tf::TransformBroadcaster broadcaster;
char base_link[] = "/base_link";
char odom[] = "/odom";
void setup()
{
nh.initNode();
broadcaster.init(nh);
}
void loop()
{
t.header.frame_id = odom;
t.child_frame_id = base_link;
t.transform.translation.x = 1.0;
t.transform.rotation.x = 0.0;
t.transform.rotation.y = 0.0;
t.transform.rotation.z = 0.0;
t.transform.rotation.w = 1.0;
t.header.stamp = nh.now();
broadcaster.sendTransform(t);
nh.spinOnce();
delay(10);
}
@@ -0,0 +1,61 @@
/*
* rosserial Ultrasound Example
*
* This example is for the Maxbotix Ultrasound rangers.
*/
#include <ros.h>
#include <ros/time.h>
#include <sensor_msgs/Range.h>
ros::NodeHandle nh;
sensor_msgs::Range range_msg;
ros::Publisher pub_range( "/ultrasound", &range_msg);
const int adc_pin = 0;
char frameid[] = "/ultrasound";
float getRange_Ultrasound(int pin_num){
int val = 0;
for(int i=0; i<4; i++) val += analogRead(pin_num);
float range = val;
return range /322.519685; // (0.0124023437 /4) ; //cvt to meters
}
void setup()
{
nh.initNode();
nh.advertise(pub_range);
range_msg.radiation_type = sensor_msgs::Range::ULTRASOUND;
range_msg.header.frame_id = frameid;
range_msg.field_of_view = 0.1; // fake
range_msg.min_range = 0.0;
range_msg.max_range = 6.47;
pinMode(8,OUTPUT);
digitalWrite(8, LOW);
}
long range_time;
void loop()
{
//publish the adc value every 50 milliseconds
//since it takes that long for the sensor to stablize
if ( millis() >= range_time ){
int r =0;
range_msg.range = getRange_Ultrasound(5);
range_msg.header.stamp = nh.now();
pub_range.publish(&range_msg);
range_time = millis() + 50;
}
nh.spinOnce();
}
@@ -0,0 +1,61 @@
/*
* Button Example for Rosserial
*/
#include <ros.h>
#include <std_msgs/Bool.h>
ros::NodeHandle nh;
std_msgs::Bool pushed_msg;
ros::Publisher pub_button("pushed", &pushed_msg);
const int button_pin = 7;
const int led_pin = 13;
bool last_reading;
long last_debounce_time=0;
long debounce_delay=50;
bool published = true;
void setup()
{
nh.initNode();
nh.advertise(pub_button);
//initialize an LED output pin
//and a input pin for our push button
pinMode(led_pin, OUTPUT);
pinMode(button_pin, INPUT);
//Enable the pullup resistor on the button
digitalWrite(button_pin, HIGH);
//The button is a normally button
last_reading = ! digitalRead(button_pin);
}
void loop()
{
bool reading = ! digitalRead(button_pin);
if (last_reading!= reading){
last_debounce_time = millis();
published = false;
}
//if the button value has not changed for the debounce delay, we know its stable
if ( !published && (millis() - last_debounce_time) > debounce_delay) {
digitalWrite(led_pin, reading);
pushed_msg.data = reading;
pub_button.publish(&pushed_msg);
published = true;
}
last_reading = reading;
nh.spinOnce();
}
@@ -0,0 +1,40 @@
/*
* rosserial PubSub Example
* Prints "hello world!" and toggles led
*/
#include <ros.h>
#include <std_msgs/String.h>
#include <std_msgs/Empty.h>
ros::NodeHandle nh;
void messageCb( const std_msgs::Empty& toggle_msg){
digitalWrite(13, HIGH-digitalRead(13)); // blink the led
}
ros::Subscriber<std_msgs::Empty> sub("toggle_led", messageCb );
std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);
char hello[13] = "hello world!";
void setup()
{
pinMode(13, OUTPUT);
nh.initNode();
nh.advertise(chatter);
nh.subscribe(sub);
}
void loop()
{
str_msg.data = hello;
chatter.publish( &str_msg );
nh.spinOnce();
delay(500);
}
@@ -0,0 +1,49 @@
/*
* rosserial::geometry_msgs::PoseArray Test
* Sums an array, publishes sum
*/
#include <ros.h>
#include <geometry_msgs/Pose.h>
#include <geometry_msgs/PoseArray.h>
ros::NodeHandle nh;
bool set_;
geometry_msgs::Pose sum_msg;
ros::Publisher p("sum", &sum_msg);
void messageCb(const geometry_msgs::PoseArray& msg){
sum_msg.position.x = 0;
sum_msg.position.y = 0;
sum_msg.position.z = 0;
for(int i = 0; i < msg.poses_length; i++)
{
sum_msg.position.x += msg.poses[i].position.x;
sum_msg.position.y += msg.poses[i].position.y;
sum_msg.position.z += msg.poses[i].position.z;
}
digitalWrite(13, HIGH-digitalRead(13)); // blink the led
}
ros::Subscriber<geometry_msgs::PoseArray> s("poses",messageCb);
void setup()
{
pinMode(13, OUTPUT);
nh.initNode();
nh.subscribe(s);
nh.advertise(p);
}
void loop()
{
p.publish(&sum_msg);
nh.spinOnce();
delay(10);
}
@@ -0,0 +1,38 @@
/*
* rosserial::std_msgs::Float64 Test
* Receives a Float64 input, subtracts 1.0, and publishes it
*/
#include <ros.h>
#include <std_msgs/Float64.h>
ros::NodeHandle nh;
float x;
void messageCb( const std_msgs::Float64& msg){
x = msg.data - 1.0;
digitalWrite(13, HIGH-digitalRead(13)); // blink the led
}
std_msgs::Float64 test;
ros::Subscriber<std_msgs::Float64> s("your_topic", &messageCb);
ros::Publisher p("my_topic", &test);
void setup()
{
pinMode(13, OUTPUT);
nh.initNode();
nh.advertise(p);
nh.subscribe(s);
}
void loop()
{
test.data = x;
p.publish( &test );
nh.spinOnce();
delay(10);
}
@@ -0,0 +1,30 @@
/*
* rosserial::std_msgs::Time Test
* Publishes current time
*/
#include <ros.h>
#include <ros/time.h>
#include <std_msgs/Time.h>
ros::NodeHandle nh;
std_msgs::Time test;
ros::Publisher p("my_topic", &test);
void setup()
{
pinMode(13, OUTPUT);
nh.initNode();
nh.advertise(p);
}
void loop()
{
test.data = nh.now();
p.publish( &test );
nh.spinOnce();
delay(10);
}
@@ -0,0 +1,23 @@
#######################################
# Syntax Coloring Map For Rosserial
#######################################
#######################################
# Datatypes (KEYWORD1)
#######################################
Test KEYWORD1
#######################################
# Methods and Functions (KEYWORD2)
#######################################
doSomething KEYWORD2
#######################################
# Instances (KEYWORD2)
#######################################
#######################################
# Constants (LITERAL1)
#######################################
@@ -0,0 +1,10 @@
name=Rosserial Arduino Library
version=0.7.8
author=Michael Ferguson <mfergs7@gmail.com>
maintainer=Joshua Frank <frankjoshua@gmail.com>
sentence=Use an Arduino as a ROS publisher/subscriber
paragraph=Works with http://wiki.ros.org/rosserial, requires a rosserial node to connect
category=Communication
url=https://github.com/frankjoshua/rosserial_arduino_lib
architectures=avr
includes=ros.h
@@ -0,0 +1,3 @@
Use an Arduino as a ROS publisher/subscriber
Works with http://wiki.ros.org/rosserial, requires a rosserial node to connect
@@ -0,0 +1,106 @@
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2011, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Willow Garage, Inc. nor the names of its
* contributors may be used to endorse or promote prducts derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ROS_ARDUINO_HARDWARE_H_
#define ROS_ARDUINO_HARDWARE_H_
#if ARDUINO>=100
#include <Arduino.h> // Arduino 1.0
#else
#include <WProgram.h> // Arduino 0022
#endif
#if defined(__MK20DX128__) || defined(__MK20DX256__)
#include <usb_serial.h> // Teensy 3.0 and 3.1
#define SERIAL_CLASS usb_serial_class
#elif defined(_SAM3XA_)
#include <UARTClass.h> // Arduino Due
#define SERIAL_CLASS UARTClass
#elif defined(USE_USBCON)
// Arduino Leonardo USB Serial Port
#define SERIAL_CLASS Serial_
#else
#include <HardwareSerial.h> // Arduino AVR
#define SERIAL_CLASS HardwareSerial
#endif
class ArduinoHardware {
public:
ArduinoHardware(SERIAL_CLASS* io , long baud= 57600){
iostream = io;
baud_ = baud;
}
ArduinoHardware()
{
#if defined(USBCON) and !(defined(USE_USBCON))
/* Leonardo support */
iostream = &Serial1;
#else
iostream = &Serial;
#endif
baud_ = 57600;
}
ArduinoHardware(ArduinoHardware& h){
this->iostream = iostream;
this->baud_ = h.baud_;
}
void setBaud(long baud){
this->baud_= baud;
}
int getBaud(){return baud_;}
void init(){
#if defined(USE_USBCON)
// Startup delay as a fail-safe to upload a new sketch
delay(3000);
#endif
iostream->begin(baud_);
}
int read(){return iostream->read();};
void write(uint8_t* data, int length){
for(int i=0; i<length; i++)
iostream->write(data[i]);
}
unsigned long time(){return millis();}
protected:
SERIAL_CLASS* iostream;
long baud_;
};
#endif
@@ -0,0 +1,78 @@
/*
* Software License Agreement (BSD License)
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Willow Garage, Inc. nor the names of its
* contributors may be used to endorse or promote prducts derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ESP8266HARDWARE_H
#define ESP8266HARDWARE_H
#include <ESP8266WiFi.h>
class Esp8266Hardware {
public:
Esp8266Hardware()
{
}
void setConnection(IPAddress &server, int port) {
this->server = server;
this->serverPort = port;
}
IPAddress getLocalIP() {
return tcp.localIP();
}
void init() {
this->tcp.connect(this->server, this->serverPort);
}
int read() {
if (this->tcp.connected()) {
return tcp.read();
} else {
this->tcp.connect(this->server, this->serverPort);
}
return -1;
};
void write(const uint8_t* data, size_t length) {
tcp.write(data, length);
}
unsigned long time() {return millis();}
protected:
WiFiClient tcp;
IPAddress server;
uint16_t serverPort = 11411;
};
#endif // ESP8266HARDWARE_H
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TestAction_h
#define _ROS_actionlib_TestAction_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "actionlib/TestActionGoal.h"
#include "actionlib/TestActionResult.h"
#include "actionlib/TestActionFeedback.h"
namespace actionlib
{
class TestAction : public ros::Msg
{
public:
actionlib::TestActionGoal action_goal;
actionlib::TestActionResult action_result;
actionlib::TestActionFeedback action_feedback;
TestAction():
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 "actionlib/TestAction"; };
const char * getMD5(){ return "991e87a72802262dfbe5d1b3cf6efc9a"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TestActionFeedback_h
#define _ROS_actionlib_TestActionFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib/TestFeedback.h"
namespace actionlib
{
class TestActionFeedback : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib::TestFeedback feedback;
TestActionFeedback():
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 "actionlib/TestActionFeedback"; };
const char * getMD5(){ return "6d3d0bf7fb3dda24779c010a9f3eb7cb"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TestActionGoal_h
#define _ROS_actionlib_TestActionGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalID.h"
#include "actionlib/TestGoal.h"
namespace actionlib
{
class TestActionGoal : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalID goal_id;
actionlib::TestGoal goal;
TestActionGoal():
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 "actionlib/TestActionGoal"; };
const char * getMD5(){ return "348369c5b403676156094e8c159720bf"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TestActionResult_h
#define _ROS_actionlib_TestActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib/TestResult.h"
namespace actionlib
{
class TestActionResult : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib::TestResult result;
TestActionResult():
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 "actionlib/TestActionResult"; };
const char * getMD5(){ return "3d669e3a63aa986c667ea7b0f46ce85e"; };
};
}
#endif
@@ -0,0 +1,61 @@
#ifndef _ROS_actionlib_TestFeedback_h
#define _ROS_actionlib_TestFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib
{
class TestFeedback : public ros::Msg
{
public:
int32_t feedback;
TestFeedback():
feedback(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_feedback;
u_feedback.real = this->feedback;
*(outbuffer + offset + 0) = (u_feedback.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_feedback.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_feedback.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_feedback.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->feedback);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_feedback;
u_feedback.base = 0;
u_feedback.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_feedback.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_feedback.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_feedback.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->feedback = u_feedback.real;
offset += sizeof(this->feedback);
return offset;
}
const char * getType(){ return "actionlib/TestFeedback"; };
const char * getMD5(){ return "49ceb5b32ea3af22073ede4a0328249e"; };
};
}
#endif
@@ -0,0 +1,61 @@
#ifndef _ROS_actionlib_TestGoal_h
#define _ROS_actionlib_TestGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib
{
class TestGoal : public ros::Msg
{
public:
int32_t goal;
TestGoal():
goal(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_goal;
u_goal.real = this->goal;
*(outbuffer + offset + 0) = (u_goal.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_goal.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_goal.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_goal.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->goal);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_goal;
u_goal.base = 0;
u_goal.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_goal.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_goal.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_goal.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->goal = u_goal.real;
offset += sizeof(this->goal);
return offset;
}
const char * getType(){ return "actionlib/TestGoal"; };
const char * getMD5(){ return "18df0149936b7aa95588e3862476ebde"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TestRequestAction_h
#define _ROS_actionlib_TestRequestAction_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "actionlib/TestRequestActionGoal.h"
#include "actionlib/TestRequestActionResult.h"
#include "actionlib/TestRequestActionFeedback.h"
namespace actionlib
{
class TestRequestAction : public ros::Msg
{
public:
actionlib::TestRequestActionGoal action_goal;
actionlib::TestRequestActionResult action_result;
actionlib::TestRequestActionFeedback action_feedback;
TestRequestAction():
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 "actionlib/TestRequestAction"; };
const char * getMD5(){ return "dc44b1f4045dbf0d1db54423b3b86b30"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TestRequestActionFeedback_h
#define _ROS_actionlib_TestRequestActionFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib/TestRequestFeedback.h"
namespace actionlib
{
class TestRequestActionFeedback : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib::TestRequestFeedback feedback;
TestRequestActionFeedback():
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 "actionlib/TestRequestActionFeedback"; };
const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TestRequestActionGoal_h
#define _ROS_actionlib_TestRequestActionGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalID.h"
#include "actionlib/TestRequestGoal.h"
namespace actionlib
{
class TestRequestActionGoal : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalID goal_id;
actionlib::TestRequestGoal goal;
TestRequestActionGoal():
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 "actionlib/TestRequestActionGoal"; };
const char * getMD5(){ return "1889556d3fef88f821c7cb004e4251f3"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TestRequestActionResult_h
#define _ROS_actionlib_TestRequestActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib/TestRequestResult.h"
namespace actionlib
{
class TestRequestActionResult : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib::TestRequestResult result;
TestRequestActionResult():
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 "actionlib/TestRequestActionResult"; };
const char * getMD5(){ return "0476d1fdf437a3a6e7d6d0e9f5561298"; };
};
}
#endif
@@ -0,0 +1,38 @@
#ifndef _ROS_actionlib_TestRequestFeedback_h
#define _ROS_actionlib_TestRequestFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib
{
class TestRequestFeedback : public ros::Msg
{
public:
TestRequestFeedback()
{
}
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 "actionlib/TestRequestFeedback"; };
const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
};
}
#endif
@@ -0,0 +1,207 @@
#ifndef _ROS_actionlib_TestRequestGoal_h
#define _ROS_actionlib_TestRequestGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "ros/duration.h"
namespace actionlib
{
class TestRequestGoal : public ros::Msg
{
public:
int32_t terminate_status;
bool ignore_cancel;
const char* result_text;
int32_t the_result;
bool is_simple_client;
ros::Duration delay_accept;
ros::Duration delay_terminate;
ros::Duration pause_status;
enum { TERMINATE_SUCCESS = 0 };
enum { TERMINATE_ABORTED = 1 };
enum { TERMINATE_REJECTED = 2 };
enum { TERMINATE_LOSE = 3 };
enum { TERMINATE_DROP = 4 };
enum { TERMINATE_EXCEPTION = 5 };
TestRequestGoal():
terminate_status(0),
ignore_cancel(0),
result_text(""),
the_result(0),
is_simple_client(0),
delay_accept(),
delay_terminate(),
pause_status()
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_terminate_status;
u_terminate_status.real = this->terminate_status;
*(outbuffer + offset + 0) = (u_terminate_status.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_terminate_status.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_terminate_status.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_terminate_status.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->terminate_status);
union {
bool real;
uint8_t base;
} u_ignore_cancel;
u_ignore_cancel.real = this->ignore_cancel;
*(outbuffer + offset + 0) = (u_ignore_cancel.base >> (8 * 0)) & 0xFF;
offset += sizeof(this->ignore_cancel);
uint32_t length_result_text = strlen(this->result_text);
memcpy(outbuffer + offset, &length_result_text, sizeof(uint32_t));
offset += 4;
memcpy(outbuffer + offset, this->result_text, length_result_text);
offset += length_result_text;
union {
int32_t real;
uint32_t base;
} u_the_result;
u_the_result.real = this->the_result;
*(outbuffer + offset + 0) = (u_the_result.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_the_result.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_the_result.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_the_result.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->the_result);
union {
bool real;
uint8_t base;
} u_is_simple_client;
u_is_simple_client.real = this->is_simple_client;
*(outbuffer + offset + 0) = (u_is_simple_client.base >> (8 * 0)) & 0xFF;
offset += sizeof(this->is_simple_client);
*(outbuffer + offset + 0) = (this->delay_accept.sec >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (this->delay_accept.sec >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (this->delay_accept.sec >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (this->delay_accept.sec >> (8 * 3)) & 0xFF;
offset += sizeof(this->delay_accept.sec);
*(outbuffer + offset + 0) = (this->delay_accept.nsec >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (this->delay_accept.nsec >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (this->delay_accept.nsec >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (this->delay_accept.nsec >> (8 * 3)) & 0xFF;
offset += sizeof(this->delay_accept.nsec);
*(outbuffer + offset + 0) = (this->delay_terminate.sec >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (this->delay_terminate.sec >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (this->delay_terminate.sec >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (this->delay_terminate.sec >> (8 * 3)) & 0xFF;
offset += sizeof(this->delay_terminate.sec);
*(outbuffer + offset + 0) = (this->delay_terminate.nsec >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (this->delay_terminate.nsec >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (this->delay_terminate.nsec >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (this->delay_terminate.nsec >> (8 * 3)) & 0xFF;
offset += sizeof(this->delay_terminate.nsec);
*(outbuffer + offset + 0) = (this->pause_status.sec >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (this->pause_status.sec >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (this->pause_status.sec >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (this->pause_status.sec >> (8 * 3)) & 0xFF;
offset += sizeof(this->pause_status.sec);
*(outbuffer + offset + 0) = (this->pause_status.nsec >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (this->pause_status.nsec >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (this->pause_status.nsec >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (this->pause_status.nsec >> (8 * 3)) & 0xFF;
offset += sizeof(this->pause_status.nsec);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_terminate_status;
u_terminate_status.base = 0;
u_terminate_status.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_terminate_status.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_terminate_status.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_terminate_status.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->terminate_status = u_terminate_status.real;
offset += sizeof(this->terminate_status);
union {
bool real;
uint8_t base;
} u_ignore_cancel;
u_ignore_cancel.base = 0;
u_ignore_cancel.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
this->ignore_cancel = u_ignore_cancel.real;
offset += sizeof(this->ignore_cancel);
uint32_t length_result_text;
memcpy(&length_result_text, (inbuffer + offset), sizeof(uint32_t));
offset += 4;
for(unsigned int k= offset; k< offset+length_result_text; ++k){
inbuffer[k-1]=inbuffer[k];
}
inbuffer[offset+length_result_text-1]=0;
this->result_text = (char *)(inbuffer + offset-1);
offset += length_result_text;
union {
int32_t real;
uint32_t base;
} u_the_result;
u_the_result.base = 0;
u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->the_result = u_the_result.real;
offset += sizeof(this->the_result);
union {
bool real;
uint8_t base;
} u_is_simple_client;
u_is_simple_client.base = 0;
u_is_simple_client.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
this->is_simple_client = u_is_simple_client.real;
offset += sizeof(this->is_simple_client);
this->delay_accept.sec = ((uint32_t) (*(inbuffer + offset)));
this->delay_accept.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
this->delay_accept.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
this->delay_accept.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
offset += sizeof(this->delay_accept.sec);
this->delay_accept.nsec = ((uint32_t) (*(inbuffer + offset)));
this->delay_accept.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
this->delay_accept.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
this->delay_accept.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
offset += sizeof(this->delay_accept.nsec);
this->delay_terminate.sec = ((uint32_t) (*(inbuffer + offset)));
this->delay_terminate.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
this->delay_terminate.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
this->delay_terminate.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
offset += sizeof(this->delay_terminate.sec);
this->delay_terminate.nsec = ((uint32_t) (*(inbuffer + offset)));
this->delay_terminate.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
this->delay_terminate.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
this->delay_terminate.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
offset += sizeof(this->delay_terminate.nsec);
this->pause_status.sec = ((uint32_t) (*(inbuffer + offset)));
this->pause_status.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
this->pause_status.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
this->pause_status.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
offset += sizeof(this->pause_status.sec);
this->pause_status.nsec = ((uint32_t) (*(inbuffer + offset)));
this->pause_status.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
this->pause_status.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
this->pause_status.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
offset += sizeof(this->pause_status.nsec);
return offset;
}
const char * getType(){ return "actionlib/TestRequestGoal"; };
const char * getMD5(){ return "db5d00ba98302d6c6dd3737e9a03ceea"; };
};
}
#endif
@@ -0,0 +1,78 @@
#ifndef _ROS_actionlib_TestRequestResult_h
#define _ROS_actionlib_TestRequestResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib
{
class TestRequestResult : public ros::Msg
{
public:
int32_t the_result;
bool is_simple_server;
TestRequestResult():
the_result(0),
is_simple_server(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_the_result;
u_the_result.real = this->the_result;
*(outbuffer + offset + 0) = (u_the_result.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_the_result.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_the_result.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_the_result.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->the_result);
union {
bool real;
uint8_t base;
} u_is_simple_server;
u_is_simple_server.real = this->is_simple_server;
*(outbuffer + offset + 0) = (u_is_simple_server.base >> (8 * 0)) & 0xFF;
offset += sizeof(this->is_simple_server);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_the_result;
u_the_result.base = 0;
u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->the_result = u_the_result.real;
offset += sizeof(this->the_result);
union {
bool real;
uint8_t base;
} u_is_simple_server;
u_is_simple_server.base = 0;
u_is_simple_server.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
this->is_simple_server = u_is_simple_server.real;
offset += sizeof(this->is_simple_server);
return offset;
}
const char * getType(){ return "actionlib/TestRequestResult"; };
const char * getMD5(){ return "61c2364524499c7c5017e2f3fce7ba06"; };
};
}
#endif
@@ -0,0 +1,61 @@
#ifndef _ROS_actionlib_TestResult_h
#define _ROS_actionlib_TestResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib
{
class TestResult : public ros::Msg
{
public:
int32_t result;
TestResult():
result(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_result;
u_result.real = this->result;
*(outbuffer + offset + 0) = (u_result.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_result.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_result.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_result.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->result);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_result;
u_result.base = 0;
u_result.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_result.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_result.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_result.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->result = u_result.real;
offset += sizeof(this->result);
return offset;
}
const char * getType(){ return "actionlib/TestResult"; };
const char * getMD5(){ return "034a8e20d6a306665e3a5b340fab3f09"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TwoIntsAction_h
#define _ROS_actionlib_TwoIntsAction_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "actionlib/TwoIntsActionGoal.h"
#include "actionlib/TwoIntsActionResult.h"
#include "actionlib/TwoIntsActionFeedback.h"
namespace actionlib
{
class TwoIntsAction : public ros::Msg
{
public:
actionlib::TwoIntsActionGoal action_goal;
actionlib::TwoIntsActionResult action_result;
actionlib::TwoIntsActionFeedback action_feedback;
TwoIntsAction():
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 "actionlib/TwoIntsAction"; };
const char * getMD5(){ return "6d1aa538c4bd6183a2dfb7fcac41ee50"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TwoIntsActionFeedback_h
#define _ROS_actionlib_TwoIntsActionFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib/TwoIntsFeedback.h"
namespace actionlib
{
class TwoIntsActionFeedback : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib::TwoIntsFeedback feedback;
TwoIntsActionFeedback():
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 "actionlib/TwoIntsActionFeedback"; };
const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TwoIntsActionGoal_h
#define _ROS_actionlib_TwoIntsActionGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalID.h"
#include "actionlib/TwoIntsGoal.h"
namespace actionlib
{
class TwoIntsActionGoal : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalID goal_id;
actionlib::TwoIntsGoal goal;
TwoIntsActionGoal():
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 "actionlib/TwoIntsActionGoal"; };
const char * getMD5(){ return "684a2db55d6ffb8046fb9d6764ce0860"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_TwoIntsActionResult_h
#define _ROS_actionlib_TwoIntsActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib/TwoIntsResult.h"
namespace actionlib
{
class TwoIntsActionResult : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib::TwoIntsResult result;
TwoIntsActionResult():
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 "actionlib/TwoIntsActionResult"; };
const char * getMD5(){ return "3ba7dea8b8cddcae4528ade4ef74b6e7"; };
};
}
#endif
@@ -0,0 +1,38 @@
#ifndef _ROS_actionlib_TwoIntsFeedback_h
#define _ROS_actionlib_TwoIntsFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib
{
class TwoIntsFeedback : public ros::Msg
{
public:
TwoIntsFeedback()
{
}
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 "actionlib/TwoIntsFeedback"; };
const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
};
}
#endif
@@ -0,0 +1,100 @@
#ifndef _ROS_actionlib_TwoIntsGoal_h
#define _ROS_actionlib_TwoIntsGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib
{
class TwoIntsGoal : public ros::Msg
{
public:
int64_t a;
int64_t b;
TwoIntsGoal():
a(0),
b(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int64_t real;
uint64_t base;
} u_a;
u_a.real = this->a;
*(outbuffer + offset + 0) = (u_a.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_a.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_a.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_a.base >> (8 * 3)) & 0xFF;
*(outbuffer + offset + 4) = (u_a.base >> (8 * 4)) & 0xFF;
*(outbuffer + offset + 5) = (u_a.base >> (8 * 5)) & 0xFF;
*(outbuffer + offset + 6) = (u_a.base >> (8 * 6)) & 0xFF;
*(outbuffer + offset + 7) = (u_a.base >> (8 * 7)) & 0xFF;
offset += sizeof(this->a);
union {
int64_t real;
uint64_t base;
} u_b;
u_b.real = this->b;
*(outbuffer + offset + 0) = (u_b.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_b.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_b.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_b.base >> (8 * 3)) & 0xFF;
*(outbuffer + offset + 4) = (u_b.base >> (8 * 4)) & 0xFF;
*(outbuffer + offset + 5) = (u_b.base >> (8 * 5)) & 0xFF;
*(outbuffer + offset + 6) = (u_b.base >> (8 * 6)) & 0xFF;
*(outbuffer + offset + 7) = (u_b.base >> (8 * 7)) & 0xFF;
offset += sizeof(this->b);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int64_t real;
uint64_t base;
} u_a;
u_a.base = 0;
u_a.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_a.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_a.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_a.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
u_a.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
u_a.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
u_a.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
u_a.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
this->a = u_a.real;
offset += sizeof(this->a);
union {
int64_t real;
uint64_t base;
} u_b;
u_b.base = 0;
u_b.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_b.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_b.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_b.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
u_b.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
u_b.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
u_b.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
u_b.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
this->b = u_b.real;
offset += sizeof(this->b);
return offset;
}
const char * getType(){ return "actionlib/TwoIntsGoal"; };
const char * getMD5(){ return "36d09b846be0b371c5f190354dd3153e"; };
};
}
#endif
@@ -0,0 +1,69 @@
#ifndef _ROS_actionlib_TwoIntsResult_h
#define _ROS_actionlib_TwoIntsResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib
{
class TwoIntsResult : public ros::Msg
{
public:
int64_t sum;
TwoIntsResult():
sum(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int64_t real;
uint64_t base;
} u_sum;
u_sum.real = this->sum;
*(outbuffer + offset + 0) = (u_sum.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_sum.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_sum.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_sum.base >> (8 * 3)) & 0xFF;
*(outbuffer + offset + 4) = (u_sum.base >> (8 * 4)) & 0xFF;
*(outbuffer + offset + 5) = (u_sum.base >> (8 * 5)) & 0xFF;
*(outbuffer + offset + 6) = (u_sum.base >> (8 * 6)) & 0xFF;
*(outbuffer + offset + 7) = (u_sum.base >> (8 * 7)) & 0xFF;
offset += sizeof(this->sum);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int64_t real;
uint64_t base;
} u_sum;
u_sum.base = 0;
u_sum.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_sum.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_sum.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_sum.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
u_sum.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
u_sum.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
u_sum.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
u_sum.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
this->sum = u_sum.real;
offset += sizeof(this->sum);
return offset;
}
const char * getType(){ return "actionlib/TwoIntsResult"; };
const char * getMD5(){ return "b88405221c77b1878a3cbbfff53428d7"; };
};
}
#endif
@@ -0,0 +1,77 @@
#ifndef _ROS_actionlib_msgs_GoalID_h
#define _ROS_actionlib_msgs_GoalID_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "ros/time.h"
namespace actionlib_msgs
{
class GoalID : public ros::Msg
{
public:
ros::Time stamp;
const char* 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);
memcpy(outbuffer + offset, &length_id, sizeof(uint32_t));
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;
memcpy(&length_id, (inbuffer + offset), sizeof(uint32_t));
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
@@ -0,0 +1,75 @@
#ifndef _ROS_actionlib_msgs_GoalStatus_h
#define _ROS_actionlib_msgs_GoalStatus_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "actionlib_msgs/GoalID.h"
namespace actionlib_msgs
{
class GoalStatus : public ros::Msg
{
public:
actionlib_msgs::GoalID goal_id;
uint8_t status;
const char* 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);
memcpy(outbuffer + offset, &length_text, sizeof(uint32_t));
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;
memcpy(&length_text, (inbuffer + offset), sizeof(uint32_t));
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
@@ -0,0 +1,64 @@
#ifndef _ROS_actionlib_msgs_GoalStatusArray_h
#define _ROS_actionlib_msgs_GoalStatusArray_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
namespace actionlib_msgs
{
class GoalStatusArray : public ros::Msg
{
public:
std_msgs::Header header;
uint8_t status_list_length;
actionlib_msgs::GoalStatus st_status_list;
actionlib_msgs::GoalStatus * 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++) = status_list_length;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
for( uint8_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);
uint8_t status_list_lengthT = *(inbuffer + offset++);
if(status_list_lengthT > status_list_length)
this->status_list = (actionlib_msgs::GoalStatus*)realloc(this->status_list, status_list_lengthT * sizeof(actionlib_msgs::GoalStatus));
offset += 3;
status_list_length = status_list_lengthT;
for( uint8_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
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_tutorials_AveragingAction_h
#define _ROS_actionlib_tutorials_AveragingAction_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "actionlib_tutorials/AveragingActionGoal.h"
#include "actionlib_tutorials/AveragingActionResult.h"
#include "actionlib_tutorials/AveragingActionFeedback.h"
namespace actionlib_tutorials
{
class AveragingAction : public ros::Msg
{
public:
actionlib_tutorials::AveragingActionGoal action_goal;
actionlib_tutorials::AveragingActionResult action_result;
actionlib_tutorials::AveragingActionFeedback action_feedback;
AveragingAction():
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 "actionlib_tutorials/AveragingAction"; };
const char * getMD5(){ return "628678f2b4fa6a5951746a4a2d39e716"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_tutorials_AveragingActionFeedback_h
#define _ROS_actionlib_tutorials_AveragingActionFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib_tutorials/AveragingFeedback.h"
namespace actionlib_tutorials
{
class AveragingActionFeedback : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib_tutorials::AveragingFeedback feedback;
AveragingActionFeedback():
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 "actionlib_tutorials/AveragingActionFeedback"; };
const char * getMD5(){ return "78a4a09241b1791069223ae7ebd5b16b"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_tutorials_AveragingActionGoal_h
#define _ROS_actionlib_tutorials_AveragingActionGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalID.h"
#include "actionlib_tutorials/AveragingGoal.h"
namespace actionlib_tutorials
{
class AveragingActionGoal : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalID goal_id;
actionlib_tutorials::AveragingGoal goal;
AveragingActionGoal():
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 "actionlib_tutorials/AveragingActionGoal"; };
const char * getMD5(){ return "1561825b734ebd6039851c501e3fb570"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_tutorials_AveragingActionResult_h
#define _ROS_actionlib_tutorials_AveragingActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib_tutorials/AveragingResult.h"
namespace actionlib_tutorials
{
class AveragingActionResult : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib_tutorials::AveragingResult result;
AveragingActionResult():
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 "actionlib_tutorials/AveragingActionResult"; };
const char * getMD5(){ return "8672cb489d347580acdcd05c5d497497"; };
};
}
#endif
@@ -0,0 +1,130 @@
#ifndef _ROS_actionlib_tutorials_AveragingFeedback_h
#define _ROS_actionlib_tutorials_AveragingFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib_tutorials
{
class AveragingFeedback : public ros::Msg
{
public:
int32_t sample;
float data;
float mean;
float std_dev;
AveragingFeedback():
sample(0),
data(0),
mean(0),
std_dev(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_sample;
u_sample.real = this->sample;
*(outbuffer + offset + 0) = (u_sample.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_sample.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_sample.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_sample.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->sample);
union {
float real;
uint32_t base;
} u_data;
u_data.real = this->data;
*(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_data.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_data.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_data.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->data);
union {
float real;
uint32_t base;
} u_mean;
u_mean.real = this->mean;
*(outbuffer + offset + 0) = (u_mean.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_mean.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_mean.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_mean.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->mean);
union {
float real;
uint32_t base;
} u_std_dev;
u_std_dev.real = this->std_dev;
*(outbuffer + offset + 0) = (u_std_dev.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_std_dev.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_std_dev.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_std_dev.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->std_dev);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_sample;
u_sample.base = 0;
u_sample.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_sample.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_sample.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_sample.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->sample = u_sample.real;
offset += sizeof(this->sample);
union {
float real;
uint32_t base;
} u_data;
u_data.base = 0;
u_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->data = u_data.real;
offset += sizeof(this->data);
union {
float real;
uint32_t base;
} u_mean;
u_mean.base = 0;
u_mean.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_mean.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_mean.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_mean.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->mean = u_mean.real;
offset += sizeof(this->mean);
union {
float real;
uint32_t base;
} u_std_dev;
u_std_dev.base = 0;
u_std_dev.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_std_dev.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_std_dev.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_std_dev.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->std_dev = u_std_dev.real;
offset += sizeof(this->std_dev);
return offset;
}
const char * getType(){ return "actionlib_tutorials/AveragingFeedback"; };
const char * getMD5(){ return "9e8dfc53c2f2a032ca33fa80ec46fd4f"; };
};
}
#endif
@@ -0,0 +1,61 @@
#ifndef _ROS_actionlib_tutorials_AveragingGoal_h
#define _ROS_actionlib_tutorials_AveragingGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib_tutorials
{
class AveragingGoal : public ros::Msg
{
public:
int32_t samples;
AveragingGoal():
samples(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_samples;
u_samples.real = this->samples;
*(outbuffer + offset + 0) = (u_samples.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_samples.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_samples.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_samples.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->samples);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_samples;
u_samples.base = 0;
u_samples.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_samples.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_samples.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_samples.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->samples = u_samples.real;
offset += sizeof(this->samples);
return offset;
}
const char * getType(){ return "actionlib_tutorials/AveragingGoal"; };
const char * getMD5(){ return "32c9b10ef9b253faa93b93f564762c8f"; };
};
}
#endif
@@ -0,0 +1,84 @@
#ifndef _ROS_actionlib_tutorials_AveragingResult_h
#define _ROS_actionlib_tutorials_AveragingResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib_tutorials
{
class AveragingResult : public ros::Msg
{
public:
float mean;
float std_dev;
AveragingResult():
mean(0),
std_dev(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
float real;
uint32_t base;
} u_mean;
u_mean.real = this->mean;
*(outbuffer + offset + 0) = (u_mean.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_mean.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_mean.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_mean.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->mean);
union {
float real;
uint32_t base;
} u_std_dev;
u_std_dev.real = this->std_dev;
*(outbuffer + offset + 0) = (u_std_dev.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_std_dev.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_std_dev.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_std_dev.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->std_dev);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
float real;
uint32_t base;
} u_mean;
u_mean.base = 0;
u_mean.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_mean.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_mean.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_mean.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->mean = u_mean.real;
offset += sizeof(this->mean);
union {
float real;
uint32_t base;
} u_std_dev;
u_std_dev.base = 0;
u_std_dev.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_std_dev.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_std_dev.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_std_dev.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->std_dev = u_std_dev.real;
offset += sizeof(this->std_dev);
return offset;
}
const char * getType(){ return "actionlib_tutorials/AveragingResult"; };
const char * getMD5(){ return "d5c7decf6df75ffb4367a05c1bcc7612"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_tutorials_FibonacciAction_h
#define _ROS_actionlib_tutorials_FibonacciAction_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "actionlib_tutorials/FibonacciActionGoal.h"
#include "actionlib_tutorials/FibonacciActionResult.h"
#include "actionlib_tutorials/FibonacciActionFeedback.h"
namespace actionlib_tutorials
{
class FibonacciAction : public ros::Msg
{
public:
actionlib_tutorials::FibonacciActionGoal action_goal;
actionlib_tutorials::FibonacciActionResult action_result;
actionlib_tutorials::FibonacciActionFeedback action_feedback;
FibonacciAction():
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 "actionlib_tutorials/FibonacciAction"; };
const char * getMD5(){ return "f59df5767bf7634684781c92598b2406"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_tutorials_FibonacciActionFeedback_h
#define _ROS_actionlib_tutorials_FibonacciActionFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib_tutorials/FibonacciFeedback.h"
namespace actionlib_tutorials
{
class FibonacciActionFeedback : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib_tutorials::FibonacciFeedback feedback;
FibonacciActionFeedback():
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 "actionlib_tutorials/FibonacciActionFeedback"; };
const char * getMD5(){ return "73b8497a9f629a31c0020900e4148f07"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_tutorials_FibonacciActionGoal_h
#define _ROS_actionlib_tutorials_FibonacciActionGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalID.h"
#include "actionlib_tutorials/FibonacciGoal.h"
namespace actionlib_tutorials
{
class FibonacciActionGoal : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalID goal_id;
actionlib_tutorials::FibonacciGoal goal;
FibonacciActionGoal():
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 "actionlib_tutorials/FibonacciActionGoal"; };
const char * getMD5(){ return "006871c7fa1d0e3d5fe2226bf17b2a94"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_actionlib_tutorials_FibonacciActionResult_h
#define _ROS_actionlib_tutorials_FibonacciActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "actionlib_tutorials/FibonacciResult.h"
namespace actionlib_tutorials
{
class FibonacciActionResult : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
actionlib_tutorials::FibonacciResult result;
FibonacciActionResult():
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 "actionlib_tutorials/FibonacciActionResult"; };
const char * getMD5(){ return "bee73a9fe29ae25e966e105f5553dd03"; };
};
}
#endif
@@ -0,0 +1,77 @@
#ifndef _ROS_actionlib_tutorials_FibonacciFeedback_h
#define _ROS_actionlib_tutorials_FibonacciFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib_tutorials
{
class FibonacciFeedback : public ros::Msg
{
public:
uint8_t sequence_length;
int32_t st_sequence;
int32_t * sequence;
FibonacciFeedback():
sequence_length(0), sequence(NULL)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
*(outbuffer + offset++) = sequence_length;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
for( uint8_t i = 0; i < sequence_length; i++){
union {
int32_t real;
uint32_t base;
} u_sequencei;
u_sequencei.real = this->sequence[i];
*(outbuffer + offset + 0) = (u_sequencei.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_sequencei.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_sequencei.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_sequencei.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->sequence[i]);
}
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
uint8_t sequence_lengthT = *(inbuffer + offset++);
if(sequence_lengthT > sequence_length)
this->sequence = (int32_t*)realloc(this->sequence, sequence_lengthT * sizeof(int32_t));
offset += 3;
sequence_length = sequence_lengthT;
for( uint8_t i = 0; i < sequence_length; i++){
union {
int32_t real;
uint32_t base;
} u_st_sequence;
u_st_sequence.base = 0;
u_st_sequence.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_st_sequence.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_st_sequence.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_st_sequence.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->st_sequence = u_st_sequence.real;
offset += sizeof(this->st_sequence);
memcpy( &(this->sequence[i]), &(this->st_sequence), sizeof(int32_t));
}
return offset;
}
const char * getType(){ return "actionlib_tutorials/FibonacciFeedback"; };
const char * getMD5(){ return "b81e37d2a31925a0e8ae261a8699cb79"; };
};
}
#endif
@@ -0,0 +1,61 @@
#ifndef _ROS_actionlib_tutorials_FibonacciGoal_h
#define _ROS_actionlib_tutorials_FibonacciGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib_tutorials
{
class FibonacciGoal : public ros::Msg
{
public:
int32_t order;
FibonacciGoal():
order(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_order;
u_order.real = this->order;
*(outbuffer + offset + 0) = (u_order.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_order.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_order.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_order.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->order);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int32_t real;
uint32_t base;
} u_order;
u_order.base = 0;
u_order.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_order.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_order.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_order.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->order = u_order.real;
offset += sizeof(this->order);
return offset;
}
const char * getType(){ return "actionlib_tutorials/FibonacciGoal"; };
const char * getMD5(){ return "6889063349a00b249bd1661df429d822"; };
};
}
#endif
@@ -0,0 +1,77 @@
#ifndef _ROS_actionlib_tutorials_FibonacciResult_h
#define _ROS_actionlib_tutorials_FibonacciResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace actionlib_tutorials
{
class FibonacciResult : public ros::Msg
{
public:
uint8_t sequence_length;
int32_t st_sequence;
int32_t * sequence;
FibonacciResult():
sequence_length(0), sequence(NULL)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
*(outbuffer + offset++) = sequence_length;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
for( uint8_t i = 0; i < sequence_length; i++){
union {
int32_t real;
uint32_t base;
} u_sequencei;
u_sequencei.real = this->sequence[i];
*(outbuffer + offset + 0) = (u_sequencei.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_sequencei.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_sequencei.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_sequencei.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->sequence[i]);
}
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
uint8_t sequence_lengthT = *(inbuffer + offset++);
if(sequence_lengthT > sequence_length)
this->sequence = (int32_t*)realloc(this->sequence, sequence_lengthT * sizeof(int32_t));
offset += 3;
sequence_length = sequence_lengthT;
for( uint8_t i = 0; i < sequence_length; i++){
union {
int32_t real;
uint32_t base;
} u_st_sequence;
u_st_sequence.base = 0;
u_st_sequence.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_st_sequence.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_st_sequence.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_st_sequence.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->st_sequence = u_st_sequence.real;
offset += sizeof(this->st_sequence);
memcpy( &(this->sequence[i]), &(this->st_sequence), sizeof(int32_t));
}
return offset;
}
const char * getType(){ return "actionlib_tutorials/FibonacciResult"; };
const char * getMD5(){ return "b81e37d2a31925a0e8ae261a8699cb79"; };
};
}
#endif
@@ -0,0 +1,44 @@
#ifndef _ROS_bond_Constants_h
#define _ROS_bond_Constants_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace bond
{
class Constants : public ros::Msg
{
public:
enum { DEAD_PUBLISH_PERIOD = 0.05 };
enum { DEFAULT_CONNECT_TIMEOUT = 10.0 };
enum { DEFAULT_HEARTBEAT_TIMEOUT = 4.0 };
enum { DEFAULT_DISCONNECT_TIMEOUT = 2.0 };
enum { DEFAULT_HEARTBEAT_PERIOD = 1.0 };
enum { DISABLE_HEARTBEAT_TIMEOUT_PARAM = /bond_disable_heartbeat_timeout };
Constants()
{
}
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 "bond/Constants"; };
const char * getMD5(){ return "6fc594dc1d7bd7919077042712f8c8b0"; };
};
}
#endif
@@ -0,0 +1,138 @@
#ifndef _ROS_bond_Status_h
#define _ROS_bond_Status_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
namespace bond
{
class Status : public ros::Msg
{
public:
std_msgs::Header header;
const char* id;
const char* instance_id;
bool active;
float heartbeat_timeout;
float heartbeat_period;
Status():
header(),
id(""),
instance_id(""),
active(0),
heartbeat_timeout(0),
heartbeat_period(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
offset += this->header.serialize(outbuffer + offset);
uint32_t length_id = strlen(this->id);
memcpy(outbuffer + offset, &length_id, sizeof(uint32_t));
offset += 4;
memcpy(outbuffer + offset, this->id, length_id);
offset += length_id;
uint32_t length_instance_id = strlen(this->instance_id);
memcpy(outbuffer + offset, &length_instance_id, sizeof(uint32_t));
offset += 4;
memcpy(outbuffer + offset, this->instance_id, length_instance_id);
offset += length_instance_id;
union {
bool real;
uint8_t base;
} u_active;
u_active.real = this->active;
*(outbuffer + offset + 0) = (u_active.base >> (8 * 0)) & 0xFF;
offset += sizeof(this->active);
union {
float real;
uint32_t base;
} u_heartbeat_timeout;
u_heartbeat_timeout.real = this->heartbeat_timeout;
*(outbuffer + offset + 0) = (u_heartbeat_timeout.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_heartbeat_timeout.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_heartbeat_timeout.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_heartbeat_timeout.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->heartbeat_timeout);
union {
float real;
uint32_t base;
} u_heartbeat_period;
u_heartbeat_period.real = this->heartbeat_period;
*(outbuffer + offset + 0) = (u_heartbeat_period.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_heartbeat_period.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_heartbeat_period.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_heartbeat_period.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->heartbeat_period);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
offset += this->header.deserialize(inbuffer + offset);
uint32_t length_id;
memcpy(&length_id, (inbuffer + offset), sizeof(uint32_t));
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;
uint32_t length_instance_id;
memcpy(&length_instance_id, (inbuffer + offset), sizeof(uint32_t));
offset += 4;
for(unsigned int k= offset; k< offset+length_instance_id; ++k){
inbuffer[k-1]=inbuffer[k];
}
inbuffer[offset+length_instance_id-1]=0;
this->instance_id = (char *)(inbuffer + offset-1);
offset += length_instance_id;
union {
bool real;
uint8_t base;
} u_active;
u_active.base = 0;
u_active.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
this->active = u_active.real;
offset += sizeof(this->active);
union {
float real;
uint32_t base;
} u_heartbeat_timeout;
u_heartbeat_timeout.base = 0;
u_heartbeat_timeout.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_heartbeat_timeout.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_heartbeat_timeout.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_heartbeat_timeout.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->heartbeat_timeout = u_heartbeat_timeout.real;
offset += sizeof(this->heartbeat_timeout);
union {
float real;
uint32_t base;
} u_heartbeat_period;
u_heartbeat_period.base = 0;
u_heartbeat_period.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_heartbeat_period.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_heartbeat_period.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_heartbeat_period.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
this->heartbeat_period = u_heartbeat_period.real;
offset += sizeof(this->heartbeat_period);
return offset;
}
const char * getType(){ return "bond/Status"; };
const char * getMD5(){ return "eacc84bf5d65b6777d4c50f463dfb9c8"; };
};
}
#endif
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_FollowJointTrajectoryAction_h
#define _ROS_control_msgs_FollowJointTrajectoryAction_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
control_msgs::FollowJointTrajectoryActionGoal action_goal;
control_msgs::FollowJointTrajectoryActionResult action_result;
control_msgs::FollowJointTrajectoryActionFeedback 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h
#define _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
control_msgs::FollowJointTrajectoryFeedback 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_FollowJointTrajectoryActionGoal_h
#define _ROS_control_msgs_FollowJointTrajectoryActionGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalID goal_id;
control_msgs::FollowJointTrajectoryGoal 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_FollowJointTrajectoryActionResult_h
#define _ROS_control_msgs_FollowJointTrajectoryActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
control_msgs::FollowJointTrajectoryResult 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
@@ -0,0 +1,88 @@
#ifndef _ROS_control_msgs_FollowJointTrajectoryFeedback_h
#define _ROS_control_msgs_FollowJointTrajectoryFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "trajectory_msgs/JointTrajectoryPoint.h"
namespace control_msgs
{
class FollowJointTrajectoryFeedback : public ros::Msg
{
public:
std_msgs::Header header;
uint8_t joint_names_length;
char* st_joint_names;
char* * joint_names;
trajectory_msgs::JointTrajectoryPoint desired;
trajectory_msgs::JointTrajectoryPoint actual;
trajectory_msgs::JointTrajectoryPoint 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++) = joint_names_length;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
for( uint8_t i = 0; i < joint_names_length; i++){
uint32_t length_joint_namesi = strlen(this->joint_names[i]);
memcpy(outbuffer + offset, &length_joint_namesi, sizeof(uint32_t));
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);
uint8_t joint_names_lengthT = *(inbuffer + offset++);
if(joint_names_lengthT > joint_names_length)
this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*));
offset += 3;
joint_names_length = joint_names_lengthT;
for( uint8_t i = 0; i < joint_names_length; i++){
uint32_t length_st_joint_names;
memcpy(&length_st_joint_names, (inbuffer + offset), sizeof(uint32_t));
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
@@ -0,0 +1,107 @@
#ifndef _ROS_control_msgs_FollowJointTrajectoryGoal_h
#define _ROS_control_msgs_FollowJointTrajectoryGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
trajectory_msgs::JointTrajectory trajectory;
uint8_t path_tolerance_length;
control_msgs::JointTolerance st_path_tolerance;
control_msgs::JointTolerance * path_tolerance;
uint8_t goal_tolerance_length;
control_msgs::JointTolerance st_goal_tolerance;
control_msgs::JointTolerance * goal_tolerance;
ros::Duration 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++) = path_tolerance_length;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
for( uint8_t i = 0; i < path_tolerance_length; i++){
offset += this->path_tolerance[i].serialize(outbuffer + offset);
}
*(outbuffer + offset++) = goal_tolerance_length;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
for( uint8_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);
uint8_t path_tolerance_lengthT = *(inbuffer + offset++);
if(path_tolerance_lengthT > path_tolerance_length)
this->path_tolerance = (control_msgs::JointTolerance*)realloc(this->path_tolerance, path_tolerance_lengthT * sizeof(control_msgs::JointTolerance));
offset += 3;
path_tolerance_length = path_tolerance_lengthT;
for( uint8_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));
}
uint8_t goal_tolerance_lengthT = *(inbuffer + offset++);
if(goal_tolerance_lengthT > goal_tolerance_length)
this->goal_tolerance = (control_msgs::JointTolerance*)realloc(this->goal_tolerance, goal_tolerance_lengthT * sizeof(control_msgs::JointTolerance));
offset += 3;
goal_tolerance_length = goal_tolerance_lengthT;
for( uint8_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
@@ -0,0 +1,83 @@
#ifndef _ROS_control_msgs_FollowJointTrajectoryResult_h
#define _ROS_control_msgs_FollowJointTrajectoryResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace control_msgs
{
class FollowJointTrajectoryResult : public ros::Msg
{
public:
int32_t error_code;
const char* 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);
memcpy(outbuffer + offset, &length_error_string, sizeof(uint32_t));
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;
memcpy(&length_error_string, (inbuffer + offset), sizeof(uint32_t));
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
@@ -0,0 +1,46 @@
#ifndef _ROS_control_msgs_GripperCommand_h
#define _ROS_control_msgs_GripperCommand_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace control_msgs
{
class GripperCommand : public ros::Msg
{
public:
float position;
float 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_GripperCommandAction_h
#define _ROS_control_msgs_GripperCommandAction_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
control_msgs::GripperCommandActionGoal action_goal;
control_msgs::GripperCommandActionResult action_result;
control_msgs::GripperCommandActionFeedback 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_GripperCommandActionFeedback_h
#define _ROS_control_msgs_GripperCommandActionFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
control_msgs::GripperCommandFeedback 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_GripperCommandActionGoal_h
#define _ROS_control_msgs_GripperCommandActionGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalID goal_id;
control_msgs::GripperCommandGoal 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_GripperCommandActionResult_h
#define _ROS_control_msgs_GripperCommandActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
control_msgs::GripperCommandResult 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
@@ -0,0 +1,80 @@
#ifndef _ROS_control_msgs_GripperCommandFeedback_h
#define _ROS_control_msgs_GripperCommandFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace control_msgs
{
class GripperCommandFeedback : public ros::Msg
{
public:
float position;
float effort;
bool stalled;
bool 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
@@ -0,0 +1,43 @@
#ifndef _ROS_control_msgs_GripperCommandGoal_h
#define _ROS_control_msgs_GripperCommandGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "control_msgs/GripperCommand.h"
namespace control_msgs
{
class GripperCommandGoal : public ros::Msg
{
public:
control_msgs::GripperCommand 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
@@ -0,0 +1,80 @@
#ifndef _ROS_control_msgs_GripperCommandResult_h
#define _ROS_control_msgs_GripperCommandResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace control_msgs
{
class GripperCommandResult : public ros::Msg
{
public:
float position;
float effort;
bool stalled;
bool 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
@@ -0,0 +1,83 @@
#ifndef _ROS_control_msgs_JointControllerState_h
#define _ROS_control_msgs_JointControllerState_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
namespace control_msgs
{
class JointControllerState : public ros::Msg
{
public:
std_msgs::Header header;
float set_point;
float process_value;
float process_value_dot;
float error;
float time_step;
float command;
float p;
float i;
float d;
float i_clamp;
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)
{
}
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);
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));
return offset;
}
const char * getType(){ return "control_msgs/JointControllerState"; };
const char * getMD5(){ return "c0d034a7bf20aeb1c37f3eccb7992b69"; };
};
}
#endif
@@ -0,0 +1,66 @@
#ifndef _ROS_control_msgs_JointTolerance_h
#define _ROS_control_msgs_JointTolerance_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace control_msgs
{
class JointTolerance : public ros::Msg
{
public:
const char* name;
float position;
float velocity;
float 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);
memcpy(outbuffer + offset, &length_name, sizeof(uint32_t));
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;
memcpy(&length_name, (inbuffer + offset), sizeof(uint32_t));
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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_JointTrajectoryAction_h
#define _ROS_control_msgs_JointTrajectoryAction_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
control_msgs::JointTrajectoryActionGoal action_goal;
control_msgs::JointTrajectoryActionResult action_result;
control_msgs::JointTrajectoryActionFeedback 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_JointTrajectoryActionFeedback_h
#define _ROS_control_msgs_JointTrajectoryActionFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
control_msgs::JointTrajectoryFeedback 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_JointTrajectoryActionGoal_h
#define _ROS_control_msgs_JointTrajectoryActionGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalID goal_id;
control_msgs::JointTrajectoryGoal 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_JointTrajectoryActionResult_h
#define _ROS_control_msgs_JointTrajectoryActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
control_msgs::JointTrajectoryResult 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
@@ -0,0 +1,88 @@
#ifndef _ROS_control_msgs_JointTrajectoryControllerState_h
#define _ROS_control_msgs_JointTrajectoryControllerState_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "trajectory_msgs/JointTrajectoryPoint.h"
namespace control_msgs
{
class JointTrajectoryControllerState : public ros::Msg
{
public:
std_msgs::Header header;
uint8_t joint_names_length;
char* st_joint_names;
char* * joint_names;
trajectory_msgs::JointTrajectoryPoint desired;
trajectory_msgs::JointTrajectoryPoint actual;
trajectory_msgs::JointTrajectoryPoint 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++) = joint_names_length;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
*(outbuffer + offset++) = 0;
for( uint8_t i = 0; i < joint_names_length; i++){
uint32_t length_joint_namesi = strlen(this->joint_names[i]);
memcpy(outbuffer + offset, &length_joint_namesi, sizeof(uint32_t));
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);
uint8_t joint_names_lengthT = *(inbuffer + offset++);
if(joint_names_lengthT > joint_names_length)
this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*));
offset += 3;
joint_names_length = joint_names_lengthT;
for( uint8_t i = 0; i < joint_names_length; i++){
uint32_t length_st_joint_names;
memcpy(&length_st_joint_names, (inbuffer + offset), sizeof(uint32_t));
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
@@ -0,0 +1,38 @@
#ifndef _ROS_control_msgs_JointTrajectoryFeedback_h
#define _ROS_control_msgs_JointTrajectoryFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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
@@ -0,0 +1,43 @@
#ifndef _ROS_control_msgs_JointTrajectoryGoal_h
#define _ROS_control_msgs_JointTrajectoryGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "trajectory_msgs/JointTrajectory.h"
namespace control_msgs
{
class JointTrajectoryGoal : public ros::Msg
{
public:
trajectory_msgs::JointTrajectory 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
@@ -0,0 +1,38 @@
#ifndef _ROS_control_msgs_JointTrajectoryResult_h
#define _ROS_control_msgs_JointTrajectoryResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_PointHeadAction_h
#define _ROS_control_msgs_PointHeadAction_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
control_msgs::PointHeadActionGoal action_goal;
control_msgs::PointHeadActionResult action_result;
control_msgs::PointHeadActionFeedback 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_PointHeadActionFeedback_h
#define _ROS_control_msgs_PointHeadActionFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
control_msgs::PointHeadFeedback 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_PointHeadActionGoal_h
#define _ROS_control_msgs_PointHeadActionGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalID goal_id;
control_msgs::PointHeadGoal 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
@@ -0,0 +1,53 @@
#ifndef _ROS_control_msgs_PointHeadActionResult_h
#define _ROS_control_msgs_PointHeadActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
control_msgs::PointHeadResult 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
@@ -0,0 +1,42 @@
#ifndef _ROS_control_msgs_PointHeadFeedback_h
#define _ROS_control_msgs_PointHeadFeedback_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace control_msgs
{
class PointHeadFeedback : public ros::Msg
{
public:
float 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
@@ -0,0 +1,91 @@
#ifndef _ROS_control_msgs_PointHeadGoal_h
#define _ROS_control_msgs_PointHeadGoal_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
geometry_msgs::PointStamped target;
geometry_msgs::Vector3 pointing_axis;
const char* pointing_frame;
ros::Duration min_duration;
float 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);
memcpy(outbuffer + offset, &length_pointing_frame, sizeof(uint32_t));
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;
memcpy(&length_pointing_frame, (inbuffer + offset), sizeof(uint32_t));
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
@@ -0,0 +1,38 @@
#ifndef _ROS_control_msgs_PointHeadResult_h
#define _ROS_control_msgs_PointHeadResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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
@@ -0,0 +1,87 @@
#ifndef _ROS_SERVICE_QueryCalibrationState_h
#define _ROS_SERVICE_QueryCalibrationState_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#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:
bool 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

Some files were not shown because too many files have changed in this diff Show More